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.

Kaduria

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Save/load game gui is ready which means I can start to test save and load game, just as in Teemu. It was quite a nice day, I made the whole thing in about three hours and also fixed Game class to handle creation of the stuff you need during one gameplay. Not a big surprise, but when loading the game crashes hard. I think it could even have same type of problems with virtual save functions that Teemu had. Also finished the project management data for this project and it is quite a beast to behold. So many tihings are unfinished, but at least it's less than 50% of the project, so I guess it's something.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Save and load game seems to work after some fixing. For some stuff I've decided to use "pure" functions outside classes, it's practical in situations where you are using a monolithic function to do something complex. Conversely if the function is split to smaller ones it's practical to create a class for it. I think classes (or member functions) are just functions that have a structure.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Also, I think small "pure" functions are good in some places, compared to a class. The n. 1 problem with classes is that if you want to use some member function elsewhere it becomes annoying really fast, because you might need to create an instance of that class, sometimes just to use one member function (or functionality it contains). Using static functions in classes is a "solution" to that, but destroying the idea of a class. I tried to keep this project OOP-based, but I think it's going to have something like 10% of code as functions, because it's a struggle to keep it pure OOP for no logical reason really.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
I'm trying to cheat attributes by using some basic data of creatures so I wouldn't have to input them per each creature type. There are already modifiers for strength in size and monster family, which is the main type of creature (humanoid, snake, frog, etc.) but I think the intelligence type could also affect str. I don't know, this could actually work. I also made same type of simulator as in Teemu so I can see the list of creatures and arrange it by some value like str for example.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Using the project management I have began to work on the items on the list and try to focus on each problem to figure out what makes it difficult, what could be done etc. These are the unfinished parts of the game, for variety of reasons. It feels like everything up to this point was kind of fun, but now the real development begins.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Going back to char generation was a riot. Almost nothing works properly, even the keyboard input routine is buggy. But the base class of generation does work quite nicely, it's just the player's part that need fixing. I think this has never been fully implemented, because for debug purposes it's faster to give the character some random values and then enter the game. The way the code deteriorates over time is amazing.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Fixed a difficult bug and the reason it was difficult: it was not in the routine I was trying to fix... ah, a classic one. Also, the reason for that bug was that I used a magic number, another classic.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Thinking about using a special map for the current level which would then "load" data from each level even though they are all in memory at the same time. The reason is that it would save memory quite a lot when you don't need object data for each tile. Levels could be even stored as a list. How to store level data has always been a problem that I've been thinking a lot, and seems like no one has a good solution for this at least that I know.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Accessory belt almost works, only the routines that use the item don't often work well, because they were written for inventory items. Since the belt stores actual items they need different kind of routines to remove and use etc. I think it's worth the trouble, because it's much easier to put often used items in the belt and use them directly from there. Stuff like rocks and other projectiles, maybe even food? Belt items are always visible at the right side of screen, so you don't need to browse some kind of inventory to see what they are. Feels weird to get something done after a break from this project.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Belt works quite ok, still a funny feature is that when you use an item it's removed from the belt and you can see it being removed, so in that I have to code a routine that removes the actual item when it's used. A big work begins with the level themes. I do have a lot of creation tools ready so it's more like making decisions what to put in levels. This I find surprisingly difficult, because you can put everything in but it would be a mess. Also, I need an actual plan with all the features I have plus creating new interesting stuff.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
I've began to work on some level themes and specific problems related to the dungeon generation. It's "easy" to add something interesting to the level after the main generation run, but it can be technically difficult if the generation is not somehow locked into a grid etc. One thing I'm going to try is first generate just a corridor and then a special room next to it. The problem I find difficult is when you create a room somewhere it can be difficult to connect, the corridor for that room can be hard to create if it's in a wrong place. This is harder with rooms that have some kind of rule where the door/entrance can be. By creating a corridor first to an empty location could fix this, because if the room can't be generated you can just leave the corridor there and maybe even create something else there, like a small cavern etc.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Corridor generation for "special" rooms (rooms that are generated after everything else) works surprisingly well compared to how simple the routine is. Since shops are probably the most common special rooms I added a vertical shop table since it allows east/west door orientation for shops, too. I'm actually adding some shit to this shit, not just trying to work on existing stuff. As always I'm using Brick Atelier to draw tiles and it's an experience, because cut/copy paste doesn't work. It's funny to find out in practice that your own program kind of sucks.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Shops with east/west facing are now ready, although the table creation is sketchy. There is a table that prevents the player getting into the shop items, the idea is that you talk to the shopkeeper who then sells you those items. Now it's just trying to figure out how to place the room related to the corridor. The corridor's "main" direction could actually be determined by the angle of it, so I could try it first. Or maybe easier way is to take the corridor start location and then go around it, finding an empty space for the room. The problem in that is that you could bias the facing if you don't know what direction the corridor is pointing at.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
It does work, although sometimes there isn't room for the room. In that case there could be something created at the end of the corridor. The routine is quite complex, but there is no other way as far as I know, because the dungeon layout is not grid-based. I think this is the right way to go about this, visiting each level theme and then figuring out what kind of generation routines are still needed.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
I've added a release tag for the project management file, which means files that are in release condition get that tag. As you would expect it doesn't look good, probably 10-20% of files are in release condition...
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,291
Testing has been a great tool to crack difficult problems in this and my other projects. Wish I had figured out it sooner, but maybe better late than never. Source code is another thing, but I'm not happy with the graphics either. I have to refactor automap tiles at least, because I can't make anything out of them myself. They have to be more specific, more like icons than anything trying to depict some real thing.
 

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