Shining Online


Development Notes

Raw development notes from Shining Online. Newest changes at the top.


  • Can now give an item to another character. It's a little dodgy but it works.


  • Fixed a couple of bugs with the inventory menu not switching states correctly.
  • Started work on the "give items" process.


  • Updated another two screens to use UI binding. Removes a LOT of code.


  • Cleaned up some internal loading code to remove a lot of copy/pasted code.
  • Update stories to support a rules directory, as well as a single rules file. Over time the rules system has grown and a single file isn't really as readable as it used to be.


  • UI elements can now be shown or hidden based on the result of an expression. This is useful for things like "hide weapon icon if no weapon".
  • Added "original" data storage to UI definitions. This is to prevent data binding from overwriting the original interpolation statements.
  • UI builder can now rebind elements. Useful for when data has changed and the UI needs to be updated but not rebuilt.
  • Updated a couple of screens to use the new data binding setup. Makes the panel code much smaller and easier to read. There's a slight performance hit, but it's not noticeable at all in release mode.


  • Added the expression evaluator as a service. Added some very early integration into the UI builder, so UI text can now contain expressions like ${ leader_name } and have it replaced with the correct text.

    Next up - entity data binding!

  • Entity data binding is now working! It's still more of a test implementation than anything robust, but it's possibly to dynamically set a UI element's text to an entity's field value entirely from UI configuration values.

    For example, a UI text element can be set to show the main character's weapon name using an expression in the definition file, rather than having to compute it via code. There's a slight performance hit, but it means the UI definition isn't tied directly to internals and can be updated without compilation.


  • Started work on extracting the expression evaluator from blam to its own module. This will then be used to add some simple (and I do mean simple) binding capabilities to the user interface module.

    The plan is to be able to bind an entity field to text label, but with support for basic logic (e.g. hide_if, show_if) and some simple text helpers.


  • Accidentally fixed a UI bug where elements were getting added to the renderer twice.


  • Finished the rebuild of the message box system and integrated it into the script engine. Everything fits together much nicer now, and it makes more sense to have input handling in a screen (like every other interactive feature) than in a background action. Still not sure what I was thinking there.


  • Started rebuilding how text messages are displayed. Currently works using a background action, which isn't really a good way to do it at all. Also fixed word wrapping and added automatic sizes. Next step is integrating it into the scripting engine.


  • Spent two days fixing UI interaction bugs. My least favourite thing.


  • Got the town menu animating correctly and working fairly well. Can use it to open the status screen and and inventory screen. Transitions all work and can be configured.


  • Extracted a bunch of common screen functionality to a common class that other screens can extend. Wraps up the resource manager, rules database and animation systems. Should have done it ages ago.


  • Character summary screen now takes weapon and armour stats into account.


  • Character magic screen now shows information about a character's spells (MP cost, range and power).


  • Started work on item tooltips. Lots of info to squeeze into a small space.


  • Finally got font style resources working, so everything in the UI can now be customized. Really simple fix and I'm not sure why I didn't think of it in the first place.


  • Fixed a couple of major bugs with older status screeens. Mostly fixing where functions have been moved around and tidied up.
  • Finished process for dropping items. Windows and text need polishing and it needs to feel a bit better, but otherwise it works.
  • Added some very basic helpers for storing strings in data files. Can replace pre-defined tokens from within the string. Might make it possible to replace any component field, but that seems like it could cause issues further down the line.


  • Spent far too long fixing a bunch of animation issues with the offline inventory screen. It's starting to become a tangle of states and event handlers which isn't great. Slowly getting there.


  • Started work on dropping items. Can select an item to drop and select "don't drop". All animates (mostly) correctly. Dropping the item is up next.


  • Improved the table UI builder slightly. Things like column alignments and cell padding can now be set via a config file.
  • Tidied up the offline equip process. Displays a proper message box when attempting to equip something in a slot that has no valid items.
  • Item list is now correctly filtered when equipping weapons and accessories. So weapons no longer appear when trying to equip an accessory (and vice-versa)


  • Menu screen can now configure its appearance. Probably should have used a ui definition file for this, so it might change in the future.
  • Menu tooltips can automatically resize depending on the text being displayed.
  • Cleaned up a few bits of graphics and completely broke text rendering in the process. Whoops.
  • Fixed text rendering. That's what I get for being lazy.


  • Messed around with some menu effects, but nothing looks particularly good. Going to try animations and "pulse" effects to see if that helps.


  • It's finally possible to equip an accessory! There's a little bit of polish to add, such as showing correct stat increases if an accessory has more than one buff, but otherwise it works. Windows are animated and icons show correctly. Hopefully adding weapon equipping will be easier now the hard part is done.


  • More work on equipping items. Lots of UI animations and interactions which is a bit of a pain. Slowly getting there.


  • Menu transitions in and out are now working nicely. Fixed up a few animation bugs at the same time.


  • Retooled how classic menu animations work. Can now fade the menu in, move it in or expand it from nothingness. Animations are configured by the story's "rules" file, so it's possible to change how the UI behaves without modifying any code.


  • Created a generic "Hook" system for adding and removing event handlers at runtime. These are similar to the events system but are self-contained. The main reason to do this is for UI callbacks, such as listening for when a menu item is changed or when something is selected.


  • Team list screen now activates the top panel correctly. Can move around the item and highlight items. Next step is the action menu that appears when an item is selected.


  • Team list can now move between characters which updates the top inventory window. It works quite well.


  • Created the team list table with some basic up/down scrolling. Shows the character name and their basic stats. The team list is used when managing items and selecting who gets something from a shop.
  • Team list scrolling is now animated. Also supports left/right scrolling, although it's not as flexible. I'll probably revisit the table renderer in the future, but for now it works ok.


  • Table now has borders and simple background. Naturally things have gotten far more complicated than they need to be, and now there is a full UiElementStyle class with a bunch of extra stuff.
  • Sped up text rendering slightly.
  • Updated bordered panels to support hiding and showing of title area.


  • Started work on a very basic table display for the user interface. Tables will be used in the team list, as well as in the magic and item sections of the ui. It's going to be a pain to build, but it'll be better than manually building a table from dozens of individual requests (which is how the magic screen currently does things).


  • Added jingles when a character joins the force. Correctly stops and restarts the main music.
  • Fixed a bug in the build process where files weren't being copied, which meant parts of the script engine were running very out of date code.


  • Tidied up appearance of the character summary panel. Updated it to use the new shining-style health bar for health and magic.
  • Updated user interface binders to support multiple field names and tokens. This means a field can be "Health: ${currenthp}" and will use the value of the `currenthp` field.
  • Updated UI definitions to use "soda" file format instead of lisp. Lisp is still supported, but didn't really make sense to use it for configuration when everything else uses soda.
  • Updated character inventory panel to show icon rarites correctly.


  • Cleaned up how gold is displayed so the window can be reused later.
  • Updated textbox to support image backgrounds. Used to make wooden signs look like actual wood and not just plain brown.
  • Started designing the inventory screen and weapon/item information windows. I really hate it.


  • Fixed how item rarities are stored, so the data can now be queried in-game.
  • Updated the team list summary to show correct rarity backgrounds.
  • Created a new shining-style health bar. In Shining Force, once a character has over 100 HP (or MP), their bar displays a different colour and a new bar colour goes over the original. Hard to explain, but I got it working.


  • Cleaned up interface panels. Not very exciting.


  • Added a placeholder for promotions. Actual promotions are going to be a little bit tougher.


  • Added "Cure" functionality to the priest. Status effects aren't present in the game at the moment, so it's not particularly useful.
  • Added placeholder music to towns and battles. Music can be configured using the game level resource.
  • Updated resource service to support skipping of autoload on a per-resource basis. In other words, large resources (like music) can be skipped during the initial load.


  • Cleaned up how the character summary panel is built. There was a big mix of hard-coded values and access to things it didn't really need. Item icons are now built in a single place (IconBuilderService) which reduces duplication considerably.
  • Extracted the "Yes or No" question code from the priest screen to its own screen. Much easier to ask a question from anywhere without having to create a bunch of question handling code manually.


  • Added callbacks for when sprite animations finished. It's now possible to add a sprite behaviour (such as FadeSprite) and then call whenFinished with a callback. The callback is then executed when the fade is complete. This makes it much, MUCH easier to change things when an animation is finished. For example, the priest will display a greeting and then show the menu once the text is complete. Before, this needed checks in the update method to check that individual behaviours had finished. Now it can just add a method call and be done.
  • Got "Revive" functionality working for the priest. Needs cleaning up in a lot of places, but it actually works properly. Quite pleased with that.
  • Added a proper "Goodbye" message to the priest. There's still curing, promotion and saving to finish, but it's coming together. Needs some serious cleanup first.


  • Spent the day working on the offline priest screen. Didn't get a huge amount done, but got the basic flow planned out and a couple of bits stuck together. Have I mentioned how much I had building UI stuff?
  • Extracted textbox transition effects into their own SpriteBehaviour objects, instead of hard-coding things in ShowMessageBoxAction. Hopefully all of that ugly code will disappear soon.
  • Extracted text typing to its own SpriteBehaviour. All the animation bits for the priest UI and starting to come together. Once timings are all sorted it should look semi-done. After that I just have to make it work...


  • Made some more improvements to the UI builder and cleaned up panel code a little. There's still more that needs to be done, but everything works nicely now. Which means I have to actually design the screens properly now :(


  • Improved the UI builder and loader.
  • UI definitions can now set defaults for child elements. Cuts down on typing a bit.


  • Added icons for two magic spells: egress and blaze
  • Added very basic magic info screen to characters


  • Battle now fades in
  • Battle cursor appears after the screen fades in
  • List of battle characters is now sorted by agility at the start of every loop (a loop is a complete set of turns)


  • Battles now support placement zones. When the battle starts, team members are automatically placed into a zone. Once the zone is full no more characters are placed.


  • Added script commands for interacting with the session database. This is used to keep track of session-level data and flags.
  • Added script commands for increasing/decreasing the amount of gold the player has.


  • Added a script command for fading the screen in and out. Didn't take too long to implement, and slotted nicely into existing system. A few extra lines changed an instant teleport to one with a fade in/out and a sound effect. Nice.


  • Sped up the script system by moving some common functions into the main script engine (rather than building them in the script engine itself).
  • Also added some custom data structures for storing/retrieving script atoms that had a large effect on script execution speed (10x speed increase)


  • Lots of engine and script system work today. Cleaned up the entity system internals and added some documentation so I don't forget how it works (again).
  • Fixed a few bugs in LispMax that made defining functions a pain. Also fixed a bug where defining a listener would create a stack of script environments instead of cleaning up after itself.
  • Added a script interface for working with the map. Can get information about the map and tileset, and also set individual tiles on the map.
  • Exiting the current map now cleans data correctly, which means moving from one place to another doesn't cause huge slowdowns.


  • Added a few new console commands. world for querying objects in the world database, events for listing event listeners and lisp for interacting with the lisp script engine.


  • Spent most of the day adding a script command to switch between levels. Clearing entities and systems proved to be trickier, as some entities are "global" (i.e. outlive the town/battle) and others aren't. Thankfully the entity system supports grouping by name. Clearing out orphaned components took some work too. It's been a while since I wrote the entity system and it would definitely benefit from some cleanup.
  • Likewise, clearing everything from the render system was a little more involved than I originally thought. Again, allowing render requests to have group names sped this up considerably.
  • All that is left now is to clear out any dead script entities and make sure there are no listeners hanging around.


  • Added script functionality for adding and removing team members. Using entity/components makes this quite simple to implement as the code only needs to add or remove a "TeamMemberComponent" from the entity. Scripts can also access this functionlity, so adding/removing team members via script is simple too. The same setup is used for adding/removing inventory items, and will also be used for magic, enemies and things like that.
  • Fixed a couple of bugs with entity groups and cleaned up the entity system a little bit.


  • Made some minor updates to the dev tools so they can be configured more easily. It's now possible to specify build targets and file name patterns that must be passed. For example, the target "build-images" could be run when the changed file name matches "*.png".


  • Built some small tools to listen for file changes. When a file is changed the resource files get rebuilt and a message is sent to any listening clients. The main game client has also been updated so it will reload the resource database when it receives a "file changed" message. Things like UI definitions and sprites can now be edited and reloaded into the game without any manual steps being taken. It's pretty neat.


  • FINALLY finished rebuilding and re-organizing how the status screens work. This has been a complete pain in the backside and taken far longer than I would have liked. The main sticking point were:
    • Making sure things got animated in the correct order
    • Giving and taking input focus to the correct screens/panels when needed


  • Added some helper methods for clearing graphics added with the UI Builder service
  • Added ability to call a service method via Lispmax. Really low-level and will probably break a lot.
  • Updated status screen to load UI definition from disk and automatically rebuild when the resource database is reloaded. It actually works.


  • Created a helper service (UiBuilderService) for setting up graphical elements from a resource file. It's incredibly basic but means most of the tedious UI setup can be done via file and tweaked at runtime.


  • Finally got menus and sub-menus working (somewhat) correctly. It's now possible to view the team overview and move to an individual character's status section. File this under "things that took waaay too long to do"


  • Spent a lot of time working on backend data - character classes, weapon classes and some basic team setup stuff.
  • List of characters now shows correct data for all characters


  • Removed some legacy script functions and cleaned up a few services.


  • More work on status screens and menus. Taking much longer than I would like, but the various bits of character information are starting to come together.
  • Added a one second delay to the start of loading which speeds up the whole process considerably when running in debug mode. No idea why.


  • Script functions can now check their argument types and throw exceptions that contain useful debug info (for a change).


  • Status screen can now display a list of characters, and will clip character boxes and scroll between them. This was much easier to do than I originally thought due to the animation/rendering system in place. So something I did actually saved me time for once.


  • Started working on the status menu. Split each panel into its own section to prevent it getting too complex.


  • Story levels can now specify a script file. They can also hook into the start, end and on-loaded events.


  • Added a bunch of low-level script functions for setting component values. It uses reflection so isn't that fast, but it's probably fine for tasks that don't need to be speedy. More of a building block for inventory tasks etc.
  • Fixed how Sweeper systems work, so entities now get cleaned up correctly no matter what order systems were added to the World.


  • Fixed a couple of appearance bugs (and created some new ones).
  • Fixed the debug console so that up/down keys can be used to navigate between previous commands.
  • Added a signpost outside the weapon seller. This is the first new thing I've added to the level since scripting was implemented, and it worked perfectly. The whole thing is done in-engine, so required no code changes.
  • Designed all of the status screens in preparation for building them.


  • Status screen now fetches character data from the World. Also add a highlight border for when character is selected.


  • Stories can now specify a startup file containing all entities that should be spawned when a new save is created. At the moment this is used to setup character data and initial items. As usual it's a little verbose, but it works.


  • Stories can now listen for initialization and creation events, which allows them to spawn the default entities required (usually the team and their initial items). Not particularly happy with how it works, and may change it to something simpler, but for now it works.


  • Added the ability for stories to contain their own custom script libraries. These are loaded at the same time as the content db and resource db.
  • Planned out some new startup changes. Stories will need a way to initialize things when the player first starts (such as setting the initial inventory and character roster).
  • Cleaned up various bits and pieces (as always). Still not sure why the when macro is so slow, but sped up the script internals slightly.
  • Added some more options to the text box, so it can now be positioned to the left/right/top/bottom of the screen without having specify exact pixel values.


  • Rebuilt how event-based systems work, so events can send a "target" entity. This can then be accessed in the scripting system, so it's now possible to have a door that can teleport any entity that touches it. It's also much, much more efficient.
  • Spent about an hour trying to track down a bug I /thought/ was about how scripts were inherited from templates. Turns out the template file was Windows encoded, and the script parser was treating the Windows newline character as part of the symbol name. This is why it showed up only in the base template and not the level entities (which is Linux encoded).
  • On the bright side, now that's fixed it means the whole event system is working correctly and teleporters can be defined in a few lines.
  • Cleaned up some other buggy bits of code and removed some bits that aren't required any more.


  • Added a couple of new script helpers for working with lists: nth, random-list-index and random-list-item. This is used for the new display-random-textbox function, which is used to make NPC's say random things.
  • Rebuilt the build script to pack stories and resources more efficiently. Building a story now takes under a second, as opposed to 30 seconds before.


  • Added new "Properties" component
  • Added script function for getting an entity's property by name
  • Found a couple of bugs relating to scripting environments. Partly fixed, but %self% is still not working as well as it needs to.
  • Update Pangolin.Events to allow object methods to be registered as event listeners. This makes stopping and starting processes much easier.


  • Added functionality for pausing and unpausing scripts.
  • Added lisp helper functions for managing processes by ID. Might also allow processes to be named, or maybe just store them as a global variable from inside the script itself.
  • Test run with one script suspending itself and then being resumed by another script worked.


  • More work on getting the scripting system integrated.


  • Split the script system into two parts - one for parsing and executing scripts, and another for running background behaviours (such as making the screen shake).
  • The current plan is to have a few "top-level" script commands built into the engine, and have the rest supplied through library functions. For example, there are only two flag commands - one for getting and one for setting. The rest is done using some helper functions (such as global-flag-equals? and global-flag? for testing flag equivelance).
  • Started work on getting new script system integrated with entities and events. It's a little tricker than before, as scripts need to be parsed and run in a script process.


  • Started integration of new scripting engine.


  • Added a really simple "shake" effect to shake the camera around. It actually works.


  • Fixed a major bug with entity creation. All entities created in a stage inherit from another object template, but because BlitzMax passes objects by reference, building an object from a parent template would affect ALL objects that inherit from it. In other words, if three treasure chests were defined, they'd all be in the same position. Objects now clone their parent's details so this no longer happens.


  • Added really basic "speaking" effect to text in message boxes. The whole thing needs rewriting, but it works for now.
  • Fixed the teleport command to also move the camera


  • Added a basic loading screen & progress bar.
  • Changed story asset loader to use threads so the loading screen can work in the background.
  • Modified rectangles so the border can be rounded by a single pixel. Not amazing, but makes the HP/MP bars look more Shining Forcey
  • Fixed a movement bug that allowed the player to glitch through walls if they pressed two directions together


  • Automated animations working a little better. Not perfect (per-millisecond animation not working yet), but can at least move things around the screen without having to fuss around with state machines. Can either be done in parallel or sequentially.
  • Got a very basic team information screen up and running. Needs some interaction and integration with the entity system, but it works.


  • Cleaned up some of Pangolin's internal code
  • Added a horrible fix for z-indexing bug. Player character now appears in front of other entities instead of behind everything.
  • Added some more information to the status screen - now displays the amount of gold the player has (well, it will once that system is up and running). Also displays a box for team status
  • Started experimenting with automated ways to move ui-elements around on screen (using "behaviours" / "robot functions"). Not working too great, but optimistic.
  • Added a new debug console command for listing all loaded resources


  • Added more formatting options to Pangolin's text rendering - it now supports wrapping and effects on the wrapped text.
  • Added ability to load fonts as a resource, rather than hard-coding the paths. Switched demo 5 to use fonts as a resource.
  • Added a new "rectangle" request to renderer. Can now draw a rectangle with an optional border.
  • Started working on a new sub-screen for team management and statistics. It's a little different from the standard Shining Force way of doing things, but it gives a little more freedom and shows some previously hidden information.


  • Updated bordered box to allow for custom background colour, opacity and border image.
  • Fixed bug with how sprite colours are set. This was supposed to allow any sprite request to be tinted a certain colour, but wasn't setting the tint at all. Correcting it surfaced another bug that tinted everything black.
  • Cleaned up Pangolin's text rendering, so text can have shadows and be aligned to the left, right or center.


  • More code cleanup of systems. Cutting away unused & badly written stuff. There's quite a lot.


  • Modified scripting system so items can be put into a queue.
  • Added a very basic text window that can appear and disappear.
  • Cleaned entity systems to make use of Pangolin's newer features, such as kernel awareness and automatic fetching of component type lookups
  • Made a really simple teleporter gadget that can move the player from once place to another.
  • Found about half a dozen bugs, mostly involving the custom template system or player movement.


  • Modified camera behaviour class so it no longer uses hard-coded tile sizes
  • Fixed trigger system to evaluate all triggers and then execute them. This fixes a bug with treasure chests, where opening the chest would trigger the "it's empty" message immediately afterwards


  • Built a really simple tool for connecting to world servers and sending/receiving test messages
  • World Server no longer kicks a client after making a ping request
  • Server listener now calls overridable methods when a client connects and disconnects
  • Server listener can now accept handlers assigned at runtime instead of having to use a giant select/case block


  • Fixed bug in Pangolin engine that would crash app if no camera was initialized
  • Removed dependencies on X11 from world server, so it can now run on a plain server environment


  • Added a bunch of tests to the new gateway server, mostly checking that the token and server registration system works
  • Cleaned up gateway server and extracted a lot of controller/model code into services
  • Gateway server can now assign tokens to valid users, and check that tokens are valid
  • Gateway server can now listen for world server connections, ping the server and added them to the server list
  • Moved Gateway servering ping into a Gearman task, to prevent server getting locked up when a new world server connects


  • Moved a bunch of old world server code into services
  • Converted main server listener to a service so it now works properly


  • Removed some dead test rendering code from the offline town screen
  • Added very basic tooltips to town menu
  • Added really basic argument expansion in trigger evaluation, so keywords like "" can be returned as their live value - useful for storing flags based on an entity's name
  • Moved treasure chest entity code into a new template file, so it can be re-used in other parts of the level
  • Selecting the "inspect" icon on the menu now triggers an inspect event for the correct location