Jump to content

How to Develop Game where you can destroy your environment?


thefootballguy
 Share

Recommended Posts

It's not a simple thing to do, hence the lack of much in the way of examples, but, having said that, there are loads of examples of using tilemaps and most of those involve stuff like animating tiles, which means they deal with changing individual (or grouped) parts of the tilemap which means you can have those mutations driven by user action (i.e. when they blow up part of the world).

Depends entirely on what sort of game you're making. Phaser is 2d, so if you're planning on something similar to a top-down Minecraft then its simply a matter of changing the tilemap. Your tiles become discrete values in your system, and you either change them as the user interacts or maybe you can add items to it, if so, just add layers to your tilemap. Same for a 2d side-scroller, manipulating your world is just a matter of changing the map, which is likely a problem you'll be handling anyway.

Generating and storing an infinite open world is a much more significant challenge. Ideally you just want to generate your chunks (or areas or whatever you want to call it) and store the whole lot, changes and all. You can be smarter though. If you have your areas generated via some sort of algorithm (stuff like perlin/simplex can be seeded, you give it the same seed and you always get the same result) then you only need to store changes to the world and there are far far fewer of those than there are discrete 'tiles' in your world.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...