Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Platformer Prototype Updates

Platformer Prototype Updates

Programmer16
Beals Software · · 1 min read
1,468 0
I've been working on updating the platformer prototype, correcting a bunch of issues with the collision system and per-frame offsets for the animation system. I finally got the collision system working and then completely broke it again once I added in the animation system. Turns out I hadn't tested the platformer symbols in the code-base with negative values in the collision boxes. I also created a small level to test out the layering system (which surprisingly is working without any issues so far.)

I also spent quite a bit of time on a copy-paste issue: I wrote a short two-liner to copy an object's transformed collision box and then update that to estimate the player's future position for collision detection. As I do this on a per axis basis and I decided to do it while scrolling up, I started with the Y axis (falling.) Copy-paste: jumping. Copy-paste: moving right; change Y members to X members. Copy-paste: moving left.

30 minutes later: WTF? Why am I getting collision events when moving left? JAIAJSIJAJASLASL:K:ASLFa;k'd;
30 more minutes later: OMFG. I forgot to change these two Ys to Xs. *facepalm*

This is made worse by the fact that I was just talking with a coworker earlier today about this very same thing. Forgetting to update two lines of code cost me an hour of development time... *double facepalm*

Anyway, time to get back to work on SAGE's editor.

Discussion

Loading comments...