Alternate Reality X – Release 0.8, Items and Inventory

Following the release of 0.75 of my Alternate Reality X (ARX) project I have been working on the next release. As this will be a big release and add a lot of content (item wise) this is likely to be the 0.8 release. The main focus here is to complete a lot of the remaining programming around items and the player inventory in the game with a particular focus around Dungeon items. If you look at my existing code for ARX a significant portion of it focuses on inventory and item handling. A lot of what makes Alternate Reality a great series for me is the excitement of what items you might find after a successful encounter or in the case of the Dungeon a special unique item at a certain location (E.g. Sword of the Adept, Robin’s Hood).

 

The existing ARX item code is probably the area of development that was most time consuming to develop to date and cuts across so many different areas of the two scenarios. AR had a very sophisticated system of inventory and items compared to other games of the time but this makes it much more of a challenge for someone like me to recreate for a remake 🙂 I had planned to make some very major changes to the item and inventory system, very closely mirroring the internal representation used by the Dungeon.

Why change it you might ask? It seems to be working ok? The current system does work ok but it lacks the ability to allow for items to be truly unique or modified in game easily. A good example of this are the clothes items in the City shops. These are currently limited to a subset of the original games options. In the original City these items were made up of a handful of randomised attributes which meant that the City could have dozens if not hundreds of different variations of clothing. My current system doesn’t allow for this. The other key areas which I can’t implement with the item system in 0.75 are the enchanted weapons from the Weapon Enchantress where she will (for a hefty price) add a number of enchantments to your items. modifying their existing attributes and the Dwarven Smithy who I also believe will create varying qualities of weapon depending on how well you pay him.

Some of the goodies you can find in the Dungeon for release 0.80

In the original Dungeon a block of binary data was used to represent all “active” items in the game. These included items on the ground, carried items, curses, diseases, spells and monster corpses. I was planning to recreate this system in ARX but I’ve now come to the conclusion that you probably wouldn’t see the next release until 2017 and I’m not even sure people would really see or recognise the benefits! The key things for me are to be able to obtain the flexibility of the original system above, minimise the amount of changes I’m having to make just now and be able to make full use of the original binary data (which I’ve done successfully with the monster data).

I’ve already written code to read all the original item data into ARX for release 0.8 so that part has gone well. I’ve extracted all the item names and addresses so it’s relatively straightforward now to pull out additional information for items as required. I’ll also be able to use this code to extract all the weapon data for the Dwarven Smithy items as well which will save a lot of time and messing around with text files to represent objects which I’m moving away from with the last few releases.

My original item / inventory system used a similar premise to the Dungeon with a single “Item Buffer” type array which holds all the active items in the game including what I call “volume items” (E.g. gold, silver, torches, compasses) that are effectively represented in the player structure as a single numeric value. The only issue with the current system is that it doesn’t directly hold lots of the attribute data representing items directly instead pointing to a fixed representation of the item – this need changing.  I’ve decided to expand and build on this existing system rather than directly copy the Dungeon internal system. This should save me a LOT of time changing existing code and systems that work well already. The existing system probably addresses about 70-80% of the item requirements for AR so it doesn’t seem like a good use of my time to rewrite lots of code for that extra 20% of functionality.

The “Item Buffer” in use showing carried items as well as “volume items” on the Dungeon floor

I’ve thought of another way to expand the item system to allow for the dynamic items such as enchanted weapons so these features will still be in the game, just using a different internal representation to the original Dungeon. The current system will still be able to access all that new binary item data that I’ve read into ARX as well so item effects for special items will still be accessible within the game.

3 thoughts to “Alternate Reality X – Release 0.8, Items and Inventory”

  1. That all makes sense to me. There's no need to mirror the original structure exactly, and on a modern system there's no need to – we can use as much memory and as many cpu cycles as we need to 🙂

    And although the original system allowed quite a bit of flexibility, all we need is enough to cover the items that exist in the original. We don't need the full flexibility.

Leave a Reply