Devlog - Improve My Game Jam 27


During the Improve My Game Jam 27 I would like to accomplish these two things.

◈ Finish an already started refactoring of the games code base
◈ Implement an in-game editor that allows me to add objects at selected places (should make development and testing easier)

With these preparations, game has a  solid base for adding new features. Depending on how much time will be left, I will tackle some of these as well.

◈ Infestation - some buildings are infested by rats, they will attack when players don't scout
◈ Rats - new enemy that will steal food items from player during battle, to heal themselfs
◈ Killed rats can be prepared and roasted at a fireplace
◈ Weapons durability can be fixed with tape
◈ Human Corpses can be found in buildings, spawn and allow Searching


Since this second list of features is probably the more interesting one from a rating perspective, I'll go into more detail about which ones I implemented during the jam in another devlog.

Why refactoring?

The current codebase (native HTML, CSS and a lot of JavaScript) was created over the course of a month from scratch. At the end of this month a playable version had to be available, so I was forced to find lots of shortcuts and hacks. The result is a convoluted and tightly entangled mess of codes related to visual  aspects,  data processing and event handling.

A clean separation does not exist, I use DOM nodes for semantic structuring as well as for persisting, reading and restoring data. This second data-related part is critical, as it makes extending the game with more mechanics and features almost impossible and prone to all sorts of bugs.

Goals of refactoring

Refactoring is intended to create a clean separation between data objects and their visual representation. Changes should then be made exclusively to the data itself, the visual part merely represents the data and accepts user input. The whole thing should follow a component-based approach, whose most important (though not the only) object is the card.

Some numbers

Currently there are:

  • 35 different cards
  • 12 card types
  • 10 actions with different properties, which are individual for each card type
  • 3 card states, which in turn affect actions
  • 56 items that can be collected

Since this was only the hasty beginning, now is the right time for a big cleanup.

Comments

Log in with itch.io to leave a comment.

(1 edit) (+1)

sounds like some interesting features will be added, I'm looking forward to it!

(+1)

Looking forward to seeing the progress!