Updating zones to match the dungeon/ ma

I just wanted to do a quick update on what I’ve been doing for the week. So I was going through the code, to update Zone information inside the dungeon. Part of the update was to make sure that the temperature of each zone in the dungeon matched the remake. There’s a website on the internet that shows the dungeon maps of all the different levels, with detailed information about description for each spot. If that spot is a fixed encounter fixed treasure, and etc.  It also has information about zones.  I was using this information to determine zones data to look up in the assembly code for detail. after wasting about 2 days on this I determined that part of the code on the guy’s website is just completely wrong, I could not make sense of anything he was saying. So I started digging through the assembly code and figure it out that that is not zones. That is Zone definitions it’s an array of five bites and that 5th byte tells it which zone you are in.  So it’s just a list of different sections to determine that section belongs to a certain zone.  I have had to do this many times with what people published on the internet about alternate reality then digging through the code to find out it’s it’s a little off.  

In the meantime, instead of having to look at data files for maps to determine spots.  I have created a map editor, this map editor will load a module and display it on the screen.  The visual part of the map is based on the mini-map that the the ARX had inside of its code. It has been expanded since then to become a map editor. you can hit a key and it will display all the zones highlight each Zone in different colors. you can click on a spot it tells you information about that spot like description XY location if it’s a special spot what kind of special spot if it’s a fixed weapon then it tells you what weapon it is.

I’m working on the editor to be an actual editor, right now you only can view everything about the map. I have to put in the gooey to be able to create input fields and stuff like that. My plan is to use this map editor to be able to create expansions. The plan for the map editor is to be able to create an entire module not just the math but weapons spells and etc….

There is one thing I can think is left out in the remske, but is only related to the dungeon. That is if a spot has a special effect or dangerous effect,  there is nothing in the code to handle this.  I have not found this section in the disassembly code to determine what those effects do, I am still looking for this code to determine what they do.  I still need to locate this code and added to the remake.

 

 

Alternate reality the remake, update

I have been very busy the last two weeks, working on alternate reality the remake. It has been mostly about debugging getting the code ready for testing.  I have created a logging system that can be turned on so during testing anybody can turn on the logging system and all the logs will be saved. To a file that can be passed on, that will be easier for me to debug the issue that’s going on.  To turn on logging to a file is just a command paramter when starting.

As I was goning through eliminating bugs, I’ve come up with two things that I was not happy about.  One of the features I was not happy with was screen resolution, in the original version was “if statements” all over the code for different types of screen resolution to be able to know when to display this and that.  When I converted that to Java I made some enhancement, I created variables for screen resolutions for different drawings, those are all set at the start of the game, this allowed me to remove all those “if statements” throughout the code.  But still had all those variable and having to adjust them for each resolution.  I was never happy with that solution.  I rewrote a lot of the rendering of all the features of software, this time I let opengl do all the scaling so it does not matter what your screen resolution you use.  To opengl it’s the same resolution every single time, so there’s nothing in the code anymore for all the different sizes this will help out much better.  So the canvas for opengl is always the same thing no matter what the resolution.  This allows opengl to scale the pixel to a full screen to the small resolution of the canvas.

The second thing I found that was not going to make it easier to expand on, was the city and the dungeon was all hard-coded throughout the entire software. So I stripped out the city in the dungeon code from the game altogether. I turned each one of those into a module but the game will load at the start you tell which modules are available and it will be able to use those, that way when it’s ready you just plug it in the module. this will allow easy future expansions without having to redownload everything it can just do it in you know modules you download and install.  Each module, chain control many aspects of the game like fix treasure, fixed and counters, weather, Random Encounters, and of course the map.  

With this new module system alternate reality the remake, is turning into just a RPG game engine. there are a couple big things that would require changes for this to be 100% true. A module would have to be able to alter by adding or deleting items, spells, encounters. This is not a priority for me, I will keep looking into this but not focus on it.

Right now my focus is going through each encounter one by one to verify their fighting and functionality is working correctly. The next step after that is going through each item and verify they function properly and then finally spells. Once I have a generally debugged these items the city will be ready for testing. There there is a couple minor things left for coating but it’s about 98% code complete without the new features.

 

Encounter System

I was in the middle of debugging the encounter system.   I knew I added tons of new code to try and match the dungeon the best I could.  Like, parry, being knocked down, knocking down a monster, having your weapon knotted out of your hands or the encounter.  I spent a couple of months getting the encounter code working and adding in all the special monster code like the thief stealing, devourer sucking up your items.

As I was debugging I was also playing the dungeon and noticed that some times an encounter flees but the old ARX system.  Once a fight starts it is to the end and no encounter will flee.  So I started to look into the code to see why an encounter flees.  After I found the code and figured out what makes an ecounter flee,  my next step was when was this code called.   After researching that I locate default code of onLoad, onSurprise, onPreAttack and OnDeath code.  I have that many of these function have 1 – 6 different sections of codes based on the encounter.  Some encounter have thier own routines while most of them use a shared routine.  So I started coding all these routine into the game and that is where the flee came into on the onPreAttack code,  it has 6 different routine that is used and two of them have a check for flee in them.  So like a thief, he is more likely to flee after stealing from you or if he loses to many hit points.   There are a few that are designed to not flee at all,  fight to the death.

When I started I located a monster data where someone mapped out some of the variable of the monster.  So I’ve been able to map almost all of those variables and have implemented them into the ARX system. The encounter routine is very advanced.  Over the last couple of months, I’ve implemented parry, dodge, spell casting (you, encounter), drinking potions, knock down, being knocked down, loosing weapon, stunned and many more features.

Now the flee code is in the game with all the default code.

During this process, I found other areas of the game no FAQ gets correct.  You can lose alignment for several reason that is not mentioned.  Like,  stealing from encounter will cause you to lose alignment, but if you go ahead and kill that encounter and alignment of the encounter doesn’t matter you will lose even mose alignment, or kill the encounter that belongs to a guild that you belong to, you will lose 2 mood points on top of the alignment lose.

As I write this and research what I’m writting I see that there are a few onLoad features that are missing.  Like no monsters has an alignment of 255 but in the binary file the Knight has a 255, but it is changed on the load routine to reflect what is going on with the game at the time.  Have to implement this code.

Getting to know all the ins-and-outs of the encounter routine.  Getting really close to having almost all aspects of it implemented in the ARX system.  The game is really starting to feel like playing AR the dungeon.  More like the Dungeon then the City.  The fight routine in the dungeon is so far better than the city so, I’m basing the entire fight routine on the Dungeon.