Submissions from 2015-03-03 to 2015-03-04 (3 total)

To build an event system. In my little story outline, even within the single "scene" I designed for Act 1, there are several mini-scenes that the npcs are supposed to go through. At the beginning, erik is separated from his party, and has to go looking for them. When they see him, they should be glad to see them. And so on, for multiple other things going on. While I intend for the core minute to minute gameplay to be driven by the ai simulation, there are some simple things that I need to be able to do to control the narrative somewhat. So I built a high level event system. Each map has it's own queue of events that it listens for, and than various actions in the game can trigger those events. This will be used for controlling high-level narrative flow - and should be used sparingly. The opening sequence of the game is one of the few obvious places to use such a system.


      ["console",{"text":"Game initialized"}]

Turns into a quaint little cutscene that plays at the beginning, along with some "gameplay", where the npcs see erik when he moves in view. It's fairly unoptimized, checking all events every time a part of the code signals a possible event. I don't know how long the list of events for a given map is going to grow, so it might not even be a problem. In fact it probably wont. But it could certainly be optimized by building some kind of search tree according to each event type.

The worst event is the "camera_near" one, because the camera fires the event every frame (triggering a match attempt on ALL events in the current map) even when there are no events looking for it. An easy early optimization there would be to keep track of what event types are in the queue, and silently return if we know there are no camera_near events waiting.

I'm still not sure about this. It makes a lot of things really easy, but also is going to be a temptation to hardcode narrative rather than let the ai simulation create one. Finding that balance between narrative and simulation is what this project is all about though!

So, the title says it all.


  • Fixes the zoom bug
  • Added a manual camera
  • Show what player won at the end
  • Adding title for non-fullscreen.

Today I finished the work on the save system. Player now can create and name a new save file and later choose which one to load. I also fixed a couple of nasty bugs and improved the performance a little bit. :)

I'm planning to publish the next version soon, so stay tuned. ;)

If you would like to support Crystal Kingdom, please consider liking its facebook page and following it on twitter.
Yesterday's update can be found here.
In a case of any questions or suggestions, don't hesitate to contact me here or on twitter. ;)