Development Notes
Raw development notes from Shining Online. Newest changes at the top.
2022-11-02
- Moved some more content from
OfflineBattleScreen
to state handlers and initializers.
2022-01-30
- Rewrote
OfflineGiveScreen
to use a proper state machine.
2022-01-29
- Updated
OfflineDropScreen
to actually use the state machine. The previous version had a tonne of functionality split between transition handlers and the screen. Now it all lives nearly in state handlers, with transitions only doing transition stuff. It's much easier to read.
2022-01-17
- Added way for stories to set an initial amount of gold. This can also be
done through scripting by listening for
:event-story-start
events, but I also wanted a more user-friendly way to do it.
2022-01-16
- Worked on more TODO comments - removed some unused files, split other files up, and moved some files to more logical positions.
2022-01-15
- Started cleaning up TODO comments from various files. Got maybe 20 done; only 605 to go.
2021-12-27
- Can now buy non-equipment from the shop.
- Tidied up a bunch of little visual issues with the shop that were bugging me. Still not 100% perfect, but it's getting there.
2021-11-24
- Rebuilt the shop internals to use entities instead of data templates. I was 50/50 on using templates and it turns out I was wrong.
2021-10-29
- Shop can now show inventory with prices. UGLY, but it's visible and loaded from data.
2021-10-17
- Started rebuild of the offline shop and priest screens. Neither of them are finished, but they need to be rebuilt to use state machines instead of the ugly spaghetti code they're currently using.
2021-08-22
- Hooked up the AI services and system - worked pretty much first time (which is worrying).
- Improved enemy movement animation so that enemies walk and turn correctly.
2021-08-07
Created service for converting AI actions into background actions. Still not sure if it's the way I want things to go - I could probably build an entity system to follow a list of AI actions instead.
I'll stew on it.
2021-07-02
Spent the last few weeks building a basic AI system. Currently have a system that can evaluate behaviours from a list and select the appropriate one. Once selected it will build a list of actions for the entity to perform.
The main selection part is working correctly; the next step is hooking it into the entity system and then carrying the actions out.
2021-03-21
- About 50% of the way through the equip item process. Can select a slot and an item to go in it, and view the stat changes to go with it. Couple of minor bgs to fix and some old states to remove (like "are you sure you want to equip this?" which isn't used) and then it's good to go.
2021-03-20
- Updated inventory panel to support "locking" input to just equipment or items. This will be used when equipping stuff.
2021-03-18
- Re-designed the offline equip process. It still has a shining feel (I hope), but is more streamlined. Now I just have to build it.
2021-02-22
- Extracted all background actions stuff to a pangolin module. I've used this code in a couple of other games, so made sense to finally do this.
2021-02-10
- Replaced input handling with pangolin.input service. I built this for Splodey Boats and it's stable enough for Shining Online. There are still improvements to make - mostly to do with joypad support - but that's much easier to add now that input is based on actions (e.g. "move_down") instead of hard-coded key constants.
2021-01-12
Rebuilt the internals of the
pangolin
entity system. The previous version stored systems and component references as a single bit within a 32-bit number. This is great for fast lookups - checking if a system is interested in multiple componenta can be done with a single bitwise operation - but it meant there was a limit on 32 systems.I originally thought I'd never reach 32, but I did for Splodey Boats 2000 and it took me some head scratching to figure out some really weird behaviour bugs.
So I had to rebuild the internal storage to use something more flexible. Identifiers are now stored in a memory bank which supports up to 255 systems. It can be changed fairly quickly to support 65536 if needed, but I went with 255 as it's easier on memory.
2020-12-16
- Added easing functions to Pangolin. It is now possible to do linear
movement (like normal), but also quadratic easing (like
ease-in-out
in a browser). Took a while to get it all working, but it animates smoothly and takes delta timing into account.
2020-12-08
- Very basic battle loop is now implemented. Enemies have no AI and the cutscene doesn't animate, but the main loop of character -> move -> attack is now working.
2020-12-06
UI panels can now set a start and end co-ordinates. This is handy for configuring things like the land effect panel that slides on and off the screen.
The previous version used hard-coded offsets, so even though a panel definition could have a custom position, it would always animate the same way. For example, if someone wanted to switch the land effect panel to the right side of the screen it would always animate X pixels to the left instead of being hidden correctly.
This new version will probably change further to support a full layout system, but for now it works the way I want it to.
Added
MoveSpriteToBehaviour
which moves a sprite from its current position to user-specific co-ordinates. It also takes delta time into account, so it's a smooth animation even if frames are dropped.This is combined with the panel improvements above, so moving a panel off and on screen can use a single generic function instead of having hard-coded offsets.
2020-12-05
- FINALLY updated the UI system to use relative co-ordinates in layouts. The previous version used absolute positions for everything, so a label that was 10px from the edge of a panel would still need to include the panel's x & y position in its definition. This made re-positioning panels a complete pain in the butt and kinda defeated the point of using a layout file.
2020-11-29
- Realized I was making parts of the battle scene far too complicated.
- Turns out I wasn't, and I don't have a simple way to do what I wanted. Bugger.
- Placeholder battle scene now fades in correctly and shows background. Got some more ideas about how I want to restructure the UI system too.
2020-11-28
- Added placeholder screen for battle cutaways. Layout needs tweaking and it's missing some important parts (like the actual characters) but it works with the battle flow. Next step is adding damage so that it's possible to defeat enemies.
2020-11-27
- Spent an hour fixing a bug that was due to a single incorrect letter (I was
using
movement_profile
instead ofmovement_profiles
. Really annoying. BUT now the game supports classes that ignore land effects (such as Pegasii).
2020-11-22
- Added growth curve tables and added reference field to characters. Each character can specify a growth table. This is a rule node that has sub-rules for each class. This allows different characters with the same class to have different growth paths.
2020-11-11
- Added data for stat growth curves. Currently reading through the SFII source to figure out how it works. Ideally I want it to be fully configurable, via a table format in the rules file and possibly with a script function to allow for weirder possibilities.
- Converted SFII level-up code to BlitzMax. Works how I want it to, now I just need to clean it up so it's friendlier.
2020-10-18
- Tidied up some more of
OfflineBattleScreen
. Fixed someTODO
items and added some render helpers to Pangolin.
2020-10-03
- Fixed scrolling issue on "who gets this item" screen.
2020-09-12
- Fixed some minor bugs in the "give item" process.
- Added missing weapon types for ankhs, rods, and wands. SFIII has weapon classes that are separate from types (e.g. a glove can have a "spirit" class so it's strong against demons). Need to work on getting this integrated.
- Added service and component type injection to base
ScriptEngineFunction
type. No longer have to manually grab services and types in anafterInit
function :D - Updated ALL
ScriptEngineFunction
types to use injection. - Fixed pretty large bug where entity templates weren't having their
components initialized unless the component was part of the root
template. This lead to fatal crashes when switching the renderer to support
the
layer_name
field inRenderBodyComponent
.
2020-09-11
- Added check to make sure important quest items cannot be dropped. Updated drop ui to display messag if player attempts to drop a quest item.
2020-09-05
- Finally added a custom event for "Yes/No" dialogue screens. Before this
approach, the question screen had to be queried which led to some pretty
ugly code. Event handlers can now just check for a
yes
orno
via the event.
2020-06-18
- Added "initial_inventory" component to make it easier to set inventory items during startup. Previous system involved defining the entities and their relationships by hand. Which wasn't too bad, but wasn't very readable.
2020-06-14
- Moved some initialization code from the town screen to a dedicated initializer system.
- Remove the hacky player sprite offset. Originally had to manually run the
ActorResourceLoaderSystem
for the player entity, then get the sprite and manually move it 8 pixels upwards. Now just setsy_offset
to -8 in the player template in "content_db".
2020-06-13
- Updated "attack" command to support multiple cursor sizes. Doesn't affect the actual attack (yet), but the cursor works and is based off actual data.
2020-06-09
- Updated "attack" command to use the player's attack range, rather than always defaulting to 1.
- Updated attack range code to calculate the range correctly. Took a few tries, but it's working correctly now. Can have weapons with ranges anywhere from 1 (adjacent) to 127 in theory. Standard Shining Force shapes are working.
2020-06-06
- Moved some callback code into the main state machine now that
onEnter
andonExit
callbacks are fixed.
2020-06-04
- Added custom camera bound settings for levels. Can now set the camera to be limited to viewing only a certain portion of a larger map.
2020-06-02
- Added proper exceptions to State Machine module.
- Added "locking" to state machine. Can add one or more state names, and then "lock" the machine to prevent new states from being added. If a transition or handler is registered to a non-existent state it will throw an exception.
2020-06-01
Enemy turn now shows their stats and movement grid. Grid is removed properly after the turn.
At this point the placeholder battle loop is working. Next step is to add player attacks.
2020-05-31
- Fixed annoying camera "skip" that was happening when leaving cursor control mode. Camera was jumping 24-48 pixels when the player first pressed "S", which gave a nasty jump effect. Still need to fix the final jump when movement finishes.
- Fixed the final jump when movement finishes.
2020-05-30
- Fixed bug where window borders would be off by 1 or 2 pixels. Caused by Floating point numbers not rounding up - BlitzMax will round to lowest value even for 0.999, so window X/Y was not rounding correctly.
- Added placeholder for enemy turns. Doesn't bring in windows properly yet, but it pauses and then moves to the next character.
2020-05-28
- Fixed bug where spawned battle enemies only had 1 hp and 1 mp.
2020-05-27
- Fixed a long-standing bug with movement range calculator. Internal values were being rounded up if over 0.5, which meant any terrain with a non-normal movement value was always rounding to 1 and giving an infinite path size. Now rounds correctly.
2020-05-09
- Player can now select other entities to attack.
2020-05-05
- Updated target selector to use actions instead of a system for animation. Make it easier to reuse code and everything is kept in the state handler now.
- Player can now cancel attack cursor and return to the menu. Everything animates correctly.
2020-04-26
- Cleaned up debug console code updated commands to work the same way -
i.e. commands that list things now use
ls
as a standard (previously some weredump
andlist
etc).
2020-04-25
- Selecting "attack" from the battle menu will now target the first enemy in range. Animations work correctly (i.e. the target cursor appears, moves to the enemy and then enemy stats appear).
2020-04-23
- Added rendering of attack ranges. Created a
GenericRange
class that bothAttackRange
andMovementRange
extend. Works pretty smoothly. - Can now select "attack" from the battle menu. If no enemies are in range a message will show and then the player goes back to the menu.
2020-04-22
- Added
AttackRange
class. Pretty similar to theMovementRange
class, but with helpers for working with attack ranges. - The "Attack" option ofthe battle menu is now highlighted if an enemy is in range when the menu is opened.
2020-04-18
- Tidied up the state machine code for battles.
- Added
andThen
functionality to background actions. This could previously be done usingwhenFinished
on the service and listening for a specific action, but it's much neater this way. It's particularly helpful in state transitions.
2020-04-11
- Converted all hard-coded state handling in the battle screen to use
StateMachine
class. Lots of ugly code hanging around as the previous system used states to manage transitions (e.g. it had a "fading_in" state which is now handled in a state transition). Needs a lot of work, but it's working. Next step is adding friendly attacking.
2020-04-08
- Update
StateMachine
withupdate
andhandleInput
methods. Can now add state handlers that will execute during update and input handling. Added autoloading for state and transition handlers. Adding meta fields to the type with a tag and the state/transition name will allow it to be autoloaded.
Saves on typing and makes the code look cleaner, although it does mean you need to be more organized with where handler types are defined.
2020-04-02
- Removed a bunch of junk code from the offline battle screen. Next step is to
switch it to use the state machine system used by UI screens. It currently
uses a whole bunch of constants in a large
switch
statement. Not ideal.
2020-04-01
- Added random placement to battle zones.
2020-03-28
- Fixed MORE bugs in the give process. Nearly all bugs are related to the UI not being updated when states change. Mostly because I forget to add the code.
2020-03-23
- Cleaned up some screen code and moved state machine to base
StackableScreen
type. Nearly every UI screen will use it, so makes sense to have it in a central place.
2020-03-16
- Changed "weapon class" to generic equipment class. Can now configure armour classes, so that it's possible to have accessories that only specific classes can equip.
- The "give item" process now shows if an item can be equipped, and only shows stat changes if true. Also shows how many of an item the character holds if the item is not equipment at all. Visual polish is all that's left for this part.
2020-03-09
- Added actual stat changes to item tooltip
- Fixed bug in Pangolin with word-wrapping
2020-03-08
- Fixed another bug in the give screen - can now give items to other characters after the initial give. All that's left now is a little polish and adding item swapping if the target's hands are full.
- Added pixel border support to bordered boxes
- Added drop shadow support to bordered boxes
- Updated appearance of tooltip to use a border and shadow. Makes it much clearer.
2020-02-26
- Fixed a bunch of little bugs in the offline give screen. Still need to fix a missing message box, but it's finally nearing completion.
2020-02-20
- Fixed a bug in evaluator service where string data was not getting returned. This meant weapon and accessory names were not showing on the inventory screen.
2020-02-17
- Updated state machine to support multiple "from" states in a transition. Previously transitions could only support one state to another, which isn't very flexible (or state machine like).
- Updated "give item" process to support equipping the passed item
- Updated "give item" process to go back to the character select screen once an item has been selected.
2020-02-15
- Added portrait configuration and some temporary portraits to the "give item" screen. They don't look great, but at least they work.
2020-02-13
- Rebuilt the "select recipient" part of the "give item" process. Now shows item stat changes in a separate window, instead of modifying the table. Much, much happier with how it looks and works.
2020-02-08
- Started polishing up the "give item" process. Lots to do. Need to fix up portraits, need to fix how the table is displayed (so stat increases/decreases) are shown and need to tweak some message box sizes so text doesn't run off. Some of this will be re-used by shops and equipment screens, but right now it feels like a lot of work for not much gain.
2020-02-02
- Consolidated a bunch of script functions for managing flags and sessions. Looks much nicer now, and removes some dead/duplicated functions.
2020-01-30
- Created a new resource type for portraits. Holds the position of the eyes/mouth and defines the speech sound.
2020-01-21
- Created a utility class for creating menu animations. Basically just extracted some untidy code from the ClassicMenuScreen and stuck it out of the way.
2019-12-28
- Added basic drop charts. Can select a random item from the chart, and they are weighted accordingly. So now we can have an enemy that has a 1% chance of dropping a rare item. Haven't decided if I want these to show in the enemy inventory when inspected (like they do in SF2 / SF3). Probably will.
2019-12-11
- Fixed a message box sizing bug and caused another.
- Added "Character switched hands" message when giving a weapon to the same character.
2019-12-08
- Fixed a really silly bug with text typing that was cutting off the last character in message boxes.
- Fixed another silly bug where the inventory was being marked as full even
when there was space. Tip: inventory is full if
held_items >= max_items
, notmax_items >= held_items
.
2019-11-12
- First prototype of a UI state machine is now working. Next step is to wrap up the offline drop process in a state machine. After that I'd like to make it entirely data driven so it can be configured in the data.
2019-11-10
- It's been a very, very long slog but I think I finally have a system for UI transitions that will work the way I want.
2019-10-21
- Cleaned up some of the offline "drop item" process and changing how states work. I want to get this screen working and polished before moving on to the "give item" process. Once I have these two working I can start designing a more data-driven approach to the screen system and how transitions work.
2019-10-05
- Started working on making UI development a little easier. It's currently a mix of rules and ui definition files, and the actual code is an absolute mess. It's probably going to take a month or so to get it where I want it to be :/
2019-09-17
- Getting items from a barrel is now 90% done. The inventory code could use a little reorganizing, but the process works. The player can look in a container and find an item, and it either goes to the leader or the next available character. If no characters are available, the item remains in the container. Only thing left is to tidy things up and add item box support in the future.
2019-09-16
- Started work on adding item containers (i.e. barrels that contain an item, rather than money). This is a little trickier as there's not always room to receive an item. The current plan is to allow two options: one is that the item stays in the barrel, the other is that the item goes to the "item box" (like Shining Force on the GBA handles it). Item box support will probably come later and will be configurable in the rules.
2019-09-11
- Added translation helper service and script function. This can be used to fetch text (such as "%CHARACTER% investigated the bookshelf") from a configuration file rather than it being part of the script. Tokens can also be replaced if needed. The final step is to tie this together with the "Character looked in the pot" script.
- Looking in a container to find gold is now completely implemented. Text is fetched from the translation file, tokens are replaced and flags are set correctly. All behaviour is totally scripted and configured - nothing in main game changed (with the exception of adding the new translator service).
2019-09-08
- Added a pot that contains gold using only script commands. Next step is adding translation to the text.
2019-08-15
- Added string list field support to the content database. Previously string lists would have to be set using internal fields or as strings and then manually parsed. Now they are set automatically. Makes it much easier to set things like shop inventories.
2019-08-01
- Fixed bug with signpost background having a slight opacity. Caused by the message box reverting to rule settings when opacity is set to 1. Instead it now checks if opacity is -1 which prevents overrides.
- Started work on extracting some common gameplay screen stuff to
OfflineGameplayScreen
. Mostly setup and asset loading that is done by battles and towns.
2019-07-31
- Roaming NPC's now stop walking when you talk to them. Honestly not sure why it works, but it does.
- Added support for random text messages with entity:say. Might put it all
into a single script command eventually, although
entity:say-random
is explicit about what it does. Passing a list of text toentity:say
implies that they will say line after line (which they don't at the moment, but might in future).
2019-07-28
- Fixed bug with background actions queue not correctly clearing after initialization. Was causing the game to crash on exit if an entity turned. Fun.
2019-07-27
- Entities can now turn to face the player when being talked to. Returns them
to facing their old direction when done. Not really happy with the solution
as it stands - currently have to call
entity:say
instead ofmessage-box
, and then a script function creates aMakeEntityFaceDirection
action. The action part is an ok to wrap everything up as it's called from other places. Just seems like a lot of effort to turn an npc.
2019-07-24
- Tidied up the offline town screen to use some new helpers in the base screen.
- Fixed bug where roaming NPC's that were stuck would crash the game. NPC's try random directions until one is found where the can move. If no direction was valid, they would check infinitely which locks up the game. Now they only check each direction once and if all directions are impassible they'll wait for a random amount of time and then try again.
2019-07-18
- Characters can now be given a movement path from the pathfinding service to follow. Not 100% perfect as entities don't always stay within the grid, but it works and is animated correctly.
2019-07-15
- Fixed the battle character movement bug from yesterday. Created a new
BattleMovementSystem
that works likeActorMovementSystem
, except it updates the x and y position. This also fixed an issue with the battle range not correctly showing enemy positions.
2019-07-14
- Land effect window now updates when moving the player.
- Came across a really weird bug when moving the character (but not really because it's my fault). NPC's have their X/Y position decreased when they first move so that the player cannot move into the square they are about to occupy. However, this breaks player input as the x/y is never decreased so they slowly shift across the map. Need to rethink how this is done.
2019-07-12
- Fixed a bug in the battle stats window where the HP/MP bars would be in the wrong position. Caused by setting the x/y pos when rebinding the ui element in the element builder.
2019-07-08
- Fixed a weird bug where character would keep moving when switching back and forth between battle cursor and player input.
2019-07-05
- Fixed some pathfinding bugs that caused it to get stuck in an infinite loop when building the final path. It's still quite slow for large paths :/
2019-07-04
- Got the pathfinder hooked up to map data and running as a service. Needs some optimization as it currently builds a map collision grid every call, but doesn't really need to do that.
2019-06-30
- Cleaned up A* pathfinder class and removed a bunch of debug code. Should be easier to get it running in a service now.
2019-06-02
- Created a basic A* path finder based on the code from the Blitz version of Shining Online. No idea how that actually functioned given how messy it is. New version needs hooking up with map collision data.
2019-05-30
- Added
--debug
flag that enables debug listeners for Slime and resource reloading. Starting these services took around 1 second and there's no need for them 99% of the time.
2019-05-26
- Added blinking and speaking animation to portrait request.
- Fixed bug in
EntityBag
where null entities were still present after acompact
operation. This caused the priest screen to crash when checking for exhausted team members.
2019-05-25
- Added custom "Portrait" request to wrap up entire portrait + frame image.
2019-05-09
- Updated offline town menu screen to be more configurable. Can now set which actions happen for each menu item.
2019-05-03
- Added manual "inspect" option from the menu.
2019-05-02
- Removed some repeated code from
OfflineTownMenuScreen
. Still needs a bit of work, but it's much more readable now.
2019-04-28
- Rolled entity query builder into pangolin and added some tests. works quite nicely and makes entity searching code more readable.
2019-04-27
- Started working on a simple query builder for the entity service. The idea
is that instead of hand writing "if entity.hasComponent()" etc, I can create
a query that will run the checks instead. Something likes this:
blitzmax self._entityService.query() .. .hasComponent(componentToFind) .. .hasFieldValue("attack", 100) .. .getResults()
It's still early days, but it's working for basic entity type searches.
2019-04-07
- Added support for customizing menu icons and tooltips via the rules database.
- Fixed how menu effects are cleared.
- Added "flash frame" menu effect for switching between two icons and made it fully configurable.
2019-03-18
- Added a random delay to the start of roamers. Prevents all roaming entities from moving in unison.
2019-03-17
- Roaming NPC's now check for collisions with scenery.
- Roaming NPC's now check for collisions with other entities.
- Player now correctly collides with NPC's. Just before an NPC moves its
body
component (which is used for collision) is expanded by 1 tile in the appropriate direction. This blocks off the square it is moving into as well as the one it is moving from.
2019-03-15
- Started adding an entity that can follow a path. Didn't really work how I wanted it to so scrapped it and will try again in a couple of days.
- Added NPC's that can roam around an area. Needs collision detection before it's totally ready, but it's kind of neat to see them moving around.
2019-03-14
- Added an action queue to
BackgroundActionsService
, so that actions can be run sequentially. At the moment this is only used on the battle screen to animate the land effect and stat windows. In SF2, the land effect window appears first and then the stat window. Previously this had to be animated with callbacks or using state checks. These animations are now wrapped in aTransitionPanel
action and pushed to the queue.
2019-03-13
- Full (placeholder) battle loop is now working! Can move your team members around and finish their turn by staying. Enemies always stay in the same place, but they work. Huge amount of polish is still needed, but it's a positive milestone. Next step - attacking and enemy ai!
- Updated active character to flash when in cursor mode (like SF2 does). Doesn't look particularly nice, so I may change it to fade the character in and out instead.
2019-03-12
- Added the battle menu and added turn ending. Currently messing up due to the
way events are executed. The menu sends an event when it is exited and when
a selection is made. When "Stay" is pressed the
selection_made
event is fired and then themenu_exited
event, so the main battle state gets reset straight after the selection. It's a mess. - Cleaned up the menu slightly. It now sends 3 events -
selection_made
,menu_exited
andselection_cancelled
. The new event means the state can be reset when nothing is selected, but left alone when the screen is exited due to a selection being made. Still not 100% where I want it to be, but it's better.
2019-03-01
- Added a placeholder for the battle options menu.
- Updated the classic menu screen to use menu item constants instead of hard-coded numbers. Makes things much more readable now and also fixes some bugs with incorrect options being shown.
2019-02-25
- Add some component auto-loading helpers to the base screen. Component info can now be automatically loaded using a meta-field instead of manually fetching it.
- Tidied up the cursor code and added boundary checks to prevent it going out of the map.
2019-02-14
- Added basic cursor control when removing focus from the current character. Lots of polish to do here; camera movement isn't working quite right, behaviour isn't 100% true to SF2 and it can't move diagonally.
- Cursor now moves diagonally and pauses for 1/4 of a second after the initial move. Camera is still messed up and the cursor can go out of bounds.
2019-02-13
- Added actual character data to the character info panel. Everything is currently done via the ui system and it actually worked which makes a nice change.
- Land effect panel now animates in correctly. Stat panel looked a bit weird so I'll keep working on that.
- Active player can now be moved around their movement range with proper collision and animation.
2019-02-12
- Movement profiles have been added. Each entity has a movement profile that defines how much each land type affects them. All of this is now hooked up to the movement grid calculator.
- Added placeholder land effect and character info windows to battles. Need hooking up to actual data, but they look ok.
2019-02-09
- Movement grid now flashes.
- Movement grid now takes land types into account when calculating the movement grid.
2019-01-29
- Updated movement grid to take entity team into account. Players can pass through other playable characters but not enemies. Likewise, enemies can pass through other enemies but not player characters.
2019-01-27
- Rebuilt the pangolin xml tileset loader to remove the dependency on libxml.
- Added a "tsx" tileset loader (from Tiled). Can now export tilesets from tiled and load them straight into the game, or convert them to binary for faster loading.
2019-01-17
- Updated movement grid to take other entities into account.
2019-01-13
- Basic movement grid is now calculated at the start of the player's turn. It doesn't take buffs or land effects into account yet.
- Movement grid is now rendered in the correct position. It's ugly, but it shows. The current rendering system made it pretty easy to integrate, so that makes a nice change.
2019-01-06
- Created a Shining Force style movement calculator. Basic obstructions are working correctly, and there is also support for land effects. I'm not convinced land effects are 100% accurate, but they're close enough for now.
2018-12-23
- Added a custom resource for storing UI definitions. These were previously treated as raw files by the resource manager, which meant they couldn't take advantage of resource caching or preloading.
2018-12-19
- Added custom event for working with Entities. Only used by the UI at the moment.
2018-12-02
- Can now give an item to another character. It's a little dodgy but it works.
2018-11-24
- Fixed a couple of bugs with the inventory menu not switching states correctly.
- Started work on the "give items" process.
2018-11-23
- Updated another two screens to use UI binding. Removes a LOT of code.
2018-11-22
- 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.
2018-11-10
- 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.
2018-11-03
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.
2018-10-30
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.
2018-10-02
- Accidentally fixed a UI bug where elements were getting added to the renderer twice.
2018-09-29
- 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.
2018-09-27
- 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.
2018-09-15
- Spent two days fixing UI interaction bugs. My least favourite thing.
2018-09-02
- 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.
2018-08-19
- 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.
2018-08-10
- Character summary screen now takes weapon and armour stats into account.
2018-08-07
- Character magic screen now shows information about a character's spells (MP cost, range and power).
2018-06-22
- Started work on item tooltips. Lots of info to squeeze into a small space.
2018-06-17
- 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.
2018-06-10
- 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.
2018-05-12
- 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.
2018-05-09
- 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.
2018-04-22
- 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)
2018-04-10
- 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.
2018-04-09
- Messed around with some menu effects, but nothing looks particularly good. Going to try animations and "pulse" effects to see if that helps.
2018-04-08
- 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.
2018-04-03
- More work on equipping items. Lots of UI animations and interactions which is a bit of a pain. Slowly getting there.
2018-03-26
- Menu transitions in and out are now working nicely. Fixed up a few animation bugs at the same time.
2018-03-25
- 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.
2018-03-23
- 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.
2018-03-05
- 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.
2018-03-04
- Team list can now move between characters which updates the top inventory window. It works quite well.
2018-03-03
- 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.
2018-03-02
- 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.
2018-02-28
- 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).
2018-02-18
- 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.
2017-12-26
- 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.
2017-12-24
- 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.
2017-12-20
- 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.
2017-12-15
- Cleaned up interface panels. Not very exciting.
2017-12-13
- Added a placeholder for promotions. Actual promotions are going to be a little bit tougher.
2017-12-12
- 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.
2017-12-11
- 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.
2017-12-06
- Added callbacks for when sprite animations finished. It's now possible to
add a sprite behaviour (such as
FadeSprite
) and then callwhenFinished
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 theupdate
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.
2017-12-05
- 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 inShowMessageBoxAction
. 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...
2017-11-21
- 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 :(
2017-11-20
- Improved the UI builder and loader.
- UI definitions can now set defaults for child elements. Cuts down on typing a bit.
2017-11-18
- Added icons for two magic spells: egress and blaze
- Added very basic magic info screen to characters
2017-04-01
- 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)
2017-03-31
- 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.
2016-12-29
- 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.
2016-12-20
- 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.
2016-12-18
- 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)
2016-10-25
- 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.
2016-10-24
- Added a few new console commands.
world
for querying objects in the world database,events
for listing event listeners andlisp
for interacting with the lisp script engine.
2016-10-09
- 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.
2016-09-18
- 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.
2016-02-15
- 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".
2016-02-10
- 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.
2016-01-30
- 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
2015-12-26
- 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.
2015-12-12
- 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.
2015-09-07
- 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"
2015-09-05
- 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
2015-08-29
- Removed some legacy script functions and cleaned up a few services.
2015-08-23
- 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.
2015-08-09
- Script functions can now check their argument types and throw exceptions that contain useful debug info (for a change).
2015-07-06
- 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.
2015-07-05
- Started working on the status menu. Split each panel into its own section to prevent it getting too complex.
2015-07-03
- Story levels can now specify a script file. They can also hook into the start, end and on-loaded events.
2015-03-09
- 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.
2015-03-03
- 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.
2015-03-02
- Status screen now fetches character data from the World. Also add a highlight border for when character is selected.
2015-03-01
- 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.
2015-01-28
- 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.
2015-01-25
- 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.
2014-09-13
- 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.
2014-09-12
- Added a couple of new script helpers for working with lists:
nth
,random-list-index
andrandom-list-item
. This is used for the newdisplay-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.
2014-09-11
- 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.
2014-09-10
- 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.
2014-09-04
- More work on getting the scripting system integrated.
2014-09-03
- 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.
2014-08-23
- Started integration of new scripting engine.
2014-08-15
- Added a really simple "shake" effect to shake the camera around. It actually works.
2014-08-14
- 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.
2014-08-08
- 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
2014-08-07
- 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
2014-08-06
- 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.
2014-08-05
- 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
2014-08-04
- 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.
2014-08-03
- 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.
2014-07-30
- More code cleanup of systems. Cutting away unused & badly written stuff. There's quite a lot.
2014-07-29
- 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.
2014-02-17
- 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
2014-02-16
- 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
2014-02-13
- 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
2014-02-08
- 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
2014-02-07
- Moved a bunch of old world server code into services
- Converted main server listener to a service so it now works properly
2014-01-28
- 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