Tuesday, September 3, 2013

GameMaker: Day 3 - Quite the platform.

TL;DR

Platformers. PLATFORMERS. PLATFORMERS!!!1!! METROIDVANIA JUMP-N-MOVE PHYSICS TODAY! Not bad progress for 30 minutes of coding.

What I Did Today

Today was one of my shorter days, we're starting our big final projects at App Academy(the hacker school I'm at), so my time/motivation was all there today. BUT, that doesn't mean I forgot about my pledge to give GM a week of my time.

I started off the day watching the 10th episode from Shaun Spalding's Youtube videos and man, they're getting a lot longer. No extra GM content that I won't need, as he's started showing (almost) purely GML ways of doing things. He also went over some programming concepts, and while I already understood how a loop worked, seeing some of the intricacies of how GML handles them was nice.

The episode I watched today ended at just over 40 minutes, though I did pause once or twice to finish typing out some code. With typing while watching/listening (2 monitors, woo!) I would say I finished the video in just over 50 minutes. I enjoyed the video, and some platformer concepts were introduced and explained also.

Neat.

After the video I did some experimenting, didn't like the results, and put my code back to using a fixed step. I'm too tired to work out the exacts of gravity with delta_time, sue me. Just over an hour spent watching videos/coding, and I have basic platformer collision and movement?

Awesome.

In today's project you can move left and right with W and D, jump with Space, and there's even gravity! Have a blast, and look at the code. Today's code is pretty much Shaun's tutorial code, I'm not focused too much on platformer mechanics at the moment, so I really couldn't change much.

Except to use delta_time, but I'm too tired for that nonsense. No reason to do it if I have soemthing working today! 

Here are some screenshots


Time coding was MAYBE 30 minute, tops. Did so while watching the video and a tad afterwards.

Source Code

The source code/GM Project file is zipped and available HERE, from my website.

Conclusion

GM is turning out to be crazy. I spent less than 30 minutes coding (including experiment time!), and STILL had collision detection and jumping working, though they aren't the most elegant solution. I'm scared to say I'm amazed with GM. I'll keep looking for big shortcomings, and praying I don't find them!

No comments:

Post a Comment