Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all 6821 articles
Browse latest View live

A.E. Defender of Celestial Sphere : ( Download it now )

$
0
0

@DexterZ wrote:

DESCRIPTION :

Game I submitted from a (2)Two Months Tower Defense Challenge from GameDev.net Earth Allegiance : Defender of Celestial Sphere is a 3D-RTS tower defense game in space the goal is simple defend the 88 known constellations from the invading forces before it reaches earth.

ALPHA PROTOTYPE RELEASE ( Download Project Page ):

https://www.gamedev.net/projects/443-earth-allegiance-defender-of-celestial-sphere/

Thank's to MG TEAM!!!! waiting for my TD Badge from GameDev :sunglasses: Nyaha...

Posts: 1

Participants: 1

Read full topic


[Solved] Weird small bug. Sampler State maybe?

$
0
0

@skyemaidstone wrote:

Hi guys,

I have a rather strange problem. When i'm debugging I have it so I can press tab to see all my render targets for various things. depth, shadow map levels etc which is all fine. BUT for some reason rendering the render target for the depth map using a debugging SpriteBatch with these lines:

  _debugSB.Begin(SpriteSortMode.Immediate, BlendState.Opaque, SamplerState.PointClamp,  DepthStencilState.DepthRead, null, debugshadowRTeffect);
  _debugSB.Draw(depthRT, new Rectangle(900, 0, 300, 150), Color.White);
  _debugSB.End();

causes some of the shadows to disappear in the game itself. They reappear again when I stop showing the depth render target but I can't work out what's changing. The shadows are fine for most models but not some of the ones that have some areas of transparency in their textures. But not all models, most are fine. I'm a bit stumped. It's such a simple shader:

texture ScreenTexture;

SamplerState TextureSampler = sampler_state
{
    Texture = <ScreenTexture>;
};

float contrast = 10.0f;

float4 PixelShaderFunction(float4 position : SV_Position, float4 color : COLOR0, float2 texCoord : TEXCOORD0) : 
SV_TARGET0
{
float4 tex = tex2D(TextureSampler, texCoord);

tex = pow(tex, contrast);

return tex;
}

technique
{
    pass P0
    {
    PixelShader = compile ps_4_0 PixelShaderFunction();
    }
}

Any ideas? Seems like something is getting fudged and needs resetting afterwards. It's not screwing up the depth buffer completely or anything because most of the shadows etc are still working fine.

If i render my render targets using the built-in/default shadow everything is fine.

Thanks

Edit: RasterizerState.CullNone was needed rather than just "null" in the SpriteBatch.Begin command because this seemed to be leaving Rasterization state as default. I had assumed that passing in null would leave it was before.

Posts: 1

Participants: 1

Read full topic

Self build of latest Monogame generates garbage

$
0
0

@EnemyArea wrote:

Hey ppl,

I have some very stange issues. I've debug my game and god some garbage issues. At first I thought its from the current monogame version (3.6). So I download the latest and build it on my own. Its still there. Here is a sample project, I found here in the forum: https://www.dropbox.com/s/nr1hxnd1g919r2d/DxNoGarbageTextTest.zip?dl=0

The strange thing is it's heavy on debug und ony withour debug if I move the mouse.

What could that be? ( I use vs2017 community)

Posts: 4

Participants: 2

Read full topic

Using second monitor in extended desktop

$
0
0

@Albert_Dutting wrote:

I know this question already has been asked, but i did not find a working answer for it (maybe the answers were for previous versions) Is it possible to use the first monitor in an extended desktop (dual monitor) for windows forms and the second monitor for MONOGAME drawing in the current MONOGAME release? The Game.Windows.Position can be set, but nothing happens when i set it. All other "solutions" i found, do not work.

Posts: 1

Participants: 1

Read full topic

DynamicVertexBuffer crashs application

$
0
0

@Sebastian_Stehle wrote:

Hi,

yesterday was the first time since XNA when I was doing 3D programming again. I have a small particle system with renderer that uses a single DynamicVertexBuffer to render the particles. When I use a buffer for more than 4000 particles (=8000 vertexes) my application hangs and I see a lot of SharpDXException's in the output.

I also get errors like: HRESULT: [0x887A0005], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_DEVICE_REMOVED/DeviceRemoved], Message: The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.

Is there a debugging tool to find out more about the issue?

There is nothing special.This is how I create my buffers: https://gist.github.com/SebastianStehle/13bc6a23809267dc62287b3971ad2e56

The indices are created once and the vertices are updated for each render call.

Posts: 1

Participants: 1

Read full topic

Next MonoGame Jam starts on July 26, 2018

$
0
0

@Apostolique wrote:

Hello everyone! I'm spreading the word for the next MGJam that starts in 17 days.

https://itch.io/jam/mgjam

The theme will be given when the jam starts.

There's a Discord that was created for the occasion: https://discord.gg/CBxm3fb

(This Discord is different than the one that already exist for MonoGame in general which can be found here: https://discord.gg/m7TQmNt)

Rules:

  • Must be made using MonoGame or XNA derivatives.
  • Do your best to work within the theme.
  • Contestants can partake alone or as a team. Reusing existing code and assets is allowed.
  • This is a fun jam, there is no minimum experience level. People from all backgrounds are welcome.

Suggestions:

  • Share code and project files.
  • Write daily dev-logs.
  • Stream the creation process.

This is the second MonoGame Jam. You can find the last one here: https://itch.io/jam/monogamejam

Posts: 1

Participants: 1

Read full topic

[SOLVED] Cant find a default importer for tiled .tmx files

$
0
0

@thefrostwyrm wrote:

Newbie here. I've used the NuGet package manager to install both monogame.extended and MonoGame.Extended.Content.Pipeline. However the pipeline tool refuses to build my tilemap due to this error.

I've looked around on the net for likely causes and found a thread posted back in 2015 that said something along the lines of that monogame.extended cannot handle "Collections of Images" as a tileset so I've made sure my map does not use any. Not sure if that restriction still applies in 2018, but still it does not work.

Does anyone have any ideas?
Thanks in advance.

Posts: 7

Participants: 2

Read full topic

Monogame Pipeline file size too big

$
0
0

@Quazars wrote:

Hello! I've been having some issues with the size of the .xnb files when building my project. I tried doing my research but I could not find anything that would help me with my problem.

This is the topic I found that resembles my issues but none of the answers helped me out.

I have around 30 MB worth of .png images that jump out to 3 GB of .xnb.deploy files, I've tried a lot of things to solve this but I can't seem to solve this issue. I'm running the latest Monogame version (3.6) and tried many different conent pipeline settings without any luck. I tried in both Debug and Release mode.

Appreciate any help with solving this issue!

Edit:

Here are my properties:
Gyazo link

Posts: 6

Participants: 3

Read full topic


Loading Tiled Maps from MonoGame.Extended XNB

$
0
0

@Kimimaru wrote:

I've heard many things about Tiled and decided to look into it. I used MonoGame.Extended's very useful content processor for importing a TiledMap. It builds correctly, but I can't actually load the map at runtime.

Here's my code:

public TiledMap LoadMap(in string mapName)
{
    return LoadAsset<TiledMap>(mapName);
}

Here is my Content.mgcb file:
https://imgur.com/cbXaki9

Finally, here is the output when I make a build:
https://imgur.com/bPxiMSn

My Content root directory is set to "Content/" and I am able to load everything else fine. I have confirmed that the file path to the .tmx file is correct. The .tmx, .tsx, and processed XNB file for the tile image are all in the same directory. The inner exception indicates it's looking for a file named "BG2.xnb," which would mean I have to process the .tsx file as a tileset, but there is no such option for any of the importers. Any ideas?

Posts: 3

Participants: 2

Read full topic

MonoGame.StaticBatch - could be useful to some of you guys :)

$
0
0

@GeonBit wrote:

Hi all,

I wrote a lib that takes a lot of static sprites and merge them into a grid of render targets, then draw only the visible textures using a simple grid-based culling.

Here's a screenshot to illustrate what I mean:

In the pic above instead of drawing all those skeletons, trees and tiles separately, they were merged into a grid of textures (marked with white lines) during initialization, so now we only need to draw 9 textures to show them all. It reduced ~1500 draw calls to 9.

For more info / get the lib:

https://github.com/RonenNess/MonoGame.StaticBatch

From a test scene I made with +180K sprites, I got the following results:

  1. Using static batch: 6400 FPS.
  2. Drawing everything: 9 FPS.
  3. Drawing only visible sprites (bounding-box culling): 300 FPS.

I think its pretty nice :slight_smile:
But ofc the price is in RAM, the bigger your scene the more textures it creates, so watch out for that.

Have fun, and let me know if you have any questions.

Posts: 1

Participants: 1

Read full topic

Is this possible using a simple shader?

$
0
0

@DexterZ wrote:

  • Have a quad which is invisible
  • Compute the Quad Plane of it and pass it to Shader params ?
  • The object is constantly moving towards the quad
  • Maybe in pixel shader before drawing the pixel test it against the plane ?
  • I have limited knowledge in shader, any hint or idea what I should implement is very much appreciated ^_^y

Posts: 2

Participants: 2

Read full topic

How do I go about adding a player object onto a fixed isometric TiledMap object?

$
0
0

@thefrostwyrm wrote:

New to extended. Managed to get my tiled map rendered last night but realized I didn't know how to properly manipulate the TiledMap object. Does anyone have any code samples on how they went about doing so? (i.e, adding characters/objects to tiles, changing tiles, selecting tiles etc).

I've taken a look at the demos but I couldnt understand how it managed to connect the player to a tile, if it did so at all.

EDIT: I've managed to dig up this thread from 2 years ago:


Has the situation progressed since then?

Posts: 1

Participants: 1

Read full topic

Smooth Parallax Scrolling for Low Res 2D Game

$
0
0

@mikehaggar wrote:

Is there a viable solution for this? Background parallax layers have a very small threshold for movement less than one pixel a frame before their scrolling becomes choppy (at 60fps). You can have the layer move 1px every 2, 3, or 4 frames and still sell the illusion of smooth movement, but any movement smaller than that (1px every 5 or more frames) and the illusion of smooth movement is broken. I've Google'd this pretty extensively and haven't come up with much...

Posts: 15

Participants: 8

Read full topic

Moving from XNA content to MonoGame content... (.TXT Files)

$
0
0

@IceIYIaN wrote:

In XNA, you simply copy your folder, Textures, paste, then the next folder, Sounds, paste... Hit compile and you're good to go. In MonoGame, it looks like you just click Add Existing Folder. Seems all is well.

However, for localization / maps I use .TXT files. Using these files I have to manually go to Properties and switch the Build Option to None and Copy to Output Directory to Copy Always...

Is there anyway to automate this process? (Holding SHIFT can speed up the process, but is still so time consuming).

Also, I use a different name than "Content", I tried changing the name, but it's still putting the compiled files in Content and not the specified name... How do I fix this?

Posts: 2

Participants: 2

Read full topic

Trying to get an idea of the math involved (details inside)

$
0
0

@Ceemo wrote:

Hey guys, I'm currently doing some exercises over at Khan Academy, just to brush up on my math skills. I was one of those kids in high school that didn't take classes very seriously, but I'm no idiot (although I may act that way at times) :wink:

I'm trying to get an idea of the level of math I should get into, in order to take on a game that has projectiles, animations, and collisions. Shaders will more than likely be absolutely necessary (and I'm scared to death of them), so that's also something to keep in mind.

My programming venture will not begin for about a year or so. Therefore, I am taking that time to level up my math skills. What sort of math would you recommend?

Let's assume I know everything up to, and including algebra/geometry.

Algebra II? Trig? Calculus?

I won't pretend that I will be able to master any of the above in a reasonable time frame, but would a good grasp of the fundamentals of the above be crucial for coding things like projectiles, physics of moving things, such as jumping, throwing, bouncing, floating, water, and collision?

I have a brother-in-law that teaches high school physics/math, so I have a tutor at my disposal :wink:

Any advice would be appreciated. Thanks!

Posts: 3

Participants: 3

Read full topic


Build and Deploy Content without IDE

$
0
0

@mhughson wrote:

Hi,

I would like to distribute the binaries for my game to the artist I am working with, so that they can iterate on the content locally.

However, it seems like the "copy content from content folder to executable folder" step is part of the Visual Studio build process, and not something that the MonoGame Pipeline Tool can handle (as it simply builds the content

Is this a correct assumption? Is there an easy way to allow artists to iterate on content without them building the game themselves? Perhaps I just need to write a little batch file to manually do the copy?

Thanks!

Posts: 2

Participants: 2

Read full topic

Simple 2d bloom effect (VB)

$
0
0

@MuntyScruntFundle wrote:

Is there a simple bloom example yet anywhere written in VB?

I've downloaded a couple of examples in the past but I've run in to huge problems converting the code.

Any ideas?

Thanks folks.

Posts: 1

Participants: 1

Read full topic

more than one kind of update function? also, hi!

$
0
0

@Mouse wrote:

hi everyone!
my name is su, but feel free to call me mouse =]

I'm a game developer with about ~ seven years of programming experience - mostly with gamemaker's GML, but also a little bit of python [though that was a very long time ago], and c# has rapidly become my favourite language of all time =]

I've been evaluating monogame for my future projects, and it looks great - but there's one thing I can't seem to work out how I would go about coding.

the way I've always done moving platforms in gamemaker is to basically:
- have the platform calculate their next position,
- have everything check if they are on the platform,
- have the platform move, and then
- have the things on the platform move accordingly, taking into account the platform's new position.

obviously, this isn't possible with just one update function - you'd need at least two for this scenario, and due to one reason or another I'm currently using all three [called "begin step", "step", and "end step" - I'd like to clarify that these are built-in names, not my own] in my current gamemaker project.

as far as I can tell, using monogame the way it's supposed to be used only allows for a single kind of update - the GameComponentCollection class is sealed. is there any way to get around this limitation? or maybe, there's some way of thinking that would make them unnecessary?

Posts: 2

Participants: 2

Read full topic

Jagged movement due to low resolution

$
0
0

@jameshc wrote:

Hi all, I'm trying to make a basic platformer with a tile based system. Each tile is a 16x16 texture. Because of this I am using a very low resolution then scaling it up using a render target.
An unfortunate side effect of the low resolution is that my characters movement can look very jagged, especially when they are in the air moving slowly. Here is a video clip of it:

This only happens when I force the character to be drawn to the nearest pixel. If I don't do that then the player looks very blurred.
One solution I have been thinking of is to scale all the textures up by 4 in photoshop and have the game run at 4 x the current resolution. However this means the player can move between pixels.
I watched some gameplay from mario bros and it looks very smooth despite the low resolution how did they achieve this?
Is my solution a good idea? Is there anything else I can do?
Help would be greatly appreciated.

Posts: 1

Participants: 1

Read full topic

How to use GraphicsDeviceManager in different class?

$
0
0

@erawein wrote:

I have a class with a method to create a sqaure

namespace Game1 {

public class Rectangle {

    Texture2D quadl;
    GraphicsDeviceManager graphics;
    

    public Rectangle() {

        graphics = new GraphicsDeviceManager(this);
       \\ this underlined saying cannot convert from game1.rectangle to microsoft.xna.framework.game

    }

    public void size() {

        quadl = new Texture2D(this.GraphicsDevice, 100,100);
        \\ GraphicsDevice underlined
    }    
}

}

I then call that in my game1 class in the draw method.

However mentioned in the comments there are some errors

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Viewing all 6821 articles
Browse latest View live