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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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,648
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.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
I'm again trying to use a calendar for planning. I'm not a long term planner, so I just decide what to do, write it down and then try to work for 30 or 60 minute slots. It seems to work, you just "manifest" work time for some project and there you go. As an unrelated news I got my first reading glasses, because I noticed fonts on the screen began to look blurry. Glasses kind of suck, I didn't know this before. At least I have to turn my head like Batman, because if you try to turn your eyes to look at the edges of the screen it doesn't work that way, the sharp spot is at the center of the glasses.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Testing cavern creation, this is only one way to create caverns, but apparently it doesn't work at all. I don't know what I was thinking when writing that routine, it looks quite silly. Must have been before I started my medication, it has cleared brain fog big time. To make this work I need to figure out percentage distance from the edges of a cavern, because in some cases you want edges to have some other type of tile. Then I have to create some special caverns with maybe using existing routines like forest creation, or maybe using object creation logic from those routines to determine an object at any location of the cavern.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
I had to modify flood fill to make caverns work as I wanted. If you have an array based flood fill it doesn't work, because you run into edges of it if there is an irregular seed, so I changed it to list (vector) based flood fill. If you just let it run like that it creates a diamond shape, but if you add extra seeds to edges of the fill it will become more or less "round" shape, and you can preserve the seed value which means you can create concentric zones based on the distance of the seed from the origin. I'm using only simple stuff like some percentage value of the edge will be different so I can create stuff like a cavern with a lake in the center. I'm quite happy with this routine, but it still needs trees etc. objects to add on top of the terrain generation.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
I was sick the whole last month. Thought I was going to die, but wasn't that lucky. Spent almost an hour to write a class called Random. It's going to be full of static functions so they are named like Random::Shit(); which returns some random number. Not that I needed that, but it looks clean and you can put all(?) random determinations in that class rather than all over the place.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
I think I'm going to work on a specific game world interaction at a time and try to get it as ready as possible, for example kicking anything. In this, as I mentioned earlier, it's somehow just better to use procedures rather than fill classes with virtual functions, because classes tend to become complex and also trying to figure out what is happening is harder. In a function you can create the events of kicking and check out special cases etc. It's not great looking code, but it's easier to implement and maintain, because you know kicking only happens in that one procedure, or more than one if it's practical to split it.
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
The situation with graphics is kind of difficult. I need to redesign all game object graphics and I'm trying to think about how to make tile graphics readable. I realized when I was fixing a missing character class frame bug that I couldn't figure out what those frames try to represent. You can't read small details of 32 x 32 tile in 1920 x 1080 resolution. It has to be done some other way, maybe using color coding or something like that. Or... ascii...
 

Krice

Arcane
Developer
Joined
May 29, 2010
Messages
1,648
Then again graphics design is the last thing to worry about. Missing char class frames were easily explained when I was just using magic numbers for class frames and forgot that classes were re-designed and also one creature type was removed with all character classes, yet they were in graphics data file. So, at least for char classes I'm creating defines. Strangely I also found weird tiles at the end of the creature graphics file. Don't know what is the deal with that, maybe they are some kind of placeholders, hopefully.
 

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