Thursday, August 30, 2012

Day 13 - Back in Action

I had a mostly free day at work so I finally was able to sit down and get back into the swing of things. I've been super busy at school planning lessons and having classes (5 per day!) while HAJET web development has taken up most of my free time at home.

I got a surprising amount of work done on the game today. The code just fell into place with no errors or extra fiddling required. I fixed the issue I had with the mushroom spawning by adding a flag to stop collision detection. The mushroom was trying to pop out of the box, but my collision detection algorithm said "No!" and prevented it from moving. Once finished I added the powerup to Mario. He now turns into big Mario when colliding with the mushroom!

Next I implemented the fireflower powerup and everything that goes along with it. Getting it to pop out of the item box was easy; It's the same as the mushroom. Transforming Mario into fire Mario was also a simple change. Finally, implementing the fireball took some time. It's still not quite right because Mario can shoot an unlimited number of fireballs regardless of how many are on screen. I'll fix it later.

Last, I added my first enemy, a goomba! He slowly walks across the ground, bouncing off walls, falling off blocks, and dying when Mario jumps on or shoots him. I've got a feeling that implementing the other enemies will be quick and painless too!

I have a few things to clean up in my code. I'm not looking forward to fixing this stuff because I know it will take a lot of time and it's not fun.

  1. Add an enemy manager. This will spawn the enemies when Mario gets close and remove them when they are too far outside the view-able screen.
  2. Revise the tile manager. Currently it loads all the tiles into memory at once. Only the tiles on screen and a few rows off screen should be loaded at one time. The game should be running around 6000fps, but it's only running at 1500fps because of this.
  3. Fix the game object class. Not all game objects have sprites associated with them, some have animations instead.
Here's the video!


Monday, August 20, 2012

AJAX is like C# right?

No work on Mario today because I was preoccupied with my other volunteer project. I spent the day studying up on jQuery and AJAX to add a few new features to the website I manage. I ended up with a quite nice FAQ dropdown menu.

Friday, August 17, 2012

Here We Are Again

I'm back from vacation finally! I feel bad for starting my programming later than I originally anticipated. All is not lost though! I recently became webmaster of the Hokkaido JET Association and spent the past few days updating content and rearranging articles.

Today I installed .NET 4.0, Visual Studio C# Express 2010, and XNA on my computer at work. As a result, I spent most of the day working on Mario. I fixed up issues with the mushroom, implemented crouching, and rewrote the movement of Mario and slightly altered the collision detection. I began adding a fireflower but then realized I don't have all the art-assets loaded into my solution yet. All the extra images are at home. I'll pick up there later.

No movie today...