Archive for May, 2011

Work in Progress : updating the RPG engine


as you may know it, Tales of Pocoro has been built using parts of a RPG game engine i started developing last year.
It was a hard work and i came to pause this project for a game design / gameplay issue. Tales of Pocoro was a way for me to release a simple game with nice graphics and it was a good way to improve the engine too.

So, now that Tales of Pocoro is definitely over, I’m thinking about getting back to my RPG project.
That means updating the engine with all the Tales of Pocoro features and tweaks and adding some missing features.

This project was called Crystalia ( with random i and y in the name ).
At the time i created a page on indieDB, you can see many screenshots and videos here.

The Cristalia engine

The engine offers a lot of features :

  • a tile engine with a tile editor to create maps.
  • a game framework easily modified and extended.
  • a rpg engine with a lot of possibilities such as dialogs, quests, items, and a really nice technical design.

What is really nice about this game engine is that all the RPG content ( basically, what make the game ) is written in XML. Maps, dialogs, people behaviors quests are written in XML. You do not have to code anything to write an adventure, or add a quest, or some new maps.

		<layer id="cliff">
			<grid type="MASK" />
			<grid type="BASE" />
			<grid type="OVERBASE">
				<tile asset="town_house1_roof_1" atlas="atlas_town_1" x="1" y="28" />
				<tile asset="town_house1_roof_2" atlas="atlas_town_1" x="5" y="28" />
				<tile asset="town_house1_roof_3" atlas="atlas_town_1" x="7" y="28" />
				<tile asset="town_house1_roof_1" atlas="atlas_town_1" x="14" y="26" />
				<tile asset="town_house1_roof_2" atlas="atlas_town_1" x="18" y="26" />
				<tile asset="town_house1_roof_2" atlas="atlas_town_1" x="20" y="26" />
				<tile asset="town_house1_roof_3" atlas="atlas_town_1" x="22" y="26" />
<friend layer="ground" asset="4x3_people_boy_03" atlas="atlas_charac_2" id="chef2" x="21" y="4">
			<behaviour type="still" />
			<dynamic_condition test="isQuestStarted" value="quest_ring_1">
				<interaction type="dialog" text="here is the the magic ring!" />
				<interaction type="questitem_add" name="magic_ring_1" />
			<dynamic_condition test="hasQuestItem" value="magic_ring_1">
				<interaction type="dialog" text="Please bring the magic ring to the old fart near me" />

This allows one of the coolest feature of the game : world changing.

Let’s imagine a basic quest : free the villagers from the thieves in the forest.

As long as the quest is not complete, the forest will be a dark place with monster and thieves lurking around. People in the village will look depressed and to increase the drama effect, you can even imagine putting dead trees, wandering rats or anything you can imagine. All this details are written in XML under the condition “thieves quest not complete“.

Once the thieves quest is complete, the forest will no longer be a dark and threatening place, the village will be a nice place to live again, and this is written in the same XML but under the condition “thieves quest complete“.

A bit of interaction here :
[WIP] Implementing Interaction #1 – Indie DB

This dynamic xml handling allows a lot of changes in the world. It’s not a static universe anymore. Possibilities are really humongous. Dialogs can be modified, A whole map can became different or just a small part of it. This is a really important feature for me. I played a lot to real western RPG games, and nothing please me more than being able to modify the universe with my actions. I’ll always remember when in Gothic 3, you defeat all the Orcs enslavering a human village, the orcs flee and the humans started to live again in their village. I just tried “for fun” to kill all the orcs around and the universe reacted to these actions.

Updating the graphic engine

When i coded the graphic engine of the RPG engine, i was quite unexperimented with openGl and made some choices that led to some limitations.
To draw sprites on the screen ( basically everything drawn is a sprite from trees to people to ground to buttons ), i used a kind of openGl hack to draw raw images on the screen.
The main problem is that you cannot do anything once things are drawn. no light effect, no rotation, no zooming.

Zooming was much of a concern indeed, and i started modifying the whole game engine just for this feature. The good news is that it is now done. The camera is now able to pan around and zoom gently back and forth.

Next step on the graphic engine will be to add a bit of lighting. I’m not quite sure of how it’ll look like but it’s worth the try.

Updating the controls

Controls where the tricky part. It was even the main reason of the project being paused.
Once again, it was my fault, i made poor choices :
I decided that the game could be played by every one, including people with old phones. That means sometimes only a single touch screen,  no trackball, no keyboard. All the game should have been single-touch. That means a lot. No virtual joysticks, no virtual buttons ( ie , single touch = you can’t move and click in the same time ).
This choice led to a even greater problem : the battles.

People like to fight. They want to be able to draw a piece of metal and put it through another being to make some red stuff come out of him. That’s how RPG are.
Fight gameplay must be perfect  otherwise it’ll be frustrating and the game will be just bad.
With the single touch choice, fights would have been a real nightmare, clicking around on the screen, hiding it with your hand. Using bow would just have been impossible too.

See the horror below :
[WIP] Implementing Weapons #1 – Indie DB

So, i decided to change all the controls, no more single touch crap. Most of the phones are multi-touch now. Bring back the virtual controls !

I’ll keep you updated about the progress 🙂