Jump to content
  • Advertisement
Sign in to follow this  
Tantere

Help with tilemap engine?

This topic is 4061 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Now I need to create tilemap engine for my game, tiles are 32*32. I need to create tilemap engine with C++ and SDL. I created simple tilemap engine for one of my SDL games, but the map data was in a .txt file: Like 0, 0, 1, 1, 2, 5, 5, 0, etc. But now I would like to create more advanced tilemap engine, that the maps would be created inside the code and/or with mapeditor. I have no idea where I should start to create the tilemap engine.. Any tips?

Share this post


Link to post
Share on other sites
Advertisement
Hi Tantere,

What do you mean by more advanced tilemap engine?. What you have there is adequate for what you are doing and is what most people do when they start off i.e. place the tile data into an external text file and load in as necessary. Looks good enough to me.

MAMEman.

Share this post


Link to post
Share on other sites
Tilemap engine like in most of the 2D games.

You create map with editor, and save it with the editor for example as test.map. If you open the test.map with text editor, it doesn't show you: 0, 3, 1, etc. I shows you something like "b4IœÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ-?ÿÿÿÿÿÿÿ". Something that you cannot read. You need the game's editor to open it.

Share this post


Link to post
Share on other sites
Oh, I see. Well, it's mostly done in hex code (and possibly some kind of encryption). If you don't know what hex is you can read some about it here:
http://en.wikipedia.org/wiki/Hexadecimal
Note that you'll also need an hex editor.

However, this is not a recommended way if you still are in the learning stage as it requires that you know a thing or two.

Share this post


Link to post
Share on other sites
Quote:
Original post by HomerSp
Oh, I see. Well, it's mostly done in hex code (and possibly some kind of encryption). If you don't know what hex is you can read some about it here:
http://en.wikipedia.org/wiki/Hexadecimal
Note that you'll also need an hex editor.


Eh?
I mean, maps like in these games, the maps are made with the game's map editor.

Like in these following games...
R: http://crimsonengine.com/R/main.html
Tapan Kaikki: http://www.acid-play.com/download/ultimate-tapan-kaikki/
We Got Explosives 2: http://koti.mbnet.fi/jonneweb/img/pelit/kuvat_/we_got_explosives21.jpg

Try searching from google for more info.

Share this post


Link to post
Share on other sites
There is nothing advanced about it. All it is doing is storing the map in a binary format which you may be able to 'read' in a hex editor.

Share this post


Link to post
Share on other sites
Yes, but you can't just create an map editor without having a map file structure.
And most map files are made in hex, that's why you see those weird characters.

Share this post


Link to post
Share on other sites
Quote:
Original post by HomerSp
Yes, but you can't just create an map editor without having a map file structure.
And most map files are made in hex, that's why you see those weird characters.


I know, but I need help with the tilemap structure.. Like what variables do I need, etc.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!