Raw development notes from Shining Online. Newest changes at the top.
- 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
whenFinishedwith 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
updatemethod 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
SpriteBehaviourobjects, 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.
worldfor querying objects in the world database,
eventsfor listing event listeners and
lispfor 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
whenmacro 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:
random-list-item. This is used for the new
display-random-textboxfunction, 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 "self.name" 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