I always add code to force a slowdown syndrome effect where no Update is called without a Draw. The natural Draw skip assumes the slowdown is from graphics. XNA didn't consider most indie programmers would make slow CPU code and the GPU would eat up anything they could throw at the Xbox 360 or PC. This causes a feedback loop where you miss more and more Draw calls until it reaches the lowest limit of 2 frames per second, and then the game jumps ahead with a Draw call for dozens of Update. Your character is now on the other side of the screen suddenly. 😊
Thanks for this video! Diving into Monogame after using Unity since 2015. Before that I first started learning programming with XNA (had no clue what I was doing back then). It's really neat to jump back into a framework with a ton more experience over a decade later. But wanted to lookup some pitfalls to avoid early on and this video was perfect for that!
Great info for beginners and experts alike. Learning Monogame/C# is full little "gotchas" that require a keen eye in your code and your design overall.
Some good lessons overall, Layer Depth defo helps organise sprites better. I've found that rule 3 can't always be strictly followed depending on the complexity of your game. For example you can't change the Effect/Shader you pass to the renderer without calling additional .Begin() + .End().
Great tips. By the way, separating logic code from drawing code is not only recommend for the reason you mentioned. It's also recommend in cases when drawing is unnecessary (like on a server where there's not point to draw as you just need to receive input from the clients) in order to reduce GPU strain.
I happen to be obsessive when it comes to lesson #6. It might be a good a thing generally speaking. But having an unfixed bug will often prevent me from going to sleep. It's rather annoying.
Here's a seventh one from me : Stop searching for comparisons between programming languages or frameworks day and night ! Just pick one. I say this because I was obsessed with finding the most performant and pleasant technology to work with but such this doesn't exist. Each framework or programming language has flaws and ups.
Well, separating different systems inside different Draw batches is not really a bad thing, for example: you could separate game rendering inside a Begin()+End() and the game UI inside a different one... As long as you draw stuff in batches you should be gtg
I always add code to force a slowdown syndrome effect where no Update is called without a Draw. The natural Draw skip assumes the slowdown is from graphics. XNA didn't consider most indie programmers would make slow CPU code and the GPU would eat up anything they could throw at the Xbox 360 or PC. This causes a feedback loop where you miss more and more Draw calls until it reaches the lowest limit of 2 frames per second, and then the game jumps ahead with a Draw call for dozens of Update. Your character is now on the other side of the screen suddenly. 😊
Thanks for this video! Diving into Monogame after using Unity since 2015. Before that I first started learning programming with XNA (had no clue what I was doing back then). It's really neat to jump back into a framework with a ton more experience over a decade later. But wanted to lookup some pitfalls to avoid early on and this video was perfect for that!
Good info. #5 is one I learned programming games in general, but the other four were new. I'm gonna have to look into state machines now.
Thanks! The Monogame Mastery book uses a state machine in the video game it shows you how to build.
Great info for beginners and experts alike. Learning Monogame/C# is full little "gotchas" that require a keen eye in your code and your design overall.
Some good lessons overall, Layer Depth defo helps organise sprites better. I've found that rule 3 can't always be strictly followed depending on the complexity of your game. For example you can't change the Effect/Shader you pass to the renderer without calling additional .Begin() + .End().
Thanks! I haven't played with effects or shaders much, so I didn't think of that.
Unsure if you can change the Wrap or Filter modes either...
Great tips. By the way, separating logic code from drawing code is not only recommend for the reason you mentioned. It's also recommend in cases when drawing is unnecessary (like on a server where there's not point to draw as you just need to receive input from the clients) in order to reduce GPU strain.
Thanks!
I happen to be obsessive when it comes to lesson #6. It might be a good a thing generally speaking. But having an unfixed bug will often prevent me from going to sleep. It's rather annoying.
Same here.
Here's a seventh one from me :
Stop searching for comparisons between programming languages or frameworks day and night !
Just pick one.
I say this because I was obsessed with finding the most performant and pleasant technology to work with but such this doesn't exist. Each framework or programming language has flaws and ups.
Where you find monogame tutorial
docs.monogame.net/articles/tutorials.html
Nice. Thanks for sharing your lessons :D
You're welcome!
Well, separating different systems inside different Draw batches is not really a bad thing, for example: you could separate game rendering inside a Begin()+End() and the game UI inside a different one... As long as you draw stuff in batches you should be gtg
Cool. Also have you ever heard of OpenTK?
I've heard of it, but haven't used it. It sounds interesting though.
2:05 The book man of game mastery??? Can you tell me the name of that book??
The book is called Monogame Mastery.
❤