Archive for category UnderKeep

Embarassing Code

Like any art – As we game programmers grow in our skills and abilities more often that not we can look at our past projects and be embarrassed at some of our ideas and implementations.

Most people don’t get to look at your code, unless you’ve released open source software of course. Infact, I’ve heard a good reason to make your project open source is just because other people can look at it, for that reason alone, you are compelled to make it good.

I’ve had a few “what the hell was I thinking?” moments which each of my finished games, and that’s just the finished ones. Some of the unfinished projects that never saw the light of day had horrendous ideas – like that time I tried to implement my own scripting language and parser in VB 6 with a whole lot of select statements and if-then-else trees that ended up wider than the Mississippi.

I would still like to program my own scriping language (or Domain Specific Language or DSL as all the cool kids are calling them these days.) But now at least I know it’s a difficult problem that involves a lot of Hardcore Computer Scienceā„¢

So here are a few things in my finished projects that I implemented bady

  1. Star Cars – My first serious attempt at becoming an independant game developer was a 3D arcade title that I no longer advertise on this site due to vista incompatabilities and requiring a hardware transform and lighting supported video card. It had this had a really long, really complex collision detection algorithm that got to the point where I didn’t actually know how it worked. It got that way by me trying to solve the problem, attempting a solution, where-in the implementation would cover 80% of the cases, then I would just hack it until it worked. There was one edge case that I could never figure out – It turned out that it was easier to change the level mesh, than try to debug that horrible code.
  2. Caverns of Underkeep – Most of the design decisions for Caverns of Underkeep turned out very well, infact most of the game engine structure is being ported to my current project, but there is one part of the code thats just downright bad. And that’s how I implemented the modal dialogs – I did this weird thing where I would put the gamestate into a “modal mode” and all events would be routed from the active game state into the modal dialog class and then I would poll an object until its value was non-null which would return the gamestate back into its normal state, passing the newly created object back to the client gamestate – Don’t worry if you didn’t follow that, it’s kinda hard to explain without pictures and flow charts and things, which kind of illustrates my point. Now this method worked, but it was stupidly complex, my new method of rendering modal dialogs is to do a hit detection against GUI elements before they can process events, and simply masking the background so only the dialogs elements are exposed to the hit detection.
  3. Attack of the Meeplings – Originally Attack of the Meeplings was going to have powerups and I had this cool idea for a spread gun, unfortunately I couldn’t track down a bug in my code that was not allowing for symmetric vectors for the bullet paths, ie if v is a vector then v mirrored would not have an angle symmetric with v which gave it this lopsided look – I played with this for a day before just giving up and cutting the idea of powerups. I think it had something to do with the location of the centre pixel of the bullet, the spawn location of the bullet relative to the player, and the fact that I was rendering at discrete values (ie pixels) on the screen. Really this problem shouldn’t have been all that hard to solve, but I decided at the time it just wasn’t worth it to fix.

1 Comment

Video Game References in Caverns of Underkeep

There are a number of references to other video games in Caverns of Underkeep

I wanted to put alot more in – Some obvious some not so obvious, but maybe I’ll just save it for the next Roguelike.

Super Mario Bros

plant1.gifplunger1.gif

Everybodies favoriate Italian plummer.

Quest for Glory

antwerp.gif

The Antwerp from Quest for Glory I

Doom / Doom II

lostsoul.gif

The Lost Soul aka that annoying flying screaming thing.

Many Other Roguelikes

ampersand.gif

Many roguelikes use Ascii to display the game. I thought I’d just throw this one in as a tribute.

1 Comment

Caverns of Underkeep Updates

Another week another batch of updates for Caverns of Underkeep

This time there are only a few minor corrections/improvements, the game is probably very close to a 1.0 release – I would still like a nicer gui in the town though…

  1. Bug Fixed – Multiplicity of items now taken into account when calculating your score.
  2. If you don’t use any magic you get a +2000 bonus to your score (the barbarian automatically gets this of course.)
  3. Drinking mana potion sfx distortion problem resolved.
  4. Bug Fixed – Carry capacity had an ‘off by one’ error (you could only carry one less than what it actually said)
  5. Bug Fixed – Game incorrectly told you that if you increased your endurance you could carry more.
  6. There are now 200 arrows in the shop and each bundle of arrows that you find randomly generates 4-8 arrows (previously 2-6)
  7. Hall of Legends now displays the top 16 scores (to stop an overflow display error)

I should probably create an extended hall of legends to be displayed on the webpage.

7 Comments

Caverns of Underkeep Updates

I spent the morning making some changes to Caverns of Underkeep

  1. Fixed a double move bug involving moving the mouse as you are being attacked by a monster.
  2. Corrected the Antwerp graphic
  3. Fixed alignment issues with # of potions text
  4. Disarm now auto-attempts to disarm all adjacent traps – no longer need to use the mouse to select a trap
  5. Fixed a couple of spelling errors
  6. Little Blobs now drop pink acid
  7. Bandit archer damage lowered by 1 (again)
  8. Error sound plays if not intelligent enough to identify an item
  9. Potion of permanant strength and Potion of vigor now play sfx and output text to the console when used.
  10. Added short cut keys for some of the spells
  • (H) eal
  • (F) ireball
  • (B) less
  • (T) own Portal
  • (M) eteor Shower
  • (E) nquire
  • (P) urple Death

1 Comment

Caverns of Underkeep – Now Four Days without a NullPointerException Error!

According to my logs, the random freeze bug that would happen ever so rarely has not occurred for four days now. This could mean one of two things – Either my logging system is broken, or I fixed the bug :)

If I did indeed fix it (random crash bugs are really hard to fix) then it was because I wasn’t calling Thread.Sleep(10) in my main loop. Apparently if you don’t do this the operating system gets in a big huffy at you as it has a hard time juggling all of its other tasks and decides to punish you by arbitrarily and non-deterministically crashing – Sort of like the toddler who decides they’ve had enough walking, so in protest they just sit down and will not move.

PS : I’m still playing around with the web design of this site. Hopefully I’ll be able to simultanously launch the new site and a new game in a couple of weeks

2 Comments

Caverns Beta Updated

Changes made to the beta version today

  1. Can double click in shop to buy items
  2. Heartbeat SFX doesn’t play in town
  3. Bonus to XP if the player clears all the traps on a level
  4. “The walk back to town…” dialog removed
  5. SFX added when you perform a transaction in the shops
  6. Can now buy pants and helmets in the armour shop
  7. Display xp required for next level up
  8. Play error SFX on fail to equip an item
  9. Can now buy the water walk boots from the magic shop
  10. Using a potion no longer takes up a turn
  11. Archer Bandit maximum damage lowered by 2
  12. Removed “Do you want to use the elevator…” dialog
  13. Ranged attacks actually take the ranged weapon damage into account :)
  14. Fixed mis-named item, “Cursed Boots” is now named correctly
  15. Gain +1 attack and +1 armour when the player levels up (rather than +1 attack or +1 armour)
  16. Can buy multiple potions from the healers shop
  17. (Y) and (N) work as shortcut keys for yes/no dialogs
  18. (Enter) key works to dismiss ok dialog
  19. Increased Maximum carry weight by 25%
  20. Can now select ogre avatar by using the left button (previously only avalible if you pressed the right button)
  21. Alpha value for blinking prompt on custom name dialog fixed
  22. Added 20 words to the wordchest dictionary

14 Comments

Caverns Beta – Still some more work to do

I just finished a play through of the game with a friend and I have a page long list full of (mostly easy) changes to make, it’s funny how much stuff you can simply forget. Stuff that you fully intended to do (and have written the code for) but you just forget to hook it up at the right place.

The list is long, but it’ll proably be less than a days work to implement most of the items on it.

So yeah, there will probably be an update to the beta less than two-three days after releasing it :)

No Comments

Caverns of Underkeep Beta Released!

Yippie! Balloons and cake for me!Caverns of Underkeep has reached Beta!

Play the game here

The only thing that remains on my to-do list is to tidy up some of the interface artwork (such as in the town) I’ll keep the game in a rolling beta status. Which means I’ll patch it if someone finds a bug that needs fixing and in about a months time I will call it release version 1.0

5 Comments

Caverns of Underkeep – The Road to Beta #3

I just finished adding a highscore system to Caverns of Underkeep which is the last priority 1 feature on my list before beta release – yay!

You can rank players by score or by the number of turns it takes to finish the game. Scores are only recorded if you beat the game.

The last few tasks that remain are fairly simple and will just smooth out a few of the sharp edges – I’ll have to give the game a proper playthrough before friday just to make sure I haven’t broken anything.

The beta will probably last a month before I roll out version 1.0 – This will give me a bit of time to fix any bugs that might have crept in. A few people have reported crash bugs, which have been a real pain to track down – Because the game doesn’t crash on my computer. Although now I’ve built a logging system, so theoretically if the game crashes it should be logged on the server with a stacktrace.

And to end this post I would like to mention a) I’m working on a new game and b) It’s not a roguelike, but I’d like to do another one sometime in the future, maybe later in the year?

12 Comments

Caverns of Underkeep – The Road to Beta #2

Update for Caverns of Underkeep.

npcs.gif

I’m not an artist by any means so what you’re seeing is what I’d call passable programmer art. When you have no budget to hire someone you gotta do it yourself I suppose.

The images where made by first sketching on paper, and then taking a photo with a digital camera and loading it into Paint.Net – I then created a new layer and drew an outline of the original sketch. I couldn’t just use the original sketch as the pen lines where a bit messy and I drew the images on lined refil pad – Lesson learned.

I had to use a mouse to do the outlines, which was a bit hard and why the linework isn’t too smooth. If I plan on developing my artistic side a bit more I think I’ll have to invest in a graphics tablet.

Programming wise I’ve been reading up on PHP the last few days, so I can save game information into a mySQL database. I’d like to find out how many games of Caverns are being played and to what frequency the different character classes are being chosen etc.. I’m also going to start building the ‘Hall of Records’ soon which will be viewable in the town and will list high scores and other statistics.

The most frequent feedback I’ve received with regards to the game is that people really don’t like having to walk all the way back to town to sell their stuff – So I’ve added elevators. There’s one on every level (except for the last one) and you can travel between levels freely, provided you have already visited the level you want to travel to. This should cut down on commute times.

The date for the beta release is going to be fri 8th feb 2008.

I also want to start on a new project next month, I want to do something much shorter than Caverns – A two week project would be nice.

2 Comments