Archive for May, 2011

Updates and Game Design Stuff

Posted in Uncategorized on May 30, 2011 by sfahy

The flagstones are now randomly rotated when being placed and I added a slight gradient to the diffuse texture to emphasize the effect. They look nice and uneven now. I’m going to add a rule to randomly replace the textures on some tiles with lighter and darker variants.

I also added in a door replacement rule that replaces some wall and door sections with an alternative model.

What I’m trying to do at the moment is build up a solid base of “generic” architecture before moving on to specific room types, such as library or temple. Rooms that have a specific function will be decorated to reflect it.

It’s a strange problem to try and reason about the architecture of a dungeon. They only really exist to serve as gauntlets for intrepid heroes, but they’re often characterized as functional structures that were built for specific purposes and uses.

The characterization in Apotheosis is a bit different – The dungeons are part of a kind of “dungeon dimension” where heroes fight to become gods. The gameworld is characterized as a sort of divine chess game the gods use to entertain themselves.

This creates interesting problems and opportunities regarding what kind of rooms make sense in the dungeon. Strange eldritch machines, traps and the like make sense because the game world is supposed to reflect an actual game, but it doesn’t make sense to portray the dungeon as being built for anything other than to be adventured through.

The method of progressing is stolen from influenced by the game flOw.

There are two different kinds of portal that are dotted randomly about the dungeons – one kind leads to an easier dungeon than the current one and the other kind leads to a harder one. Elements within the dungeon are leveled and balanced to the dungeon’s “depth”, and certain kinds of monsters and items only appear in the lower levels. I firmly believe that Oblivion style leveling is a gyp and takes a lot of the fun out of progressing. The fact that the game will use separate, discrete  environments that smoothly ascend and descend in difficulty means that dynamic difficulty can be added implicitly as a function of the players choice rather than mapped to their character.

I’d like the game to be balanced, but I still want it to be hard. One of the of things I love about RLs is the policy of malice they have towards the player. Completing most roguelikes requires superhuman skill and dedication. I’d like to preserve that as much as possible, but the transition to real time means that some things would lose their value and just become frustrating. Fighting off a horde of enemies in real time and then keeling over dead from thirst would be more a pain in the ass than anything else. As much as possible I’m attempting to transition the strategic elements of RLs to real time in a meaningful way, rather than as a compromise.



Posted in Dungeon Generation, Screenshots on May 28, 2011 by sfahy

The dungeon now features nicely rounded corners. This was added through the tile query/replacement system, a use I hadn’t anticipated for it, and it worked without having to add any crufty code. It uses the same objects and processes as any other element. I’m really glad I took the time to design a robust system for using assets procedurally, as sprouting new systems every time I want to add a new rule would really stink up my codebase.

I’m going to force myself to move on to more gameplay oriented aspects for a while, like room connectivity, because I could literally spend forever adding little architectural variations that don’t directly relate to the gameplay, and the game must ship. Still, it’s really cool to see things come together visually a bit more.

I’m really excited about the gameplay- I want to combine the things I love about rougelikes with a more action oriented style of interaction and a few trippy ideas about progression. The high level of proceduralism and clean division of the game code into separate systems means that experimenting with different gameplay ideas should be feasible, and implementing sweeping changes in response to testing should be possible in a short space of time. I really want to have the magic system integrated to the point where it can operate in natural but unexpected ways.

For example, arrows are controlled by a simple physics system, and one really cool thing that happened while I was screwing around was that when using a spell that causes objects to be attracted to you, arrows that come near your character are pulled into orbit around you, meaning that you can collect a swarm of arrows and walk up to an enemy, or release them all in the middle of a crowded room. This is an emergent quality of the physics, magic and projectile systems and to me is a lot cooler than a “swarm of arrows” spell that your character craps out on command.

On an utterly unrelated note, I think i’m going to replace the small coble stones with flagstones, as they’re too noisy and don’t read well when moving the camera at speed.


Posted in Dungeon Generation, Room Connectivity, Screenshots, Uncategorized on May 27, 2011 by sfahy

Just a random screen dump from the game as it now, the dungeons are still bare, I don’t want to start adding “furniture” until I have a robust system for distributing it logically in appropriate rooms, as well as a good design for the game logic that underpins it’s use.

Below, you can see a directed graph showing how each room is connected. The overall connectivity forms a tree structure that fans out from the center. The next stage in dungeon generation will be to examine this graph and connect branches of the tree to each other in a manner that results in an easily navigable dungeon. I’d like to have this happen in a manner I can easily control, for example to specify the optimal cycle size in the graph and the generation system approximate this. The important thing is that I end up with a variable or small set of variables that I can tweak, because only testing will reveal what level of room connectivity will be most fun to play.

Naming System

Posted in Name Generation on May 27, 2011 by sfahy

The game implements a relatively simple system for generating random names, that gives pretty good results and is flexible enough to be adapted for several situations.

For example, the game generates books of forbidden lore that adversely affect the player’s sanity. These books are intended to have Lovecraftian sounding names, and are generated as follows.

A random entry is selected from a template file that contains strings such as these :

Dark Truths of [elderGod]
[evilAdj] Truths of [elderGod]
The Coming of [elderGod]
The Call of [elderGod]
Secrets of [elderGod]

The text in the square brackets refers to other name generators, and is replaced with the results of the generator it references.

So, for example, Dark Truths of [eldergod] becomes Dark Truths of Ithboth.

The elder god generator simply strings together random syllables, as the name being unpronounceable is actually desirable in this case, but it could just as easily return from a list of standard names, and some of the other generators do exactly this.

Some entries contain references to no additional generators, and refer to a fixed name, in this case one of several widely referenced “evil books” like The King in Yellow etc. It makes sense for these fixed entries to be selected with less frequency than template entries, and I plan to add that feature.

If it becomes necessary or desirable to have a more robust entity name generator, a Markov chain string generator can be added without altering the overall structure of the name generation system. As fun as that would be to implement, it would be complete overkill at this stage of development. If I’m spending time adding any nuanced features at the moment it should be to systems that relate more directly to the gameplay. Still, it would be a nice little feature to eventually add.

Here’s a sample of the output for the Forbidden Lore generator:

Malign Circle of Zharglelghast
The Maw of T'sa
The Muncriliulus Codex
The Black Rites
The Capsius Codex
Pnakotic Manuscripts
Foul Circle of Shogysizhar
Circle of Otepu'llshog
Book of Iod
The Book of the Yiggnoh
Insane Truths of Gan
The Putrid Maw of T'sa
The Saurian Age
Ghastygthclot's Eternal Eye
The Glelxicygth's Baleful Whispers
The Malign Apocrypha of Sothstligy'go
The King in Yellow
Liber Ivonis
Maccius's Hateful Journal
Insane Truths of Gan
The Maw of Gug
The Muncriliulus Codex
Ghastnazclot's Eternal Eye
The Zharglelghast's Malign Whispers
A History of The Necronomicon
Diseased Lies of Gugzothshog

Hello !

Posted in Uncategorized on May 26, 2011 by sfahy

I’m starting this blog to chart the development of Apotheosis , which is a 3d role-playing game which attempts to capture the spirit of rouge like games, but with a more action oriented style of gameplay.

The game’s content will rely on procedural generation as much as possible. Dungeons are generated with a simple algorithm and heavily modified by various heuristics. Items and enemies will also vary heavily, and a deep magic system with room for gameplay emergence is planed.

So far, basic dungeon generation with a room tree data structure has been completed, as well as a simple grammar for swapping out tiles to achieve a more integrated visual appearance.
The basic shader has been written (diffuse ,specular and normal maps, exponential fog) as well as camera control and input code.

By the time the project ships, it should have quite a few cool graphics features, such as depth of field, motion blur, omni-directional shadow mapping.
The game is being written in C# and XNA, and once finished, if anyone actually wants to play it it’ll probably be ported to native OpenGl. I’m taking this approach because I don’t expect to run into any significant performance issues, even with managed code, and in any case, the odds of actually completing the project are exponentially increased by sticking to XNA.
I hope to update this blog regularly with explanations of features, planned finished or in development, as well as screenshots of the game as it progresses.
Mostly, posts will consist of my intolerable rambling about technical nuances that interest only me, but I hope that at the very least this blog will help me set my thoughts in order, and explaining myself (even if I’m the only one who reads it) should help prevent the accumulation of bletcherous code and nonsensical gameplay features.
Also, I hope to get better at explaining myself to people, because I am haunted by blank, uncomprehending stares.

I hope to update soon with an overview of what I’m working on, I’ll finish with a screenshot of the game as it is now: