pmgl / microstudio

Free, open source game engine online

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Areas in Maps

ben0bi opened this issue · comments

Maps should have invisible Areas which you can define in the map editor by clicking, dragging and releasing the mouse. They should be available in the map itself and should be can-be-checked with a collide function.

For that feature, the map editor should have a new layer where you can define the areas - and the map is visible underneath. Areas should be visible in map editor but not in game.

Areas should have the following properties: x1,y1, x2,y2 - area, respecting the map size on the game view or...something. name - the name of that area, will be displayed in the rect of the map on the map editor.

type - type of the area for better programming. e.g. "block", "snow", "map change"

target - a string defining the target of this area, e.g. a map name or an object index.

Programmer should have freedom using type and target. name can be same on different areas. When you get the area by name, it gets ALL the areas with the same name (on the same map).

Map functions (suggestions):
maps[mymap].getAreas()
maps[mymap].getCollideAreas(targetx, targety)
maps[mymap].getAreasByName(name)
maps.getAreasByName(name) maps.getCollideAreas(mapname, x, y)

Hope this will be implemented because it's very hard to make a real game by writing all the colliding areas by hand in text. Only the graphical maps is a little to less for a "big" game like microVerse, where I am sitting at right now.

Thanks for your consideration.