Work log for the browser-based Aardvark game!
who cares
Play the game here: http://planetidiot.com/aardvark/
- 11-23-2010 OMG I haven't done a work log in like a billennium. Anyway the game is playable, all the powerups are in place and I just fixed an issue in Firefox where it would crash when you tried to shoot. I'm thinking I'm gonna make the space bar shoot because it's easy to get caught up in a game and forget where the mouse is, and click some button on your browser and eff everything to hell.
- 11-25-2010 APPY THANKSGIVING.
- 11-26-2010 I have made the dynamite bricks work in Firefox. Firefox didn't like globalCompositeOperation mode "destination-atop" so I made the base image red and used "lighter" instead. Looks good enough. Now I need to make them explode and add the explosion delay to allow chain reactions.
- 11-27-2010 Haven't gotten to the spacebar = shoot thing yet but I did get dynamite bricks working. HOORAY. Thanks to the Javascript setTimeout function doing the delay on chained explosions was easy! It's late, time for to go to sleepings.
- 11-28-2010 I had to write my own keyHit function as I couldn't find one written anywhere and nothing is built into javascript for it. Complicating things is the key repeat, if you hold down a key multiple keyDown events fire. So I made an array of keycodes that increment when a button is in the down state, and another array of keycodes that get flagged true if a key is released. Releasing a key also resets the keysDown array. A key hit is when the keysDown array is zero and the keysUp array is false. This way the action for the key press only happens on the first keyDown event, and won't happen again until the key is released and then pressed again. So all this means that you now hit the Z key to launch the ball, fire, etc. I didn't end up using the spacebar because that makes the browser window scroll down.
- 11-29-2010 I fixed the mouse position to be relative to the canvas and limited the paddle x to the screen edges. In the Xbox 360 version, the edges of the paddle stop at the edge of the screen, but I found it's very handy to be able to aim a bit at the screen edge so I've kept it to limiting the middle of the paddle to the screen edges. Chrome insisted on caching the javascript for some reason and it made me angry. I hate having to close the browser in incognito mode because, well, you lose everything. But it forced it to refresh the scripts. In other browser news, my buddy tried it out in Chrome on Linux and it works, but Firefox does not.
- 11-30-2010 After some fuss I got the ball aiming to work, if you hold down X you can aim with the mouse. Firefox was being pissy about it, if you clicked the "start" button the key events weren't firing for whatever stupid reason. So I changed it to where you have to click the canvas to start. The html buttons were temporary anyway.
- 12-1-2010 I finally got around to adding the bomb ball count at the end of the level. Not very exciting but not everything is fireworks and unicorns ok?
- 12-2-2010 I have the correct graphics in for the switch blocks and regen blocks, though they don't work yet. I also added shadows for the blocks. Since there's no easy way to do shadows like in XNA, I'm going to have to create shadow graphics for the balls, powerups, paddle and bullets. Since this is a port I want it to look good compared to the original, otherwise I wouldn't bother too much with that kind of fluff.
- 12-3-2010 The switch blocks seem to be working! I added code to prevent balls from getting stuck about 3 seconds before getting off the train so it's not 100%. It is pretty choppy but I can clean it up. I still need to add the screw graphics also.
- 12-6-2010 I smoothed out the switch blocks and added a nice alpha fade so they look more better. I got the final boss gun blocks colored correctly and they are now indestructible, as are the regen blocks. Unfortunately the regen blocks aren't working yet, so some levels aren't beatable now. I guess I'll work on that next.
- 12-7-2010 Regen blocks working! They don't fade correctly but they are working and that's pretty awesome. The game is almost functionally complete!
- 12-8-2010 I did some backend work in preparation for high scores, preventing cheating may be impossible, but I can at least make it annoying to try. In other news I added the main game music, looping sucks in Chrome and OGG isn't supported at all in Firefox. What can ya do. I also added ball and powerup shadows. It's the little things that make it pop.
- 12-9-2010 There's now "sort of" rectangular collision, or at least an easier version of it. Not that rectangular collision is terribly hard, but this was easier to implement with the existing code. No sense writing more than needed. I also *believe* I nailed down a fussy bug where you could sneak the ball around the side of the board, but I'll keep an eye on it.
- 12-10-2010 Ughhhh. For some reason, and quite out of no where, it seems the CMS I'm using in the games section barfed up the game, I don't know why. So I moved the game to another folder. My whole site is so overdue for a complete overhaul it's not even funny. Oh, so yeah, I added cool little flash effects when you hit a brick. This is something I wanted to add to the Xbox version, and will if I ever get around to updating it. I think it really makes the game feel more polished. I also added the screws for switch blocks. They don't get darker into the background like they oughta just yet, and the regen ones aren't done. But it is a start.
- 12-12-2010 I got the fade and screws working on the switch and regen blocks. Yay.
- 12-13-2010 The levels are in the correct order and I have got the backgrounds changing appropriately. There are now less levels, as some of the levels that used to show up were only used in the co-op mode. I'm not sure if I'll incorporate them in some way since co-op doesn't make a lot of sense unless I go insane and decide to try to make this version multiplayer in spite of never designing it that way or intending to at any point (hint: I won't).
- 12-15-2010 Added game over screen and made the brick flashes a bit nicer.
- 12-16-2010 Corrected the score values for various things to match the XBLA version. This includes adding the "No lives lost" bonus and the "Perfect! No balls lost" bonus, but not the survival streak bonus.
- 12-16-2010> Sound! It turns out trying to do sound effects in html5 at this point is like attempting to juggle turds, so I'm gonna cheat here and use this cool javascript library I found that fakes it using flash or something. It works in Firefox & Chrome so I'm sold for the time being. However there's an unfortunate delay in playing the sound effect, at least on my laptop, so it isn't perfect. Also I converted all sfx to mp3 since it doesn't do ogg format. This doesn't bode well for looping music cleanly due to the mp3 format's inherent looping gap problem, so I will have to test it against the html5 looping. Html5 looping doesn't work in Firefox, so that's bad already, but the looping isn't as clean as it should be for an ogg file. Mp3 may not be any worse and if it works in Firefox, that may be the way to go for now.
- 12-17-2010 Modified sound effect calls to incorporate stereo based on where it is on the canvas, so the ball hitting a block on the left side of the screen comes from the left speaker. I also got the music volume options working (not sound yet).
- 12-18-2010 Some bug fixes. There was a horrible bug that only showed up in Firefox (thanks to Mike Keely for pointing it out). That'll teach me not to get spoiled on Chrome! No, it won't.
- 12-20-2010 In theory the volume options are working, but it's hard to test on the train.
- 12-23-2010 I completely overhauled the bonus point tabulation, something I remember doing in the Xbox version, and for some reason I thought I could be lazy this time around. Anyway it's much better now, though not thoroughly tested because my train ride ended. I also have the beginnings of a menu system in place, though the only thing on it right now is the word "Play" which is sure to confuse anyone messing around with it.
- 12-29-2010 Made the aiming a little more mouse friendly.
- 01-13-2011 Began work on the editor a bit ago. It is now almost complete, however you cannot test or save levels yet. Saving will take some doing as I'm going to have it save on the web server so others can play your levels, but I will get playtesting in next.
- 01-19-2011 Playtesting is in! You can now playtest your level, assuming it is valid (must have at least 1 destructible brick). I also added some editor sound effects and fixed some other issues. Saving does not work yet, that will take a bit of doing on the server, but I want to tackle that sooner than later. It will likely require some kind of user registration, so I'll have to think about that too.
Still to do:
- Save game/continue
- Add boss shots
- Add boss outline
- User registration/login
- Online high score list & page
- Main menu: Arcade->(Continue, New), Custom, Editor
- Level editor: outline selected brick (not fill), erase, undo, load, save
- Custom level selection screen
- Alter ball movement code to move/check collision at smaller increments
- Add paddle shadow