Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Map00(tile editor) - binary + source  (Read 3302 times)

0 Members and 2 Guests are viewing this topic.

Nybble

  • Newbie
  • *
  • Posts: 17
    • View Profile
Map00(tile editor) - binary + source
« on: May 18, 2012, 06:58:40 am »
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/?q1zwta1vv1q38q1

How to use:

1. You can either generate a map by creating a new mapEdit object like this:
Code: [Select]
Ccamera mapCam(640, 480);
mapEdit oMap("My map", 40, 40, 32, "tileSet.png",  mapCam);
Or like this :

Code: [Select]
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 :
Code: [Select]
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:
Quote
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
« Last Edit: May 18, 2012, 07:39:51 am by Nybble »

OutlawLee

  • Jr. Member
  • **
  • Posts: 50
  • This is my personal text. Dont read it.
    • View Profile
    • Email
Re: Map00(tile editor) - binary + source
« Reply #1 on: May 24, 2012, 02:04:54 pm »
Thanks, gonna try it now.

Nybble

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Map00(tile editor) - binary + source
« Reply #2 on: May 26, 2012, 12:54:37 am »
Sure thing, let me know what you think, How can I improve it? what features would make it better? etc any input.

 

anything