Tuesday, August 12, 2014

"Off the Wall" - My First Pass at a Game

As I mentioned in my last post, its time to take a break from tutorials and take a stab at application.  That is what "Off the Wall" will be.  I'll just be observing the code I used in my platforming and "Brick" lessons, to make a platformer where physics doesn't make a whole lot of sense.

I need to learn how to think like a programmer.

What I had attempted to do on my first attempt was just look at my collision code for the player and replace any horizontal collisions with the "move_bounce_all" function I had learned about when coding "Breakout".  As you can probably guess, that only went so far.  I ended up leaving all of the original code from my "Controls of Platforming" lesson and just added a new object with a collision event for the player.

EDIT:  Just to be clear, this is what I'm trying to replicate:

(Battleblock Theater)

So far, we've made progress.  The player does bounce when colliding with this specific block, however the direction is fairly random and the player falls through any other surfaces after bouncing.

Now, I'll be honest, I got lazy.  I copied and pasted code from Breakout and slapped it onto the green block you see in the .gif.  I was mainly focused on making sure that the player would actually collide with the instance.

Now that we know this is at least possible, I can look into fine tuning that "bounce" code.

I can already tell you I need to review this concept a little more... or perhaps some trial and error is necessary...

I'll post what I find out when I get there.


(P.S.  Now that I've figured out how to make screencap .gifs, I'll post them a lot more.)

No comments:

Post a Comment