Hello guys, I am releasing my "tile map editor", it is very simple right now but it gets the job done
.
Features:
- Load .nyb configuration files
- Loads textures only once.
- scrolling camera with Left/Right Up/down buttons
- right mouse button deletes tiles
- left mouse button creates current selected tile
Notes:
- the .nyb file contains the map name, map Width/Height, the tile size, map file and map texture. the files MUST be in the same directory for it to properly load them.
- It uses a texture cache class to load textures, this prevents re-loading the same image more than once
- My current camera class is much better than the one in this project and has the ability to lock on to targets, this can be easily implemented here.
DOWNLOAD:
http://www.mediafire.com/?q1zwta1vv1q38q1How to use:
1. You can either generate a map by creating a new mapEdit object like this:
Ccamera mapCam(640, 480);
mapEdit oMap("My map", 40, 40, 32, "tileSet.png", mapCam);
Or like this :
Ccamera mapCam(640, 480);
mapEdit oMap(mapCam);
oMap.generate("My map", 40, 40, 32, "tileSet.png", mapCam);
First is map name, then map width, map height, tilesize, tileset texture (PATH) and camera object,
after that you can edit your newly created map and save it.
To load a map is rather easy this is how :
Ccamera mapCam(640, 480);
CmapEdit oMap(mapCam);
oMap.loadConfig("map00/map00.nyb");
and the map will be loaded using the loadConfig(std::string& _mapConfig); function, you can also load it at anytime using this function instead.
2. There are a couple of stuff I need to fix specially some of the mapEdit functions, I will fix them and update you guys.
Controls:
1. Scrolling : Left/Right, Up/Down ( scrolls through the map ).
2. Placing tiles: mouse left click.
3. Deleting tiles: right mouse click.
4. changing tiles: A/S - A to move forward on the tile sheet and S to move backwards.
5. Save map: just press the X button on your keyboard.
Things to come:
- Map clearing: a single press of a button and clear out the whole map
- map generation/loading input: I'm going to implement a better way to load and create map files by input rather then having to manually edit the code
Please leave comments/criticism/feedback if you want.
You can use this however you please, but don't claim as your own
, I encourage to expand on it too and share!!
Media:
DOWNLOAD:
http://www.mediafire.com/?q1zwta1vv1q38q1