Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.






Crawling For Fun

Posted by freeworld, 23 February 2013 · 606 views

Dungeon Crawl Stone Soup

I finally crawled back into the world of RougeLikes, I could never bring myself to play any ASCII version consistantly. I've been hooked on 'Dungeon Crawl Stone Soup'. Which has a graphical version (tiles) aswell and is updated quite alot.

The mechanics are similar to D&D rules. You start off as a single guy trying to get to the bottom of a dungeon, steal an orb and get the hell out. Simple as that.... until you play it.

My favourite and the most fustrating part of the game is the immense unknown. The first time you die on the first floor cause you drank a potion of poison will make you scream and laugh all the same. You'll quickly learn how fragile you are and that everything in the game can be a deadly threat. The moment you feel strong you're almost gauranteed to slip up and send your hero to the grave.

Aslong as you can transition to the "take your time" attitude, you'll find the game easy enough but it could take years to actually beat it.

Rough RougeLike

A post or two ago I mentioned a random dungeon generator I was messing around with. I figure it's a great jumping point for trying a small RougeLike project of my own. So I put together a simple prototype, just melee combat.



I've spent a bit of time working out the base structure of the game, the objects and divisions of the program. Hopefully it's just a matter of
coding it all now. The major roadblock I'm trying to decide on first though, turn order and queueing actions. In the prototype, there was only two actions a creature could take, items can't take actions. They either walked, attacked or did nothing. It was pretty easy to queue a simple struct like so;
struct ACTION
{
user
target;
type;
}


An actionProcessor object would store all the actions in a vector, then when it came time to process the turn. it would sort
them all by the users speed and process the actions one by one. I plan to use something similar, but I'm also storing creatures, items and all
other objects different then before. Before, the handles to the actors were very loose. The actor could be nonexistant and the handle could
still be used. it would just cause the action processor to disregard the action entirely once one of the actors wasn't found. This wasnt a
bottle neck what so ever in the prototype, but I wouldn't think so with only 15 actors present. I plan on floors with 200+ objects present all
the time, so looking through an entire list of objects everytime I want to find one isn't going to work.

I decided to go with a simple quadTree container that will be used to store the actual objects. Then the controllers and actions will use iterators into the sub containers that hold the objects. The actions take pointers to these iterators as aurguments for the user and targets of an action. This means iterators can't be removed until all actions are processed or so voodoo needs to happen to remove actions with iterators that were removed while it's processing, and that just seems wasteful. Simply checking if either is invalid because of death or out of range or etc seems more logical.

Now that I'll be using more fragile pointers, and quite alot more actions; also with items being and other objects possibly part of a given action
but not all. It makes it a bit more complicated. Hopefully it'll all come clear after I finish my list of every action I want to be possible.

I already am thinking I'll have seperate processors for item type with specific functions for the different actions / effects that can occur because of those items. Equipping as simple as it seems is a perfectly good example of an action.
// basic action info
type = action_equip
user = self
target = self

// equip specific
equipment equipment

The action processor can read that its an equip actions which would then pass all the data to equipmentProcessor.actionEquip(....), these could simply be utility functions. I'm thinking of using a base class action that has the basics, user, target, type, but will also have a processor id. This id will simply tell the main action processor which sub processor to pass the action off to. Then that processor will know how to recast it and process the action.

My brain is brimming with ideas now... Happy coding, next time I should have a worth video ;)

Posted Image




Man, roguelikes are what got me into game development. I can remember playing Nethack back in 1993 or so, hitting the local paper retailer's rack of shareware floppies to get the latest version I could. I'd spend hours trying for that stupid amulet. Crawl has taken all the things I loved about that early version of Nethack and amped them up. It's currently my favorite RL. I'll be keeping an eye on this to see how you come along.

I never could stick with netHack, but its been a few years. it was always the better looking ones in my opinion though. I'm an annoying fanboy when it comes to 2D over 3D, I still think Red Alert 2 has far better graphics than any of the 3d Command and Conquers. I think that's why I've been so hooked on Crawl. It's got the great gameplay that comes with a big rougeLike and the nice interface of traditional 2D games.

 

I'm aiming for complete mouse support though, so any keyboard shortcuts will be few beyond moving, I think it'll make it a bit easier to manage basically just two buttons. It'll keep the possibility of too many things happening at once out of the picture with the way I laid it out.

Latest Visitors

PARTNERS