Considering getting GM but I have a couple of questions

Discussion in 'Programming' started by MrChoke, Oct 9, 2019.

  1. MrChoke

    MrChoke Member

    Joined:
    Oct 9, 2019
    Posts:
    15
    Hi. I have started reading some doco and watching some tutorials on this. So far it looks like a great way to get a game up and running quick. But before I dive in further and buy it, I wanted to ask a detailed question. Also note, I am an experienced developer so I can handle whatever this may require.

    I understand the concept of rooms and tiles and how to place them down in the editor. But can we create either of them dynamically real-time? I can probably get by without having rooms created dynamically but for sure I'll need tiles. The adventure game I have in-mind has a real-time generated layout. So I have to be able to build wall and room tiles during game start.

    Does anybody know if this is possible?

    Thanks.
     
  2. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,535
    Yes, you can create tile layers and set tiles programatically using the tile functions.
     
    MrChoke likes this.
  3. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,535
    @MrChoke Just to add, you cannot yet create tilesets programatically, nor load them in externally as you can't programatically convert sprites into tilesets for some reason, so you have to have the tileset setup in the IDE beforehand.
     
    MrChoke likes this.
  4. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,742
    You could also use objects for everything, which could be more convenient depending on what you need to do... tiles need to be aligned to a grid, have set size, cannot move, always take up an entire grid cell, but in return are much faster and less resource-expensive. Object instances can move and run code, does not need to be grid-aligned, can be stretched and rotated (and can even draw things completely independent of their sprite/collision mask if you want), but use more resources. And there's a middle ground called "asset layers", which is where you place sprites onto a layer directly... they're basically objects without logic. Collision checking with them is a bit limited and messy compared to objects/tiles, so asset layers are more useful for inert decorations.

    Of course, you have the fourth option: handle collisions using your own logic and never create objects/tiles/assets, and just draw sprites wherever you want based on your collision data. That's kinda reinventing the wheel, though, but it's an option.
     
    Toque and ParodyKnaveBob like this.
  5. MrChoke

    MrChoke Member

    Joined:
    Oct 9, 2019
    Posts:
    15
    Thanks for the replies. Another question. How big can a room be?
     
  6. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,742
    There's no limit. Not sure if tilemaps need to allocate memory for an entire grid or if they're sparse, could be worth looking into that if you plan to use them, but for assets / object instances, it doesn't matter if their coordinate is 5 or 5,000,000, it's just a number. (And it's possible to move the view outside the room boundaries if you control view movement and background drawing yourself, so you can use an area even larger than the infinitely-sized rooms if you want to!)
     
    DaMuffin likes this.
  7. MrChoke

    MrChoke Member

    Joined:
    Oct 9, 2019
    Posts:
    15
    Wow, that is great. I am definitely going buy this and start coding!
     
    ParodyKnaveBob and Toque like this.
  8. Toque

    Toque Member

    Joined:
    May 25, 2017
    Posts:
    1,050

    Sounds good. Have fun. I think watching a few tutorials would give a good feel for the engine.
     
  9. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,742
    Just stay away from HeartBeast's tutorials... some of the stuff advocated in them, like using the built-in physics system (meant to simulate ragdolls and stuff like that) for overworld movement in an RPG, makes things a lot more complicated than they need to be.
     
  10. MilesThatch

    MilesThatch Member

    Joined:
    Jul 12, 2016
    Posts:
    422
    Ouch. He has some good tutorials. Discounting ALL of his content just because he may have not picked the most optimal option for one is not a good enough reason. Everyone learns, you can still learn quite a bit in the meantime.
     
    DaMuffin and Catan like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice