How to make a Tilemap & Camera using MonoGame

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 23

  • @Arashi256
    @Arashi256 Рік тому +5

    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!

  • @lwsCN500
    @lwsCN500 Рік тому +4

    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.

  • @diligencehumility6971
    @diligencehumility6971 Рік тому +2

    This video was really useful!

  • @LucasDiasFerreira
    @LucasDiasFerreira Рік тому +1

    Your tutorials are great! Thanks!

  • @jackiedaytona1017
    @jackiedaytona1017 2 роки тому +1

    Keep up the great work!

  • @ahmadtakhimi6839
    @ahmadtakhimi6839 Рік тому +1

    Thank you for the tutorials. Can you please do a tutorial on autotiling the tilemap ? Thanks again.

  • @Rastla
    @Rastla 2 роки тому +1

    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?

    • @GameDevQuickie
      @GameDevQuickie  2 роки тому +4

      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.

    • @Rastla
      @Rastla 2 роки тому

      @@GameDevQuickie Thanks, that makes sense!

  • @ananths1122
    @ananths1122 8 місяців тому

    very useful !

  • @dnbc177
    @dnbc177 Рік тому

    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?

    • @GameDevQuickie
      @GameDevQuickie  8 місяців тому

      Watch the latest video and get a new template

  • @adamgustafsson7703
    @adamgustafsson7703 2 роки тому

    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..

  • @JorgeContreras-mq4ni
    @JorgeContreras-mq4ni 2 роки тому +2

    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

    • @GameDevQuickie
      @GameDevQuickie  2 роки тому

      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.

  • @thedoubtfulhost
    @thedoubtfulhost Рік тому

    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
      @GameDevQuickie  Рік тому

      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

    • @thedoubtfulhost
      @thedoubtfulhost Рік тому

      @@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.

    • @GameDevQuickie
      @GameDevQuickie  Рік тому

      ​@@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.)

  • @chelsiepinero108
    @chelsiepinero108 Рік тому +1

    🤪 【promosm】