Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » Could a unified RPG/tilemap library ever catch on?

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Could a unified RPG/tilemap library ever catch on?
Thomas Harte
Member #33
April 2000
avatar

People seem to plan them all the time, but still no-one ever seems to actually use them, so I wonder - could an RPG/tilemap (i.e. a library sophisticated enough for RPG development but also simple enough for regular 2d sidescrollers) library addon for Allegro ever succeed with you people?

X-G
Member #856
December 2000
avatar

If it's solid, fast, and most of all CUSTOMIZABLE enough, sure. The last part, which is by far the most important, is all too often overlooked. I want to be able to customize literally EVERYTHING. Unfortunately, this is also often hard to accomplish.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

I want to be able to customize literally EVERYTHING.

Well, here's my plan for mine; there's a flag in the file format that specifies whether that particular file uses bitmasks or just solid/walkable, whether it has animations, whether it's got its own tileset (it could use an external one provided by the user), etc. Since I want to be able to use it for a variety of stuff, customization is important to me too :) Perhaps I'll add support for multiple tilemap layers like the KQ editor and Mappy do (right now, you need multiple tilemaps). Maybe I should look at the Mappy file format for ideas :) ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

Don't look at the Mappy format - Mappy is WAY too inflexible. Can I customize/have any of these features with your engine?

  • Different tile sizes

  • Section layers (layers smaller than entire map)

  • Parallax layers (tiled as well as pictures)

  • Different tile sizes in each layer

  • Different tilesets in each layer

Those are just a few of the things I'd consider bare minimums for something like this ...

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

> Different tile sizes
Not at the moment (32x32 is hardcoded) but it should be easy to change.

> Section layers (layers smaller than entire map)
I don't see why not. It doesn't support multiple layers at ALL right now, but if it did, it shouldn't be hard. My level editor uses tilemaps of different sizes at the same time, and lets you move them in relation to each other. Not hard.

> Parallax layers (tiled as well as pictures)
Parallax pictures? Anyway, my tilemaps have "speed", so a map with 0.5 speed will move half as fast as one at 1.0 speed (the default). I'm doing that now in the game :)

> Different tile sizes in each layer
Didn't think of that, but no sweat ...

> Different tilesets in each layer
Doing that now in the game :) Good ideas; I'm logging these ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

Quote:

Parallax pictures?

I could have, for instance, a background with a sky and some clouds in them. These can get somewhat complex, and I'd hate to have to break them into hundreds of tiles and then put them back together again in the editor.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

Right; I've thought about that too. I guess it could be a 1x1 map with 640x480 tiles 8-)

I also check for hardware acceleration for blitted and masked tiles, plus I've got transparency, and I have plans for animation.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Thomas Harte
Member #33
April 2000
avatar

Quote:

Parallax pictures?

You can see these in many old console games, effectively it just means being able to set scroll offset per tile layer per scanline to get an effect exactly like the floor in Street Fighter 2. I've seen this in, off the top of my head, Sonic 3 on the MegaDrive and California Games on the old Master System.

X-G
Member #856
December 2000
avatar

Another thing; If you're going to make a general map editor, make sure to let people write their own export routines for their own map formats; either through plugins or some other system. It's not always fun being stuck with a file format you don't like ...

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

Absolutely, but I'm still unclear how to go about that. Someone suggested a Lua way; perhaps writing my own little scripting language for that would be easier ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Korval
Member #1,538
September 2001
avatar

Quote:

Another thing; If you're going to make a general map editor, make sure to let people write their own export routines for their own map formats; either through plugins or some other system. It's not always fun being stuck with a file format you don't like ...

There's a difference between making the all-purpose map editor and making a map editor (among other tools) for an RPG. The all-purpose map editor shouldn't impose much on the user that can't be changed. I would argue that the type of map itself (hex, square tile, isometric) should be editable and configurable via plugins. The user should be able to hand, and edit, application specific data off of a tile position or a tile-type via plugins. And, of course, the export of data should happen via plugins as well.

Now, a tilemap for use by an already built RPG engine is a different story. Since this is a full RPG engine we're talking about here, the user won't be quibbling over file-formats; no exporter plugin. However, adding additional data to the file format is important. As such, the user should have plugins that add data to tiles and tile positions, and this data will be automatically loaded by the game engine and made avalaible for immediate use in code/scripts.

As for the thread's main question, such a library could catch on, but probably not for Allegro users. Regardless of the flexibility of the system, most Allegro users tend to be far too unwilling to look at, let alone use, any moderately high-level library. And such an engine would provide the game loop and so forth, so coding for it would be a matter of deriving new classes and writing new scripts for those classes. I doubt many Allegro programmers are willing to use an engine that has that much of the code written for them.

Also, in order for such an engine to be useable, it must have excellent documentation. Since it is an application framework that controls most of the game internally, it is important for the system's behavior to input/function calls to be very precisely documented.

Peter Hull
Member #1,136
March 2001

Chris - are you writing an RPG too? Your work-rate knows no bounds!

I think that writing a 2d tile-map engine for an RPG is easy; it's the actual gameplay bit that's hard (hence lots of RPG projects start and never finish)
There's always RPGmaker2000 and it's friends which do the whole lot.

Pete

X-G
Member #856
December 2000
avatar

Korval: Yup, I know - I sort of got the impression that 23 wanted it to be more all-purpose than strictly RPG (his current game isn't even an RPG ...).

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Chris - are you writing an RPG too?

Not actively :) Besides the plot and gameplay I've been working on off and on for several years, I'm just keeping an eye on the future while writing my platformer classes. I should be able to make a shooter very easily with my current game's engine, for example :)

Quote:

However, adding additional data to the file format is important.

I had a thought, and it kind of comes from how KQ does things. The map is the same as always, but you could give tiles that trigger scripts an ID number. Then, when you create the tilemap object, you supply a callback function that the tilemap calls with the tile number (and maybe the tilemap ID or something?) when the player walks on it, which does all the cut scenes and stuff. You could even make it a Lua script like KQ. All we need is your uber-GUI and we're set! :D

Adding the ability to edit the tilemap's ID numbers would be cake. In fact, I could almost call KQ's a "general tilemap editor" and it can apparently handle RPG's just fine ;)

I'm just throwing this out, so feel free to point out anything I've missed ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

spellcaster
Member #1,493
September 2001
avatar

I'm not sure if this is worth the effort, actually.
If you do it, you should take it one step further, add lua and make it a higher level game engine. Not just a tile engine.

The reason is that the engine will be pretty complicated. So newbs won't understand it, and the vets will code their own engine in the time needed to learn / customize the tile engine.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Peter Hull
Member #1,136
March 2001

KQ has a 3-layer 'visual' tilemap, plus a shadow layer, plus an obstacle layer, plus a zone layer. It's the zones that trigger the calls to script functions. All these layers are independent.
This gives flexibility but in a sense it's unintelligent because some tiles are always obstacles, and some (e.g. the bookcases) are, or should be, always zones (they trigger a book-reading response). Are you suggesting that certain tiles should automatically generate zones for actions? It could be done that way, maybe in the map editor, that there is a default assignment which can be overridden.

Pete

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Are you suggesting that certain tiles should automatically generate zones for actions?

If you're talking to me, no. Well, you could, but I figure assigning a "script ID value" to each tile might be more flexible, in case you want the player to find a certian book in a library. Suddenly all bookcase tiles can't do the same thing, right? ;) OTOH, that callback function I mentioned before could also take the coordinates of the tile, which could be used for specific instances like that. And of course not all floor tiles can trigger events, though some will. Maybe instead of having a zone layer, the tilemap object could keep a hash table or something of the zones. Beats keeping a 60x60 array for 3 script triggers ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

This reminds of what I used to do with my RPG tilemap ... three tile layers, one flags layer and one zone layer. The flags layer had obstacle data. Now, the zone layer was just a byte for each position in the map. Then, you could define up to 256 triggers per map, and an activation type for this trigger (on step, on activate). Then, each tile which was flagged with this zone would activate that trigger when stepped on or activated, depending on the activation type. These triggers then had scripts associated with them.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Peter Hull
Member #1,136
March 2001

That's what KQ has, I think. Script ID value == zone number, doesn't it?

simplep
Member #3,385
March 2003

Quote:

Absolutely, but I'm still unclear how to go about that. Someone suggested a Lua way; perhaps writing my own little scripting language for that would be easier ...

Maybe you can define an XML format for tilemaps. Then, it would be trivial to write XML to binary converters. For example:

<tilemap width="55" height="100"/>
    <row index="0">
        <tile index="1" tileset="zelda-stage-1.xml" opaque="true" animated="false"/>
    </row>
<tilemap>

Keep it simple!!!

X-G
Member #856
December 2000
avatar

Ugh ... it would be a NIGHTMARE to design maps in such a way, IMHO.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

Ugh ... it would be a NIGHTMARE to design maps in such a way, IMHO.

Hence why you'd have a MapEditor ;) IMO XML isn't a human readable format. You should always use tools to munge and grep it.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

X-G
Member #856
December 2000
avatar

Right, which makes the XML bit sort of moot ... I doubt the use it would have, even as an intermediary for conversion.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

Korval
Member #1,538
September 2001
avatar

Quote:

Hence why you'd have a MapEditor IMO XML isn't a human readable format. You should always use tools to munge and grep it.

If you're always going to use tools to access .xml files, what's the point of making them text? It may as well be binary; it loads faster and takes up less memory on-disk. You may as well be using a well-structured tagged binary format.

Thomas Fjellstrom
Member #476
June 2000
avatar

Korval: I totally agree with you.

XML is just hype.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

 1   2   3 


Go to: