Sunday, 16 October 2016

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.

Sunday, 25 September 2016

Alternate Reality X - Release 0.75 - Changes

With the public release of Alternate Reality X 0.75 looming for the end of September 2016 I thought I would talk a little bit about what you can expect to see, what I didn't manage to add and my general approach to have the completed 1.0 release in your hands before the end of the year.

I had planned for this release to complete ALL the elements of the City and the Dungeon that I see as combat and encounter related. I didn't achieve that for a number of good reasons but I did make some very significant steps that put the project in a much stronger position than it was in before. One of the big changes was to add all the remaining Dungeon monsters as to date only the Well Lit Area and Fixed Encounters had been added and to animate them all.


One major change which I had not committed myself to making was using the original 8bit Dungeon monster data directly from the binary files. I was previously using simple text files which whilst easy to update had numerous errors, lacked a lot of information from the real data and were prone to spoiling of the game / opportunity for cheating from players. In addition to this I had built up similar text files for weapons in the game - an amalgamation of weapons the player could buy, monster weapons and unique items you could stumble across (e.g. the Sword of the Adept).

One of the great features of Alternate Reality (the Dungeon at least) was that it had a very flexible system for customising monsters and items in the game. Many games at the time would have had fixed object sizes with no opportunity to modify those objects in game. The Dungeon in contrast allowed very rich items and monsters which contained a mixture of attribute data (name, bonus to hit, sharp damage) with effects (curses, give off light) and directly included 6502 (the processor used by the Atari 800, Commodore 64 and others) code. In game objects could also be dynamically created in game (clothing in the City) or modified through player actions (weapons having enchantments added at the Weapon Enchantress).

So after a lot of thought I made the decision to use the original binary data. Using some great information provided by Brian Herlihy a few years back, I replaced the original monster loader and also added in support for loading in all their weapons and attacks. These are stored as part of the monster data. This was a lot of work for me but once I had these changes working I felt it made an immediate improvement to the feel of the game as well as adding all those additional Dungeon monsters - about 50 in total. Thanks to Brian for this information without which these changes wouldn't have been possible.


Another major change in this release was the introduction of properly timed / processor speed independent encounter animation. I had information on encounter animation from old emails from Jim Norris - thanks Jim! - so I used these to hopefully produce a fairly accurate recreation of the Dungeon encounter animations. As part of this work I totally rewrote the main encounter loop and the way that monster and player "turns" are taken during combat and how multiple opponents are dealt with. Monster attacks now use the proper attack descriptions (whomps, slashes, chokes etc), can hit multiple player body parts and can also knock the player to the ground.


Behind the scenes I re-organised some of the game code, introducing more source files to try and better segment and compartmentalise different code areas (e.g the actor source files refer to encounters, load in the binary data, create their weapons and attacks etc). All these changes meant a lot of knock on changes - some foreseen, others not. These took time to sort out. I've probably not caught all of these issues yet.


With the introduction of all the new Dungeon monsters and only limited new encounter art I took the decision to temporarily disable the new media options - these will be back in a future version. I also disabled the W command to force an encounter as it seemed to be a source of problems and encounter frequency checking has been re-written in this release to check regularly for new encounters. I had to tone this down a bit as encounters seemed to be happening back to back!

The other feature missing from this release is the ability to pick up monster weapons after combat. There was a very practical reason for this, namely that all monster weapons are now stored in a new format and location whilst the player inventory / object buffer in the game uses a totally different system. In order to allow for the custom weapons of the Dwarven Smithy and enchanted weapons from the Enchantress this system will need to be updated and this in turn will impact on all the existing shops where weapons, armour and clothing can be bought. This work will be the focus of the next release with addition of adding in the original item binary data from the Dungeon to introduce all those special objects into Alternate Reality X such as Trump Cards, Eyes, Wands and Horns. Trying to add these into release 0.75 would have added a lot longer to the development time and I was keen to have a release out before then.

In order to have the 1.0 release ready for the end of the year I have had to focus tightly on what needs to be finished and priority on the gaps that need the most work and will add the most to the game. This may mean that some of the extras will go on the back burner for the time being but I think it will be well worth it to have a complete, integrated City and Dungeon Alternate Reality world to explore! Hopefully these decisions make sense but as always I'd love to hear your thoughts. Watch out for release 0.75 coming very soon. Thanks.

Friday, 26 August 2016

Alternate Reality X - August 2016 Dev Update



Here's a new video providing a glimpse of the new encounter animations and further plans for development.

Friday, 24 June 2016

Alternate Reality X - The Final Stretch


Following my announcement that I'm planning to complete release 1.0 of Alternate Reality X (ARX) for Monday 5th December 2016, the final stretch of development work has begun! It's great to have that clear goal in sight. I'm pleased with progress since the announcement but there is still a lot to complete before December to get all the features added so I'll need to push myself hard and stay focused. I'll be devoting the majority of my free time to making sure I meet my target, chipping away at small issues when I have a bit of free time and maximising the time I spend on development. I want everyone to be able to play a complete, fully integrated City and Dungeon for Christmas 2016! Visualising that goal tells me it will be a great personal achievement for me - and hopefully players will enjoy the results too!


As I go into this final stretch any assistance people can provide through donations to the project, however small would be particularly helpful. This support helps in a few different ways - it allows me to better justify the (very considerable) time that I spend on coding ARX to my family, helps cover some of my small development costs such as webspace and small hardware/software purchases and permits me to spend more time focused on development. The PayPal and Patreon details can be found at the support page here.

If you've donated in the past either through PayPal or Patreon then you have my sincerest thanks - it makes a big difference to me and has really helped me to keep developing ARX - probably more so than people realise. Alternate Reality X would not have been possible for me without your support. I've been thinking about ways to better convey my thanks once the project is completed and I have a few ideas which I think players would like.


My main focus for development is ensuring that 100% of the original City / Dungeon content and features are implemented for the 1.0 release in December. I've temporarily disabled some of the alternative graphics and music options to allow me to focus solely on ensuring the original games are completely re-implemented. Hopefully everyone is ok with that as a temporary measure - for me it makes managing the project easier and allows me to focus better on the key features which aren't in place or fully completed yet.


I've worked exclusively on encounters and combat recently. I've rewritten the main loop that deals with combat so that ARX now has a sensible turn structure with the player and opponents taking turns as well as adding in options for surprising characters, deciding whose "turn" it is first. One of the main reasons for rewriting this was so that animation effects for encounters as well as backgrounds (rain and other weather effects) could be added. I've added the encounter animations now which I think makes a big difference to making the game feel more complete. I'm now working on adding more encounter features. Release 0.75 will focus solely on encounters as there has been a lot more work involved in rewriting this part of ARX than I anticipated. I'll also be adding all the additional encounter weapons that opponents can carry such as Unholy swords, flaming pitchforks and diamond daggers among many others.

Release 0.76 will focus on all the other items and treasures that you can find in Alternate Reality (horns, eyes, tarot cards). I'll have more updates and possibly a video shortly once I sort out my screen capture software. It's going to be a bit longer before I have the next release out as I'd like to add more new encounter features first. Thanks for your support and interest in ARX.