December 7, 2006

EL405: Collision Course

proj2_cap2.jpgMy final project for New Media Projects is really starting to come together. It's going to be a beta for a one-day-amazing Dodge Intrepid game. Right now, it's sort of a weird platforming game with questionable quick-sand level design.

Thanks to a tutorial file by Magnetos (who I believe is the arch-nemesis of Java-guru Charles Xavier), I was able to get a form of sidescrolling that I actually sort of like. Instead of a long level that scrolls as the player moves, the level is now divided up into pages (frames). So when the player walks off the right or left of the screen, the frame goes forward or backward, respectively. I can't really think of another game that works like this, but I guess it's similar to the old fashioned Zelda games, where each screen was a different part of a dungeon... but that's a stretch.

So the big issue with the game currently is the collision detection. The game is set up so that all of the platforms are in one movie clip called "World." Dodge's character (known as "hero") does a hit test so that it doesn't pass through anything in the world clip. It's really a great way to make platforms because you only have to define one movie clip. But my problem is that, while he will stand on things just fine, he sort of just passes through stuff that is higher than his feet.

Here's an example: One screen has an incline that builds to the right, so that when you jump off the incline (and on to the next frame) you will clear a massive chasm. However when you walk towards the incline, Dodge just keeps going straight. You can jump and he'll move up to the top of the hill (as if it were a ladder), but it looks really stupid. In the tutorial that Magnetos made, his character doesn't pass through anything, and it looks very good. I've been trying to examine what I'm doing differently, but I can't really find much. Perhaps its because his character is a little bitmapped Zelda? Or maybe there is another key to the puzzle that I'm missing.

Basically, I need to have the ground completely solid, so Dodge cannot pass through it, only on top of it, and I need Dodge's figure to be able to collide horizontally with things.

proj2_cap1.jpgThis brings me to the next challenge I have. Right now the first level is made up of 10 screens, which is pretty good if you don't run through everything (which, at this point, is very easy to do). On a couple of the screens, I have these penguins. Using the "pacing bad guy" script from Magneto's tutorial, they sort of waddle back and forth on the screen in a manner so menacing it would reduce Madeline Albright to tears. Unfortunately, because of that whole collision detection thing, they don't really kill Dodge.

Ideally, I would like to give Dodge a punching attack, which could kill the penguins (or stun them, if PETA is watching), and an actual death animation for when they get him. It would be neat for the player to also be able to swash the penguins like in Super Mario.

Aside from those two issues, the only other big thing I need to do with the game is make the level end. After the player collects the book, a vortex will open, and the player can hop in and end the level. Eventually, perhaps after other levels are made, the screen after the portal will display all of the books you've collected. And then you are taken back to the library where you can check out everything that you've collected over all of the levels.

Things are coming along shakily, but occasionally I make huge strides in my project's development. I'm really breaking new personal ground by taking all this coding and game physics on--it's something I never really expected to do in Flash. Next semester, I am doing an independent study on Flash integration with websites and video projects, but I may be able to add more advancements in my Dodge game to the list.

Posted by MikeRubino at December 7, 2006 2:05 AM | TrackBack


Comments

Sounds really cool, Mike. I can sympathize with your collision detection woes (I had a similar problem with my TGF2 game a month or two ago), and I never really found a good solution. The artwork is great--but I'd expect nothing less from someone who has done so much great work already.

I'm looking forward to seeing your project in action on Wednesday; hopefully by then you'll be able to work out the kinks. If not, I wouldn't worry about it too much--you deserve a lot of credit for spending so much time fiddling with the mechanics to get even this far, let alone actually getting everything to function as smooth as a normal video game. I wish I knew Flash that well.

Posted by: ChrisU at December 11, 2006 2:22 PM
Post a comment









Remember personal info?