Projects » Shining Online » Development Notes

Development Notes

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 and lisp 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 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.

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

Leave a Comment