Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Teemu

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
The rpg system is becoming quite interesting and this was kind of an accident more than anything else. Wearing a disguise is going to have much bigger role, because the protection is different in each one. You can choose to be in disguise or get the max protection from different parts of armours. It feels nice to be fine tuning the system, because pretty much everything else is ready. The shopkeeper AI is still bit iffy, I hope it's not too difficult to fix.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Visiting more levels, then loading game crashes.. Tried to look at the save file, there is something strange going with undefined values for game objects I guess? I don't know, it's at the end of the file, I should actually check out what is saved there. It could be just player's items. Now that I think about it, it could be "easy" to check out by saving a string of some kind with player's inventory items.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Entered into testing phase. I made a neat debug routine which jumps to next level in chronological order more or less, so I don't have to walk through any of the levels unless there is some kind of item I need or I want to test that level. In the first run of testing I want to check out what items and other objects are created in levels, and also keep an eye on that save/load bug, trying to figure out when it exactly appears.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I tried to write a makefile to compile Teemu in Linux, but I.. kind of failed. I know I would have done it sooner or later, but instead I wrote a python script to compile and link the project. So, I found out that in Linux (at least in my computer) SDL2 seems to have a double buffer, which looks strange in turn based game, because in every other step the screen shows random crap in places where the game doesn't draw anything. Windows 10 -version doesn't have that problem. I wonder what is going on. -Wall in Linux found exactly one warning, could fix it, it's just unsigned - signed mismatch.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Also, I found out after 15 years of using SDL2 that it does actually have a double buffer. Well, then. I guess the only weird thing is why and how it works in my Windows 10 PC without redrawing everything.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
After a successful installing of SDL2 from source code (there is a youtube video about proper install procedure, the wiki manual doesn't work) on my intel OSX I was also able to compile Teemu to OSX with the exact same script, which I placed on my github page just to have some content there:

https://github.com/paulpekkarinen/Comp
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Rewriting display routines. It's not that bad, the only thing to remember is that you need to fill the entire screen per turn. Display routines became a lot simpler actually, because they no longer need to check if something has changed etc.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I made a new "release" tag for the project management file. It gives more realistic picture of the project, because only tested modules can get release tag. Testing is quite interesting problem in projects like this.. I don't know if it could be possible to write automatic tests for stuff, testing here means I'm testing manually if something works. The release tag seems to be a good idea which I'm going to apply to all my projects.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Testing is indeed something that took a bit long time for me to figure out. If there is something that becomes complex it's quite easy to run tests for that feature. Like for example when message routines get complex, I can run all the permutations and see if they work. Sure it takes some time to write tests and sometimes you need to add debug functions to access class data, but it's worth the trouble. Maybe I can even finally nail the RPG system problems by writing clever tests for it.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I would say I'm on a release run. Mainly checking out stuff, but there are couple of problems I need to fix before I can start to playtest. This game is going to suck, well at least the first release of version 1.3. If I can fix the RPG system then it will suck less.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I have a plan to just go for release after I can perform a playthrough myself. It was already quite hilarious. I learned that wielding a rupee gives way more attack power than just punching, then I was killed by a panda bear in the ship beach. Also, I had an "idea" to use 'H' as handle weapon (wield), but it's just too weird, so back to 'w' = wield.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
There is a need to touch the source code, because I can't get the AI logic to work properly. I think the reason is OOP in this case... but there is a solution, I just need to extract everything AI to procedures and simplify classes related to those tasks. It seems to work when there is too much confusion.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Reprogrammed mood and movement logic for 52 minutes. Movement logic code is now much shorter and cleaner. The mood is just an AI mode which determines what the creature wants to do at that moment. There is still some weird stuff happening with the mood meter, it seems like when a creature gets angry the mood meter no longer works. The idea is that if the player hides somewhere the creature can forget him if the mood meter runs out, and also creatures don't attack right away so it's possible to hide before they get angry. To run and hide from combat is going to be a major feature of this game.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Used Valgrind for the first time. Teemu compiles on Linux with the same source code as in Windows. Valgrind did find one bug in savegame database routine which is now fixed. Not sure if that bug was the one making savegame data go bad sometimes. I can also use -fanalyzer in Linux (gcc) which is reporting quite a lot, have to check out those properly to see if there is anything that could compromise the code. I have suspected that there is some kind of memory corruption situation going on.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I guess -fanalyzer is quite unreliable, based on what it tells and what people tell on the internet. Anyways, playtesting is on and I'm trying to make small tweaks to survive, because the game kicks my ass quite hard, it's difficult to stay alive. One of the reasons is that HP doesn't regenerate by design, but I'm working on a feature which makes possible to restore HP in situations where you really need it.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Shopkeeper's trading routines were in the shop room's class so I made an actual Shopkeeper game object class inherited from Humanoid class, like Player. What I now need to fix is save game. It is clearly buggy, I can see it's randomly saving some trash when you have been visiting more levels. This one is going to be difficult, because I have no idea what is going on. It could be even some kind of memory corruption bug, those are quite difficult to find. Frankly, I think the save/load style itself makes it hard to find the bug, because it's just continuous data which is supposed to be saved and loaded exactly the same way. It is possible to add markers for the sections so I can at least see what sections have corruptions. Obviously save/load should work without bugs, because everything is so simple.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
In the process of figuring out where you get score I create a generic list of actions you can do, excluding UI stuff (like viewing inventory etc.) and navigation. I counted 26 different (generic) things you can do. 27th will be drinking from terrain sources, it's a missing feature. 26 doesn't seem a lot, but it's still 20 things more you can do in Elden Ring.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
There is something fishy in the save game data. It seems to save weird things like 0053 values which could char values, but.. I need to find out which char arrays are saved and where, because if it's a integer value then it's maybe going to work in the conversion, but it's also the source of crashes later when more levels are saved. Strings could be also marked with $ or something like that, but there aren't that many strings saved anyway. The only thing I can even think about is the player's name.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I think save game routines are more or less ok, but they could be trashed by some kind of memory corruption. I could try to replace some C library functions with modern implementations. It could possibly help, because you can catch exceptions in some cases. In save game the integer to text conversion and back is the critical routine that could fail.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
While trying to bake some gui parts to textures I found a bug in the font shadow routine which I had been wondering about like months. Each theme has same font colors, but their shadow has different color based on the background color of the theme. However I had forgot to actually change the font shadow, it was always using base theme shadows. That's why they didn't look right, although they didn't look bad either. Also I realized alpha values can be used for shadows which makes some shadows work better in light themes. The base routine for shadows can't match all font colors with theme colors, but for those I can later tweak them manually. Font shadows has a "classical" trick that they are reverse of the font color which makes font colors look more vibrant I think.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Still hunting for the save game bug. It seems to trigger even when visiting only three levels, so it could be the amount of save games or something you do that corrupts the file. I have to add debug headers in save blocks to see what part of the save game is corrupted, but it seems to be in the level data I guess. This bug is different what I usually have, it's quite annoying.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I think it's fixed. At least I was able to run to the shopkeeper level and it's still working. So it was the RLE encoding in level data array, I think it was writing and/or reading one past the size of the level, so I made absolutely idiot proof routines to first make sure the index is always confirmed and second the way data was saved and loaded doesn't read or write from invalid index. It's funny, I was using a "raw" (not confirmed) index to a raw array... it's something I've always said not to do, but I was just too sure about the routine, even though it was actually quite bad. I wonder if I wrote that code before I got my medication? I did lots of questionable things when I had brain fog and now I've been reading some of my code and thinking about how I was 100% sure it was quality code.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Today was a nice day, I was working on one of the hardest parts of the game and it's ready soon. I'm kind of at the testing phase, but not yet with the unfinished rpg system and stuff like that. Fighting is too slow, that's for sure. It takes ages to kill one enemy. The player has to do more damage, but also somehow be able to flee from enemies.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
I decided to create a meta-data file for text data, there are (soon were) 13 files for text data which I cut pasted to one file with tags to determine where a piece of data is located. The raw data loader is now ready, but I have to figure out how to give that data to routines that were previously using their own file loaders etc. Now when everything is in one file it's easier to encrypt it. I think it could be (?) funny to release this game as 'alpha' when some practical stuff is done, like that data file. Just release it without thinking about finishing the RPG system, make players alpha testers...

Edit: Replaced file name parameter with reference to data class instance and a tag value to point to the right location. Not the cleanest way for sure, but it works. Also did something I almost never do which is that I debugged parsing routines to see if it's really getting the data properly. Seems to work for the first piece of data at least. If some data is misplaced it's quite easy to spot when playing the game.
 
Last edited:

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,630
Made a simple encryption tool for text data, because of course didn't want to use any existing libraries etc. It's using only xor to change the data, but even that makes me wonder how easy it is to decrypt without knowing the password. The brute force routine should check if the decrypted text makes any sense, right? And if you add something like permutation of text pieces, how can you determine how it was changed? I guess there are ways to do that.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom