Sign in to follow this  

Managing Tilesets

This topic is 4038 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

Can anyone help me out with this? I'm using C++ and the Win32 API (no MFC). I want to load tilesets into my map editor. Should I just load them from a specific directory such as C:\Map Editor\Tilesets\ store them in an array? If not, how else would I do it? I need some input on how most of you seasoned programmers manage your tilesets in a map editor. Thanks!

Share this post


Link to post
Share on other sites
I wrote a map editor recently. The way I handled tiles was to have the user, when they create a new level, to also select a scheme file. This file described the tiles to use a bit like:


block 32 "grey block" img "C:\Graphics\grey.bmp"
block 10 "blue block" img "C:\Graphics\blue.bmp"
block 19 "teleport" rgb 127 127 127


This allows the scheme file to specify any combination of bitmaps, solid-filled colours and so on. The scheme file is specified at the start of the level file (just ignored when the game loads a level file) and seems to be working out as quite flexible.

Hope that is the kind of thing you were looking for. Quite a big and general issue this.

Share this post


Link to post
Share on other sites
Well, EasilyConfused easily confused me, because I've never heard of a scheme file and only have about a year-and-a-half of C++ under my belt.

As for you, michael879, I am writing my own map editor from scratch. I want it to be able to be used for future projects, so I can't just store my filenames in an array. The tilesets I will use per game will differ, and I don't want to have to go directly into the code to change the tileset filenames for each different game.

Like I said yesterday, I was thinking of just using a specified folder directory for tilesets (that can be changed by the way). For example, if any of you have played unreal tournament, you know that new created maps go under the Unreal Tournament\Maps\ folder. I was thinking of doing something like Editor\Tilesets\sample_tileset.bmp (or .tls or something). Is that an effecient way of using them? Or is there a better way?

Any suggestions or guidance would be helpful.

Edit: BTW, I have created a game before (yes, a fully functional color windows game, not a DOS console game), so I think I am ready for this.

Share this post


Link to post
Share on other sites
Sorry to confuse.

The scheme files for my map editor are just plain text files that specify the paths to each tile graphic. I also wanted an editor I could use to create levels for different games and this was my solution.

If you want to keep it simpler, you could put all the tiles for a game on a single bitmap and have the user select the bitmap they want to load. If you put all the tile images in one directory, I don't see how the editor could know which ones were for which game.

Anyway, I just wanted to clarify what I meant by "scheme file" really. Just my fancy name for a text file containing configuration instructions.

Share this post


Link to post
Share on other sites
That's the general idea. The way I have it is to have different scheme files for different games, but if I wanted to add new tiles to an existing game, it is just a question of using Notepad or something to edit the scheme file.

I suppose a more fully featured level editor would have the capacity within the editor to modify the schemes through some kind of user interface.

Share this post


Link to post
Share on other sites

This topic is 4038 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this