2013-02-07 Boss and better mob movement

I built the boss room and my first boss – the SPIDROID DOMINATOR.  I figure a big name makes it sound more important.  The boss fight is still rough, but pretty fun.  I need to add small barriers to give the player a chance – right now it’s really hard.  I also tweaked the mob AI – I had a bug where the mobs would always try to go towards you even if they couldn’t see you.  That left them stuck hitting walls trying to get to the player.  Now, if the mob can’t see you and is colliding with a wall for more than 1/3 second, it picks a random point and wanders that way.  It makes them seem much less dumb.  Also, if they lose sight of the player they head to the last seen position, which makes them pretty decent at finding the player.

Check out the latest video:

Shockbots_2013.02.06

2013-02-06 Doors and more

I added doors to the game.  It took way too long – I was setting a vector3D to = another and not a copy so all the doors were going down when only some should.  Doors now stay up if you are on the edge of the map to indicate to the player that that exit is not available.  I also added the final power ups for the game:

  • LifeContainerUp – adds to the max HP
  • SpeedUp – Increases player speed
  • HeatMaxLevelUp – Increases max heat of weapon, which gives longer firing before overheating
  • DamageUp – Increases each shot’s damage

I added a 3rd room for variety as well.  I accidentally created a recursion bug when setting the weapon’s upgrades when switching weapons.  I wanted to be sure to give the up grades to whatever weapon the player has, but in doing so I kept re-adding them and re-adding them forever.  Seeing the flash debugger just freeze was scary.  I thought it was my machine so I rebooted it and the problem was still there, of course.  Took a while, but finally fixed it.

So, next up some mob collision logic and a boss room.  Latest video below.

Shockbots_2013.02.06

2013-02-05 Room by Room

Finally making some progress.  I’m still stressed out and making dumb mistakes like trying to set a variable to a value using == and setting an array to equal another instead of the values contained in the array.  Despite that I nearly finished the map system.  The player can now travel to different rooms once all mobs are destroyed.  Any weapons or power-ups persist in rooms, so going back to explored rooms is useful if the player needs some health they left behind.  Speaking of health, mobs now drop health, and rooms are randomly populated with the the available mobs.  I am experimenting with room sizes, player speed, and weapon heat buildup rates.

Check out the latest video. WordPress has a files size limit on videos, so I am now just FTPing them to a folder on my server.

Shockbots_2013.02.05

 

2013-02-04 Maps

Today was really unproductive.  My wife is having health issues, and our insurance just ran out.  So, that was weighing on my mind all day.  Once my daughter and wife fell asleep I was able to get back into the zone and get some work done.  I got the basics of a map system in game.  I have a 2D array of each room (currently there are only 2 room types) and when the player kills all the mobs in a room the exits can be used to go to another room.  Its all very rough right now, but the basics are working.  I modeled 2 test rooms – one square and one circular.  I also modified my exporter to export exit positions.  Tomorrow I hope to add matching entrances and animated doors.  Going to be a lot of little things to get the room transitions to work well.  Oh well, just going to take it step by step…

Latest video:

Shockbots_2013.02.04

2013-02-03 Homing Bullets

I figured out how I want to divide up weapons and weapon power-ups.  Weapons will control the number and speed of the rounds fired.  Round power-ups (what I was calling power-ups) will control the kind of projectile fired.  I also created icons for the round power-ups.

Currently there are 3 weapons:

  • W01_OneShot: Fires a single shot – good power per shot and low heat buildup
  • W02_ThreeWay: Fires 3 shots.  Each shot is about 1/3 power of a OneShot.  Heat buildup medium.
  • W03_RapidFire: Fires about 15 shots per second, but each shot is low power and it builds up heat really fast.

There are three Round types:

  • R01_Bouncing: Rounds bounce off walls.  Each round power up the player gets adds another bounce to the round.
  • R02_Explosive:  Adds splash damage to the round.  Each extra round power up the player gets adds greater range to the splash damage.
  • R03_Homing: Rounds track the nearest mob.  Each additional Homing power up the player gets lets the round have a quicker turn.

Each Round power up is stack-able, but changing round power ups puts the player back on the first level of power for the new round type.

Latest Video:

Shockbots_2013.02.03

2013-02-02 Bouncing Bullets

Today I changed the player’s projectile code to support mobs firing as well, so the Spider Shooters now shoot.  I added bouncing bullets and a power up that grants the player that ability.  The reflection code for bouncing was a bit tricky math wise, but otherwise not too bad.  The thing that’s got me stumped is how to categorize a weapon vs. a power-up.  There are a bunch of properties like fire rate, explosive rounds, etc.  I am leaning towards a weapon controlling rate and number of rounds fired and the power-up controlling the rounds themselves.  So three-way and rapid would be weapon types and explosive and bouncing would be shot types.  Still need a few more types – and I’d like players to have several power ups at one time.

Here’s the latest video:

Shockbots_2013.02.02

2013-02-01 UI and Debris

Not a super productive day, but I still made some progress.     I added a flash frame  when the player takes damage.  I implemented splash damage from player shots, and every weapon impact now has  VFX.  It really helps sell the weapons being powerful.  I made a lot of progress on the UI today.  I added a health display with little boxes indicating hearts left.  I embedded some nice fonts.  One I really like is a monospaced font called Square Shooter.  I used that for a weapon stat UI display.  I also finally fixed the issue where dying mobs were blocking player movement and shots.  Next up I need to get enemies shooting at the player and different graphics for each weapon projectile.  I might get to start on the random environment generation.  I want a few play fields with a few different walls sets that can plug into them.  By mixing and matching the geometry and some texture sets I should get a lot of variety.

Check out the latest video:

Shockbots_2013.02.01

2012-01-31 Health Bar

I implemented a weapon heat buildup system, where continual firing can overheat the gun.  Each gun has different rates of fire and max heat tolerances.  My wife and and I took our daughter to get her well-check and then eat lunch – so I didn’t get a lot done.  Later in the day I got a heat buildup bar working that lengthens and gets redder the hotter the gun is.  I added wall collision for mobs to prevent them from getting stuck in walls now that they have turn radii.

I got 2 mob attacks in. If a melee mob that is facing the player collides with the player it attacks.  I think I need to change it from collision to distance check.  I also got the boomer attack working.  It has a trigger radius and will detonate if the player gets too close.  It also loops through all mobs and deals damage to them based on distance.  Right now the explosion VFX is underwhelming so it’s not obvious why they are exploding.  I might need to shade the boomer red as it gets closer to the player?  I added a debug health text field in the corner.  I was having a strange bug when the mouse pointer went over the text – the reticule would fly off.  Turns out I had to disable text interaction on the text field.

I was using the same reticule from my last game, but found it hard to target enemies, so I changed it to more of a floating cross hairs.  I also changed the camera from an isometric view to more of a head on view.  I think it showcases the environment better.  I added a small dot in the UI to the reticule so even when it’s obscured with the environment or mobs, you can still see that dot.

Calling it an early night to get some rest – it’s only 11PM.  Take a look at the latest video:

Shockbots_2013.01.31

2012-01-30 Power up!

Tons of progress today!

I cleaned up a lot of code in the morning.  All the rendering is now in the correct class.  After that, I added weapon power ups.  By tweaking numbers I can make the guns shoot different angles, change the rate of fire, slow the player down, change shot speed and damage amount and more.  I also fixed the terrible math I was using for player shots in the process.  I modeled 3 weapon power ups, but haven’t textured them.  The power up system is very generic, so I plan on adding health packs that drop when you kill a mob.  I also need to add health to the player as he is invulnerable right now.  Then attack damage from mobs.

Take a look at some in progress game play!

Shockbots_2013.01.30

2012-01-29 Turning Spiders

Today was better.  I finally figured out the math to get enemies to turn towards the player using a turn speed – so larger mobs will turn slower.  I also got the shooter bot in – It looks like a trap door spider.  I added sleep and waking states for enemies – so once they see you they pop awake and try to kill you.  I also did a exporter helper tool fix, so its easier to export anims.

Shockbots_2013.01.29