Tuesday, September 27, 2011

Dungeon generation

Poks!

As I finally finished GameDirector I was able to continue on more of the content side. This time it was resuming work on dungeon creation and how to actually make player move within those dungeons, aka "stairs".

RoA has basically two types of dungeons; those which are saved and those which are not. Saved ones usually are important places for main storyline, like Astacia. Non-saved dungeons are more or less ways to develop the character and to get to event/storyline places. Hmm.. When said like that it would seem that these non savable dungeons are not important nor interested but that is soooo far from truth. They are as important as the event places since majority of the gameplay happens in these dungeons.

And to point.. I added feature that GameDirector keeps track of entrances of dungeons ( Acts, from earlier post ) and integrates entrances directly into terrain as a feature of terrain, not object. It seems to work perfectly, all data can be saved and retrieved and GameDirector tells the engine what to do next and how.

I added four main dungeon types: scatter, maze, caves and mines. Appearance of those can be further tweak within generation to make them look more random. I am still creating regular dungeon type and single/double room shop generator but those have to wait for now.

Screenshots below are as they are seen without FOV restrictions nor shadowing. When playing the game the dungeons appear, in my opinion, even better but for the sake of showing screenshots I have eliminated FOV and shadow from the game.

So here are the screenshots:

Cave dungeon, Lights are indicators of entrances

Maze dungeon

Still somewhat experimental mine dungeon. I am not 
too happy about it yet but at least it has rooms and 
shafts which connects them :)

Scatter type

Saturday, September 24, 2011

GameDirector

Howdy,

I just finished adding the main features to GameDirector. GameDirector is now in charge of saving and loading the game but also keeping track of what goes on in the different Acts. Acts are the all the different scenarios the player can encounter, basically Act class holds all the information that is needed to reconstruct a scenario player has visited or is going to visit.

When new game is launched all the predefined scenarios ( those that hold important main storyline events, mostly handcrafted map and special NPCs ) are created as Acts and stored into GameDirectors masterlist. Also places which are randomly generated are stored into masterlist but they are not saved by GameDirector unless player is within one at the time of saving.

Now I can finally turn my eye on content side. I  am planing to add one random act, one guild and one more special storyline act before I make my first release. I could release it now as a techdemo but for some reason I don't think that serves really anyone. It is better to release something at least a bit playable.

Wednesday, September 21, 2011

Done

Whee,

Im done with the saving/loading.. for now, until I add something else but even in that case its trivial to update the saving/loading functions. I made a little shortcut on Effects class tho. Effects are such a huge and complex system that for now I only save template name of the effect into file and load it back by calling effect creation function with that template name. It's not as good as it should be maybe but for now it will do.

Next thing I need to add is to give control of saving and loading to GameDirector. Currently saving and loading is done "manually" without any kind of control. This works at the moment since there is only Astacia terrain which needs to be saved and loaded ( along with its objects/npcs and such ) but when I add more places I need to be able to save all of the places not just the one the player is in. Only thing keeping eye on that is the GameDirector so I think its logical that I make the GameDirector CEO of the saving&loading CO.

On a side note.. When you save Player class I made a debug messages which shows how deep it actually goes in class hierarchy. If the deepness is calculated from going down on hieracrhy and taking account when class holds object which needs to be saved too then the deepness of player class atm goes down to 20

Player -> Living -> Inventory -> Item -> Effect -> etc etc

Persisting objects ( cont. )

Hey,

Im still working on persisting objects, aka saving/loading the game data. And I gotta say, its getting pretty fucking complex.. :p

I have had loads of school/work/family stuff also so coding has been on low priority. I am hoping to change that soon tho. Once I finish the save/load and add one more place into game I'll be releasing it for public testing..

Sunday, September 18, 2011

Persisting objects

Hey..

It's time to take better look at my object serialization. When I designed the structure for the game I made serialization interface for every object I wanted to load and save. The interface is mearly few virtual functions which have to be implemented in every class which inherits this interface. I wish making persisting objects would be as easy as just: file.write( reinterpret_cast<char *>(&x), sizeof (x) ); where x is something we wanna save. But it's not. You could do that for chars, ints and such but when there's pointers involve and objects within objects, reconstructing the object from file would be impossible.

Therefore I had to do this interface for serialization. In my code I have  serialize and deserialize. In serialize I save every variable separatly into file and in deserialize I load the variables one by one in same order I saved them. That doesn't sound too bad, and it's not, but one must be really really careful not to make mistakes since when objects serialize themselves within other objects, finding mistakes can be really really hard. Even more difficult in my case since I use gzip to compress the data.

well I gotta get to work.. its gonna be a pain but it has to be done to get saving/loading working again...

Saturday, September 17, 2011

Menu and options

Hey,

Was trying to get stuff done to ARRP but I just haven't had time ( work and family ) anyway I got my menu screen and options panel done. Options panel works completely but menu still lacks functionality of restoring saved game.

Here are few screenshots( there is descriptions about them on media pages )



Thursday, September 15, 2011

Effects

Hey

I have actually managed to do quite a lot of work today on RoA. The feature I have been working on is Effect. In my mind that is one of the crossroads or nots which ties lines together and reveals if things work as they should in the game. The Effect class is vital part of game in gameplay point of view. With it I am able to add extensive amount of different kind of armors, weapons, skills, spells, items and so on. And that is why it actually shows when implemented and tested if different parts of engine ( game ) works as intended.

Actually everything what differs stats or affects character/npcs somehow is done using effect class.. for example weapons and armors, which increases attributes, holds effects which boosts those attributes. Upon player creation player is affected with hunger and thirsty effects which are set as DOT types ( damage over time ). Undead monster have paralyze skill which uses effect  class to delivery paralyzing condition to player and player has icebolt spell which slows monsters heartbeat and walkspeed down.

Currently there are three types of effects. Single shot type which is used for potions and scrolls. It affects the player once and thats it. Then there is sustained, boost/drain, type which is used to add magical powers to weapons, armors, items and magical auras. It is affecting the player as long as that item or whatever is used, for example effect is on when player wield a sword and the effect wears off when sword is unwielded. The last type is dot, damage over time, type. It doesn't mean it has to do damage but it's something that was burned into my brain by WoW :/. Basically dot in RoA means that anything what is intended to take longer than one turn is considered as dot. For example a poison and paralyze can be dots; poison damages player every turn; paralyze lasts for 5 turns. Or  for example player calls for blessing from the spider queen and gets a boost to stats for 1000 turns.

Ah yes the spider queen.. thats more of content tho but I have to say a word or two about that lady.. I have made some designs about classes of RoA and one which I am certain of adding is followers of spider queen. These fellows don't really know anything cool stuff about magic nor any special martial arts. But what they do know is how to please ( read: do stuff of pain and agony ) spider queen and get a hold of her minions, spider demons, as a reward. Followers of spider queen has means to conjure these demons to our plane of existence and to control them. When player controls a spider demon it intrudes into players mind and alters the players body and mind towards demons own mind and body, giving player new form and new and enhanced abilities along the way. Every demon is different and power of the demon depends on how big of sacrifices you have made and how pleased the spider queen is.

A bit of topic but now that I had time....

Wednesday, September 14, 2011

Messages and language

Hey

Finally here are few screenshots I promised. It's nothing too fancy but I think its clear enough for player to use it and it gets the job done

Messagelog extended to full size, it can be scrolled
up and down currently. In this shot player knows
drow language 100%

Same as previous but player knows the language 75%

This is how the player sees the log by default

Tuesday, September 13, 2011

Message log

When I tried to do those language screenshots I noticed a bug in the message log. I got it fixed and I even improved it a bit, it can be now minimized and maximized and on maximized mode it can be scrolled so that player can go back to earlier messages. I also made some visual improvements. Ill put a screenshots on media page when I get home from work :)

On a side note, I also noticed a weird bug on my monster talking. The talk generator and "word-confusor" works perfectly but for some reason the output is a little off.. The way it works is that I send a string of what monster is saying to function which converts it depending how well player understands that languag. After the conversion it returns the converted string. Now in the function I make new char talk2[ str.size() ] which means that talk2 should be as big as str itself.. then i just copy the str content into talk2 ( and convert it if thats nessecery ). However when i print the talk2 which comes from the function it sometimes ( not everytime ) has some odd numbers and stuff after the actual string..

for examaple, str = "what is this stuff" and after conversion when i call PRINT( str ) it contains "what is this stuff\234%#\d" or something like that. I checked that sizes do match and the generator don't add those extra marks there.. im kinda puzzled..


Right, I fixed it.. There seems to be some sort of overflow in std::string class, it got fixed when I changed std::string into QString..

Sunday, September 11, 2011

Monster talk

Hey

While coding monsters I also took time to finish my language code for the npcs. Different races use different languages obviously so now the game support that too. Player starts with skill of his racial language and may learn more languages during his/her adventure in game.

Basically the system works so that player has a language skill, for example 'elvenish', and player learns better with that skill by using it or learning it from scrolls and such. Skill meter is from 0 to 100, so at 100 skill player can read everything without mistakes but at 50 its gonna take few and few more times of talking before player can understand what npc is trying to say.

I'll post some screenshots once I tweak my message system a bit more.. found a bug just now.. sweet.

Saturday, September 10, 2011

Monsters ( progress )

Hey

Now my monsters move! I managed to get the monsters to state where they register their heartbeat into TimeEngine which takes care of time ( obv. ) but also action point generation. Every living creature has actionpoints. Amount of maximum actionpoints depends on race and attributes and so does the recovery rate.

So the way RoAs heartbeat works is that player movement( or equilevant action which uses the same amount of action points ) is a heartbeat ( one turn ). When players turn is done its monsters turn to do an action, for example move. On every heartbeat monster( and player ) regenerates certain amount of actionpoints ( but not pass a maximum value, so you can't grind those points ) and those points are used when creature makes an action. If there is not enough actionpoints to spend monster loses its AI-function call. But if there are enough actionpoints for example two actions, the creature is allowed to do those in the same turn. The amount of action points needed per action is different.

Lets go for example:
Player uses 100 points to move and regenerated 100 points per heartbeat. So player can move once a turn, no more, no less.

Monster uses also 100 points to move but regenerated only 50 points per heartbeat. This means the monster is able to move every other turn, making it very slow creature

Then there is Monster2 which uses 99 points per turn and regenerates 100 per heartbeat. So if the maximum allowed actionpoints for that creature is 200, eventually after 99 turns, it will catch up with the player.


Friday, September 9, 2011

Monsters

Hey

I have had some trouble making up my mind what to code next. I got so much to do I don't know where to start :) After a while I decided to start working on monsters to get more than plain templates in to the game.

So far there are following races for monsters: spider, human, dwarf, drow, kobold, rat, mouse. Of course there are more to come but I think I can start the work with those. Before this post I had skeleton, a template, for the monster but It was basically just an object standing there, not doing anything.

I'll show how the monsters are created by using this "diagram" to show inheritancetable.


  • Monster
    • Living
      • TimedEntity
      • ActionEntity
      • SocialEntity
      • Object
        • Serializable
With this design the player class is actually no different to monster class, just replace Monster with Player and thats the design for player class. The game actually only needs Object class to make an object visible in the game world, everything else is just fine tuning stuff.

Everything below Living class is up and working but changes and new features are mainly added to Living and Monster classes. Currently I am working on some sort of random generation of monsters by race and wait to determinate correct spawn area for different monsters in map. After that I have to do some sort of low level AI for movement. The combat AI still faraway :/

Thursday, September 8, 2011

Spring object

I have been playing around with idea of objects which act as a source of liquid. When this 'spring' is placed on the dungeon tile it starts to generate more of given liquid type. This spring has a initial depth attribute which indicates what is the maximum depth of formed pool. It has also volume attribute which tells how far from the source it will expand. With only these two attributes we can form a lake inside cavern/tunnel whatever, in center would be the deepest place and towards sides it would get more shallow.

One could maybe set a direction attribute also so it would be easier to form river like pools.

Anyway with this kind of springs we could create melting walls from fireblast. Or maybe if player blasts or digs a wall and theres water behind it, it would start filling the room the player is in...

This was inspired from JADE blogpost about lakes and pools.

Initial post

Hey

This is my initial post. I just finished writing overview and media pages so go check those out and lemme know what you think of the game. I would love to hear you opinion, critic is more than welcome!

The idea of this page is to let people know what goes on and maybe its a way for me to put my thoughts in some order too.