Thanks for making such good content! I am very new to object-oriented programming and am currently about halfway through Whitaker's C# Player's Guide textbook. Your videos are a huge inspiration for me to get over the sticky topics. Once I finish the textbook I plan to hop into MonoGame.
Dude, your videos improved soooo much. I am currently developing a game in MonoGame and your videos are very helpful. I just have one question: Why do you have a global helper class for stuff like spriteBatch? Wouldn't it be "cleaner" if, for example, the spriteBatch would be passed along in the Draw() method as a parameter?
Thanks! Passing it everywhere as a parameter might be considered clean OOP, yes. But I opted for this "workaround" as it significantly reduces the amount of code (passing the parameter through multiple layers). And since there is only one spritebatch, I am OK with that. As an example: When developing a Console application, you are not passing "Console" to every class, you simply call "Console.WriteLine(text);" from anywhere.
Hello, recently I follow your channel and your videos, they are very interesting and very well explained, I would like to know if you can make a video about Tiled and monogame, load tmx files and collision with tiles. Thanks a lot
Thanks! As I tend to do most of the things "my way - from scratch", I haven't used Tiled (yet). But since you are not the first one to mention this, I might take a look at it.
I’d suggest 1) not using a different texture for each tile, as that means more spritebatch flushing and 2) not storing the tiles in the map as sprites, but rather as ints to index the sprites.
@@GameDevQuickie although you only call SpriteBatch.Begin() and SpriteBatch.End() once, each time you call SpriteBatch.Draw() with a new texture, SpriteBatch sends whatever is in the batch to the graphics card, even if you haven’t called End() yet. For the Sprite references, I was just recommending storing the tiles as ints instead of sprites so that you could just use the tile to index part of a texture. You don’t obviously have to do any of this, but if you expanded your tile map system into something bigger, you would run into performance issues.
@@thedoubtfulhost I read through the framework codebase and found only this: SpriteBatch.Draw flushes only for the SpriteSortMode.Immediate github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Graphics/SpriteBatch.cs line 413 The thing you are referring to might be inside the SpriteBatcher class, method DrawBatch, which is called with the SpriteBatch.End() github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Graphics/SpriteBatcher.cs line 204 Not sure, feel free to correct me :-) This could be a performance issue indeed. I agree a tile spritesheet (atlas) is a very good choice here. (Not used as it wasn't the primary topic. Can be seen in another episode - Spritesheet animation, for those who are interested.)
I've been looking for a simple guide on how to have a world bigger than the screen in 2D for ages - thanks so much!
Thanks for making such good content! I am very new to object-oriented programming and am currently about halfway through Whitaker's C# Player's Guide textbook. Your videos are a huge inspiration for me to get over the sticky topics. Once I finish the textbook I plan to hop into MonoGame.
same bro
This video was really useful!
Your tutorials are great! Thanks!
Keep up the great work!
Thank you for the tutorials. Can you please do a tutorial on autotiling the tilemap ? Thanks again.
Dude, your videos improved soooo much. I am currently developing a game in MonoGame and your videos are very helpful. I just have one question: Why do you have a global helper class for stuff like spriteBatch? Wouldn't it be "cleaner" if, for example, the spriteBatch would be passed along in the Draw() method as a parameter?
Thanks! Passing it everywhere as a parameter might be considered clean OOP, yes. But I opted for this "workaround" as it significantly reduces the amount of code (passing the parameter through multiple layers). And since there is only one spritebatch, I am OK with that. As an example: When developing a Console application, you are not passing "Console" to every class, you simply call "Console.WriteLine(text);" from anywhere.
@@GameDevQuickie Thanks, that makes sense!
very useful !
Thanks! Glad you like it.
Hey i use visual studio and i clicked on cross-platform something something openGL but when i open the file theres nothing there how do i fix?
Watch the latest video and get a new template
Love your content m8! What text-to-voice tool is that? If you dont mind me asking. Been looking for one myself for Monogame content..
Thanks! speechelo.com/
Hello, recently I follow your channel and your videos, they are very interesting and very well explained, I would like to know if you can make a video about Tiled and monogame, load tmx files and collision with tiles. Thanks a lot
Thanks! As I tend to do most of the things "my way - from scratch", I haven't used Tiled (yet). But since you are not the first one to mention this, I might take a look at it.
I’d suggest 1) not using a different texture for each tile, as that means more spritebatch flushing and 2) not storing the tiles in the map as sprites, but rather as ints to index the sprites.
Hey, not sure what you mean by either of these.
1) the whole map is drawn in one batch
2) the sprites reference one single instance of each type
@@GameDevQuickie although you only call SpriteBatch.Begin() and SpriteBatch.End() once, each time you call SpriteBatch.Draw() with a new texture, SpriteBatch sends whatever is in the batch to the graphics card, even if you haven’t called End() yet. For the Sprite references, I was just recommending storing the tiles as ints instead of sprites so that you could just use the tile to index part of a texture. You don’t obviously have to do any of this, but if you expanded your tile map system into something bigger, you would run into performance issues.
@@thedoubtfulhost I read through the framework codebase and found only this:
SpriteBatch.Draw flushes only for the SpriteSortMode.Immediate
github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Graphics/SpriteBatch.cs
line 413
The thing you are referring to might be inside the SpriteBatcher class, method DrawBatch, which is called with the SpriteBatch.End()
github.com/MonoGame/MonoGame/blob/develop/MonoGame.Framework/Graphics/SpriteBatcher.cs
line 204
Not sure, feel free to correct me :-)
This could be a performance issue indeed.
I agree a tile spritesheet (atlas) is a very good choice here. (Not used as it wasn't the primary topic. Can be seen in another episode - Spritesheet animation, for those who are interested.)
🤪 【promosm】