Wednesday, November 27, 2019

collision detection - 2D Level design/editing/saving questions



I thought about making a simple 2D Sidescroller game like SuperMario. Then i wondered about how to save, load or create the levels for the game. The first thing i thought of was drawing a simple blocky png which represents the level, an making all the parts where the player can walk a special color (maybe lilac). I would import the level in blocks or tiles so i could check for collision.


so my questions are:
are there better methods for this?
what are the professional methods for this?

should i do this with Tiles and a Map editor based on tiles? (for some reason i dont like this, but i guess if its the best method i would use it)
with a tile based level, how would you realize slopes, and how would you check them for collisions?



Answer



For an 2D MMO we use http://www.mapeditor.org/. We use several layers for background, background decoration, objects on the same level as the players and objects in front of the player. And an additional layer with just one red square to mark collisions.


I am not sure if this appoach or the software works out for an 2D side scroller but it may be worth to have a look at it.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...