Thursday, 3 July 2014

Back to Development

House move successful. Development will now resume! Video of progress with Boss Battle music, and some placeholder sound effects.



Saturday, 22 March 2014

Further Progress

Progress Lately includes:
  • Particle Engine
  • Particles on Torches, Cauldrons and Player and Mob Impact Animations
  • Work In Progress GUI Display for Worn items
  • Pet which follows player
  • Camera Shake Effects
  • Coding for Inventory
  • Loot!
  • FIREBALLS
As a point of interest, development costs for the whole game so far are $78, not including my time. You can see the new features in the video below. Particles are quite hard to make out, I may make some of them full-bright because they can get lost with everything else that is going on, although I'm rather pleased with the opacity fade on the torch particles.



Sunday, 2 March 2014

March Update

During February, I've been primarily working on fixing niggling graphical issues - bits of pixel art that don't look right, font positioning and adding additional content from the pool of world sprites in the Oryx spriteset I'm using.

Here's the "Blue Dungeon" tileset in game:

Blue Dungeon Tileset

More content gets added day by day - but it's not just a case of importing sprites. For example, to implement Lizard Men, I have to import the sprites, then create classes for the different varieties of Lizard Men; there are archers, champions, warriors, shaman etc. These all derive from a base enemy class so the engine processes them identically in terms of updates and drawing. But there are things to set for each variation. For example:

  • Self illumination colour
  • AI Type
  • Movement speed
  • Projective movement speed (if applicable)
  • Debris type on death (Blood / Bone)
  • Display Name
Lizard Men

Then, there are the inevitable bugs that crop up even as content is added. Today, I found a particularly nasty one where a "Sword Hit" animation gets played when a projectile hits the player and then just randomly follows the player around accompanied by lots of lovely null reference exceptions. Super!

Saturday, 18 January 2014

January Update

Progress is continuing slowly but surely. Some features that have been added since the last update:

  • Mana now replenished and consumed when using weapon
  • Rooms can now contain tables
  • Rooms can now contain bookshelves
  • Barrels and Bookshelves are now newly modelled container entities which mean they can contain items
  • GUI updates to reflect levels of health and Mana
  • Minor GUI fixes
  • Better lighting for mobs
Now looking like this:

January Update
Was very interested to view Vlambeer's advice on building better action games. Happily, I'm already implementing a lot of the ideas presented in the video. One particular idea I'm keen on is making more dynamic use of the camera, so scrolling slightly in the direction of the mouse cursor; camera recall when firing etc.

Although I have managed to implement this, due to some issues with the engine weird screen tearing can occur. I did fix this by changing the position of the camera to integer values only, but then this caused discernible jerkiness in the movement of the camera, which is noticeably annoying. One for the bug list.

Soon, I'll be revealing the premise behind the game, it's not just an infinite dungeon crawler. Let's just say, your actions on every level will have consequences!

Sunday, 22 December 2013

AI Attacks!

The AI coding now includes melee attacks and two types of ranged attack - "ranged", and "ranged caster". You can see this demonstrated in the video below, along with some progress on the GUI. Notice the new health flask, and the fact that it very quickly hits zero health! Zero health doesn't cause death in the debug build, nothing more annoying than bug hunting being interrupted by game over.

Futhermore, you might notice skeletons trying to perform ranged attacks through walls. This is because a line-of-sight check is yet to implemented.


Further AI types earmarked for implementation are "Healer", where a mob will attempt to heal injured comrades and "Necromancer", where the mob attempts to resurrect skeletons.

Friday, 13 December 2013

Debugging Routes

Once route finding had been implemented ( a version of the A* algorithm), it quickly became apparent the AI was making some pretty crazy route-finding decisions at times. To aid the debugging of this, I enabled rendering of routes which you can see in the video below. This displays, as yellow lines, the routes that enemies have calculated as the target destination.


All enemies are currently using the "Melee" logic for AI, hence they're all trying to get up close and personal with the player. Largely, the route finding seems a lot better now but there's still the occasional skeleton that decides to go via the longest route.

You can also get a visual sense of the sheer number of calculations that are involved from an AI point of view. Each enemy calculates a route to the player. But the player moves, so if the player strays too far from the destination of the route that was plotted, the route is recalculated.

Sunday, 8 December 2013

The First Behaviour Tree

Today's achievement was getting my first TreeSharp based behaviour tree working so it actually implements some behaviours in-game.

A combination of multi-threading, issues with movement vectors,  and this being my first foray into behaviour trees means that the AI seems a little crazy, lurching around screen like something possessed. It also cheats by cutting solid corners (an easily solvable routing issue), is unable to yet return fire, and takes some questionable and sub-optimal routes.



On the plus side, it's finally looking like a game. I decided to implement the behaviour-tree on its own thread, as most CPUs these days have more than one core and it means I can start to implement some complex behaviours without affecting the framerate. Currently, the game engine and rendering code uses about 10% CPU on an Intel i5, in a 50x50 map. Although I'm fairly happy with that, I can see the AI rapidly ramping that up, especially when there are dozens of enemies on the screen, all firing projectiles, some of which spawn particles.

Update: Sporadic lurching and speed issue was due to forgetting to multiply the velocity vector by the elapsed time since the last update.