new version with minor changes and source code

July 15th, 2010

Updated version released with:

  • inclusion of the libtcod name generator for player and everyone else with some mesopotamian-style monikers;
  • tweak of the random movement AI so now there’s random movement and random violence to test out various combat features;
  • some work done on the message system so that actions witnessed by the player are shown differently to those which are heard but not seen and with actions taking place elsewhere not shown – not to mention the new names being used for messages;
  • randomisation of all player and other stats (for now);
  • fix for tracks where the tracks weren’t showing up for the first step taken by a person but worked afterwards;
  • and probably some other things which I can’t recall.

—> DOWNLOAD <—

The zip file contains the compiled version for Windows along with the source code if you’re interested.

If you’re going to delve into that, please remember that I taught myself C++ by writing this game so it’s a mess and the comments aren’t exactly plentiful and I don’t imagine for a second that there isn’t a better way to do most things I’ve done with my high-school IT brute force programming style.

many, many changes :)

July 1st, 2010

I have made a whole bunch of changes to the latest version of my little game.

Cosmetically there is now custom font used to display the direction that creatures are facing. It needs to be improved though because the lines are too thin. Also, there is big differences with the map generator, colours and general layout.

Oh yeah, and I’ve added heaps more features – most notable of which is the inclusion of other creatures who wander around the map like chumps and there’s a rudimentary attack/defence system implemented so you can kill as many innocents as you’d like.

Next I’m working on AI and other related things so that people move around in a more interesting fashion and hopefully I can mimic some kind of realistic city population. And from there, we’ve got people fighting back and reacting to you killing others, etc and then we’ve got ourselves a bonafide playable game.

Download:

COMPILED WINDOWS VERSION

bsp-tree town generator (?)

May 9th, 2010

I’ve added a town generator using the libtcod built-in bsp toolkit and it looks ‘okay’ imho. Doors and windows and all that with random building sizes and some open spaces throughout. Here’s how it looks:

Other changes are a lengthening of the view range and removal of that previous random desert obstacles which I only had there in place of a real map generator.

COMPILED WINDOWS DOWNLOAD

I’m still fiddling with the town wall because it’s relatively lame in the way that it locks me into a square layout and it might end up disappearing. Instead I’m thinking no wall but the town density very sparse at the outskirts and building up as you approach the notional town centre. Hmph.

roguelike demo!

April 24th, 2010

Ok, so here’s a link to a compiled version of what I’ve been working on.

—> click here <—

Features include:

  • Facing and directional field of view;
  • Other creatures which don’t move yet but can see you (and which haven’t got their facings implemented yet so they can see everything around them);
  • Dummy random map generator which is worthless;
  • Sand coloured through the use of a noise generator;

Just thought I’d post it up because as far as I can tell, roguelikes using this kind of facing system are few and far between!

another dumb post

April 13th, 2010

I’ve been making some ok progress and have got my head around the ins-and-outs of libtcod to a reasonable degree now. See screenshot below for dummy desert landscape with dummy other fellas on the map and some dummy text which pops up to let me know that the field of view code is working properly.

Those little dots in the sand are… footprints… revolutionary roguelike concept right there.

Hit a bit of a hurdle with adding more creatures to the map though because libtcod slows right down when I try and calculate the field of view for a bunch of people in various positions on the map and it looks like I’ve ever got to simplify that process or simply have less creatures. Problem is that I want more creatures and those creatures seeing their surroundings is kinda essential.

I tried it with 100 and it was horribly slow and that’s without any additional AI whatsoever and pathfinding to slow the whole mess down.

c++ & libtcod

April 2nd, 2010

Ok, so last post I was playing around with python and libtcod and basically it was tremendously slow and painful and I gave up. So now I’m teaching myself C++ and it’s going ok despite the fact that I still have no idea exactly what I’m doing but that’s never stopped me before.

This is going to become a desert wasteland where you will have to use your wits to avoid becoming a rotting carcass buried beneath the dunes.

Woot?

:)

February 9th, 2010

basically this a post to prove that I’m still alive and actively working on things.

run and hide! has taken a back seat because I got bored of the idea but I need to get it finished because I’m 90% there (argh) and despite being bored, I’m still such a fan of the directional FOV and movement system!!

Otherwise, I’ve been playing around with python + libtcod to see what I was capable of putting together. And while both of them seem great, the end result is always so slow. Even the examples I played around with seemed slow as heck. And that was with limited creatures being created and with no pathfinding and no complicated AI and basically nothing. Boo-urns.

Right now I’m playing around with gamemaker to get a semi-roguelike set up which will effectively be a complicated real-time city simulator (inspired by teh dwarf fortress obviously) because I want an easy way to play around with AI so I can assign my little fellas a home and a workplace and some leisure activities and friends and families and names and likes and dislikes and on and on until I give up on yet another project.

So yeah, hey, thanks for stopping by.

run and hide – first appearance of the revenant

December 30th, 2009

Hullo.

Many changes to run and hide! Most noteworthy is the creation of a new enemy – the all-powerful REVENANT (represented artistically with a bright red ‘R’).

Basically, it’s a much tougher undead adversary which moves twice as slowly as the regular zombies. But instead of rambling around mindlessly and chancing upon its victim before charging, the revenant senses where you’re hiding and relentless hunts you down (albiet slowly).

So, the game scenario has changed somewhat to a horde of shambling zombies roaming the town with three (at the moment) mysterious spirits methodically hunting you down no matter where you hide.

The biggest change in this version is behind the scenes and was necessary for me to include the new monster type – that is, the creation of a pathfinding algorithm which analyses the nooks and crannies of the map and tells the monster which is the shortest direction to your hiding place. Now, every step you take the game calculates an x by y array of values which shows how many steps it is from where you are and the monsters use that to find you.

True to form, the end result is somewhat goofy. The revenants prefer to keep walking straight but once they need to change direction, they make some odd choices as a result of my shoddy programming. It’s not exactly a problem because they still take the shortest route, but they often sidetrack off on unnecessary diaganols rather than taking what would seem to be the simplest path. I’m working on fixing it, but it’s not a priority at the moment and it’s probably something that I notice more than the casual player would.

Hopefully, this gameplay change removes the ability of a player to hole up in a remote house and wait it out as the zombies fail to find them. Now, there will be three angry and near-invincible R’s showing up at the front door which will force the player to run for safety (and probable doom).

There’s a bunch of other changes which I forget because I’ve been working haphazardly over the festivus season – but I don’t think there’s any major game-breaking bugs jumping out at me. Just ignore that test variable half-displayed at the bottom of the screen – I need that for debugging the pathfinder and since you asked, it currently displays the maximum number of steps it would take to get from the @ to the furtherest point on the map.

Next programming arc is to develop items, and with it, a possible game ending (???) where the player can find the necessary items to escape with their life.

And to do that, I need some java schooling because I’m a dunce at this. Please enjoy my latest offering in the meantime.

ps. I’ve taken down the archives of source code because I can’t be bothered doing it anymore. In the unlikely event that you want the code then post up a comment and you can have it.

:^)

run and hide! wootage increased 15%

December 3rd, 2009

New version is up and includes the following additions:

  • scrolling map with the player at the centre;
  • much BIGGER map with a HUGE town;
  • heaps more zombies who spawn much more quickly;

That’s the increased wootage factor, but I found some crippling bugs, etc at the same time which has decreased my hoped wootage significantly:

  • I made the zombie spawn code part of the display drawing code for no reason whatsoever and basically it’s retarded because when you scroll up and down the zombies just multiply like crazy as the applet redraws itself (I’m a bonafide moron) – easy to fix, but not going to be done tonight;
  • the increased spawn factor make it very obvious that zombies are only spawning on the south of the map for some unknown reason, or more accurately, because I made a simple mistake and didn’t realise it – so I guess that could be explained by saying the zombies invade from the south (for plot related reasons), so if you want trouble then you should head in that direction!! – again easy to fix, but not now;
  • town is somewhat lame at this size because there’s not enough variation and there’s not enough grass and basically I’m not happy with it – it still woots damn hard though because the maze-like streets are good imo;

Have fun. Will update again shortly with fixes and more features.

Items are probably going to be implemented next and will inevitably suck the fun out of programming this silly game.

Source is here: http://magnuscanis.com/runandhide/runandhide-v4.zip

run and hide! fixed

November 22nd, 2009

After prematurely uploading the last version, I’ve put up another one now with a number of changes:

  • doors are back;
  • windows aren’t back yet;
  • map generator tweaked slightly to remove a few minor problems;
  • a bunch of new colours added so the game looks a lot better;
  • macabre death message added to mock you when you go to your eternal rest;
  • some other small stuff which doesn’t really matter (and which I’ve forgotten about).

There’s still a couple of issues with it.

Firstly, the map generator is stupid and is supposed to use 5×5 squares on the map to generate houses but I didn’t think it through properly because that of course means that the inside of the house needs to be 3×3. So, instead of that, I let the house go one square into the neighbour to the right and to the bottom. This has the positive effect of optimising the space by reducing wall thickness to a single square simply.  It has the negative effect of making streets running along the southern and eastern sides of houses to only be 4 squares wide – and this can often vary sloppily to 5 squares if the houses aren’t consistent. Not a huge deal overall.

Secondly, balance and gameplay needs to be tweaked. I think that combat is slightly too viable an option at the moment, and I’m toying with beefing up the strength of zombies to make it more unattractive. There’s also an issue where you can tuck yourself into a tight corner and just wait and rack up the points without a zombie stumbling onto your hiding spot in a very long time. Re-implementing windows will help alleviate this and I guess it’s just the nature of the type of game I’ve made, but I’ll have a think about it.

Old version is archived here: http://magnuscanis.com/runandhide/runandhide-v2.zip

And while I’m at it, latest version is here: http://magnuscanis.com/runandhide/runandhide-v3.zip

EDIT: Ok, so it looks like the death message isn’t aligned properly and I can’t be bothered fixing it yet. Please take a relaxed approach to casual online personal computer gaming and don’t bust my balls about it.