March 15, 2013

Aeon of Sands - final interface design

In the last weeks we worked hard on the gui, the rpg system, the inventory and graphics. The screenshot shows the prefinal design of the Aeon of Sands interface. The character and weapon icons are only mockups, compass is not included.

Now i want to explain, how the game manages it's objects.

The game has 3 big object groups.
-Walls/Frames (non-interactive)
-Items (Enviroment-/Decoration-Items and Equipables).
-NPCs/PC (Npcs/Monsters/Player)

Lets say we want to create an invisible teleporter. Than we have to create an new item of the type 'nonequipable', the category 'teleport' and the definition 'teleposition' to positon {x=2, y=2}. If the player hits the tile where i placed the teleporter in our Leveleditor, the event is activated.

level.item[14] = {
['name']='Teleport to 2,2',
['teleposition']={x=2, y=2},
Easy eh?

But we don't want to predefine all events, that a gamedesigner wants to create. Therefore we added a bunch of functions to our event handler. Every Item can trigger events using the onTile, onUpdate and onClick function.

Now, if you want to create an item which triggers an event, and the event is not predefined ('teleposition' is a predefined event) as in our teleporter example, we can choose the onTile function. If the player hits a Tile where this item is placed, the onTile event is triggered.

level.item[18] = {
['name']='Ambient Text',
onTile = function(self)
if self:isAvailable() then
scene.gamegui:addSomeText("In front of you is something hidden!")
self.available = false

We can place the 'Ambient Text' Item anywhere on the map and if the player hits the Tile, the onTile event is triggered and the "In front of you is something hidden!" apprears  in our textbox. Afterwards we have to set the option self.available to false, because we want to trigger this event only once a time, not everytime a player hits this tile.

Next time i feature the inventory system.

Stay tuned!

No comments:

Post a Comment