Sign in to follow this  
  • entries
    29
  • comments
    35
  • views
    17898

Wishes

Sign in to follow this  
walle

288 views

I have been looking at both Stompy9999, with Blocky Man and EasilyConfused with Udo and I have been really inspired to make a platformer. This is something that I have wanted for a long time, but never really got that far with, the farthest I ever have been is this. which isn't very good.

So well now I'm gonna make another swing at it. Starting with a good map format and a decent level editor. And this is what I'm gonna describe here. If it sucks, please tell me so, so I don't spend a lot of time(that I don't have) on something worthless.

Basically I want a map format I can use for all tile based games I'm gonna make, and if it's good share with people to make their game making easier. So it have to be quite general. I don't really know how to accomplish this yet. Say if I use a SDL_Surface to store the images it is bound to SDL and so on, the best idea I've come up with is to only use graphics in one class and then if I want to use another API then just change the base class. Or if people want to use their own sprite class, they just change my sprite class with their own. But well I'm gonna make some more looking into it before I make a decision.

Anyone played and looked at SMC (Secret Maryo Chronicles)? They have a level editor thats basically like the one I want to make, you can position every tile diferent, each tile has own coordinates not tile coordinates that are multiplied with the tile width to get the position. This is how I want to make my maps. So I'm gonna make every tile a sprite, basically.

Well here comes the early sketch of my map format:

------------------------

- Entity
The ultimate base class, contains data everything has, mass position and velocity is the first to come to mind, perhaps some more data.

- Sprite : Entity
The sprite class, the one people change to use different API and such, provides drawing, moving, animation, collision and such.

- Image : Entity
Basically a static(non-animated) sprite.

- Tile : Entity // This may be unnecessary
A tile is either a image or a sprite.

- Layer
A layer contains a list of Entities, when you add a Entity you add it to the list of the layer.

- Map
Contains a list of layers to support multiple layers. Contains map data, name background image and such.

- MapHandler
Contains functions to save and load levels.

------------------------

The Entity, Image, Sprite, Tile, Layer and Map classes are gonna be serialization able. And the map file contains a serialized Map. In binary format.

Well that is about how far I've come. Sounds good?

If you got this far: Thanks for reading [smile]!
Sign in to follow this  


3 Comments


Recommended Comments

Hey walle.

I've been playing around with a general purpose map editor for a while now and have one that is proving quite flexible.

Regarding the problem of different graphics formats and so on, what I've chosen to do, since I use my own custom sprite file formats for the games, is require myself (or another user) to supply a seperate bitmap to the map editor to represent the tile.

While this seems like a bit of duplication in some respects, it has proved pretty flexible. When you create a new map with the editor, it asks you to specify a scheme file, which is just a text file that determines the size of the blocks, and a list of actual blocks to use, each of which specifies a bitmap.

Obviously I'm not supporting animations in the map editor though, so I don't know if that solution would work for you.

I don't think there is anything wrong with having to provide different format graphics to the map editor than to the game though, unless the work involved is prohibitive, since it decouples the game from the map editor and the user does not have to ship the map-editor-support graphics with the actual game.

Sounds like you are embarking on a couple of projects very close to my heart so I'll keep a close eye on this journal now. [smile]

Share this comment


Link to comment
Well I haven't really thought about the level editor and how the tiles are going to be represented, but it is good that you brought that up, so I can think about it when I make the level editor.
As I said before, you are a big reason that I embarked this quest :)
And I hope that you do view this journal and comment to share your wisdom, I will try to keep it so up to date as I can.

Share this comment


Link to comment
Well I haven't really thought about the level editor and how the tiles are going to be represented, but it is good that you brought that up, so I can think about it when I make the level editor.
As I said before, you are a big reason that I embarked this quest :)
And I hope that you do view this journal and comment to share your wisdom, I will try to keep it so up to date as I can.

Share this comment


Link to comment

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