This is a prototype for a real-time Rogue-like. I'm hoping I don't have to go turn based with it as Diablo is one of the best real-time Rogue-likes around and one thing we're missing in Flash is a decent RPG or even just a Rogue-like. This page will support my code whilst I ask people about play testing. My goal is to make a very simple game - esentially Rogue (go down, random levels, get the amulet, get out alive). FOV I'm strongly tempted to leave as a mask over the gameplay.
Use cursor keys to force the map around (this is for checking that the dungeon generator isn't broken)
Space Bar to reset
Implemented (last most recent):
AStar movement: I'm building this as a turn based game running real time. No Diablo running straight to the square, but click based movement is here to stay.
Greedy Combat Movement: Combat pathfinding is going to blow, it's just too much resources to run AStar on every character, every turn (it's important the player can escape combat at any moment, but is vunerable to glancing blows). Pursuit is quite simply limited to the nearest square to the target. Players will have to manuvre themselves before charging.
Sand-Timer Combat: This is a Final Fantasy trick. Account for speed by ticking down a timer, which means you can reflect this in the character's movement speed as well. Diablo manages this by slower animations but the timer is still there - my timer bars are in place of animations for now - engine first, skin later.
Collectables: I've got picking stuff up okay - the complex item use that Rogue has is a way off yet.
Dungeon Generator: Starting with a grid full of earth I dig out a start room and put the player in there. Then I attach a tunneling agent to a random wall. Every now and then the agent will decide to construct a room. Successive tunneling agents choose a random room from existing rooms. Then sprinkle items, then sprinkle monsters. There's a lot of room for optimisation here - I've been lazy and used AStar to do most of the work so it can get cleaned up and go faster later.
Radial disconnecting nodes is causing a bit of havoc (but it stops you from walking from one separate room to another where there is a diagonal) so I'll try to find a way to nullify the big black areas so they don't get included in the operation. - UPDATE - blank area nulling works a treat.
Light mask. Mini-map is going to have corridors revealed by walk over and rooms on entering but FOV in game is going to be just a mask. There is a lot of graphics overhead to come so K.I.S.S. The ellipse is dynamically drawn so that means I can have the dreaded blindness potion.
z-ordering. For some reason it's demanding more conditions than Lightning man did, still, one less thing to worry about.
Minimap: the dungeoneers favourite - I had to put a label on each node saying if they belonged to a room the dungeon generated then discover the room
Inventory: Exceedingly tricky stuff moving stuff to and fro from the inventory. Removing the movieclip seemed to erase the Item class - all fixed now, you can move items to and fro from the backpack and even rearrange your belongings. Next up is usable item slots - going to try to keep it as simple as possible, bringing up mini-menus is going to geek out casual players so one useable slot would make things much smoother, just swap items to use different powers.
Ranged combat: I've had some typo trouble with the ranged attacks so I'm dying the squares the line-of-sight algorithm uses.