JEPE - Game Engine
View Single Post
October 19th, 2007 (06:22 AM).
The Demon Plasterer
Join Date: Nov 2005
We're going to integrate with web rankings too, there'll be a new trainer rating system. There's been some starting work on an applet system but nothing major yet.
XML: because it's really easy to work with.
Here's a standard tile (typed from memory, it's easy)
<tile image="grass2.png" x="15" y="14" />
then a fill:
<area fill="grass2.png" x="15" y="14" width="20" height="10" />
Wildgrass is a bit more complicated:
<actiontile class="WildGrass" baseImage="wildgrass1.png" animComingOver="WildgrassComingOverAnim.png:4,1:250:false" imageOnOver="wildgrass1OnOver.png" imageComingUnder="wildgrass1OnUnder.png" x="13" y="20" />
(class is the type of tile, base is what's normally there, then with the rest: either animation or image; coming, on, leaving or off; over or under the player.
You can also fill actiontiles.
And then objects:
<object image="tree.png" x="9" y="-2" recty="1" rectheight="2" />
recty (and rectx) are the offset of the collision rectangle, and the hight and width are obviously the height and width. So for that tree, I've offset the rect down one and made it smaller so it doesn't stick out the bottom.
You can also group objects into sets with relative x and y, fill objects in a linear way like the tiles, or fill objects in a pattern (like offsetting a row of trees).
Maps also set the maps around them (for smooth map movement) and the offset, so maps don't all have to be the same width and height to line up. Our overworld to-do list is currently warps, actions and NPCs, layering, and objects that only work if you walk into them from a certain direction.
To be honest, we were considering something else for NPC scripting at one point.. might have been Ruby. XML is ok for that, but it'd use a lot of if clauses to read a simple plot, and it can't send out instructions (like 'move on to the next plot point').
The Pokémon Factory: It Starts With An Idea
View Public Profile
Send a private message to BonzaiRob
Visit BonzaiRob's homepage!
Find all posts by BonzaiRob
Find threads started by BonzaiRob
Ignore Posts by BonzaiRob