Lachlan's misadventures in games programming

Friday, 16 September 2011

Platform Progress - Moving White Boxes - With Gravity and Collision!

9/16/2011 01:44:00 am Posted by Lachlan No comments
I've decided I'm going to post a basic list of things I'm doing whenever I'm doing them. I'm going to do some ol' fashioned devlogging. Maybe...

For those of you who never do maths, I use Δ a few times in this devlog. It is the greek letter Delta meaning (in this concept) the rate of change. ΔΔ means the rate of change, of the rate of change.

As of today, I have some working collision detection. Its not perfect yet, so if  Δx, Δy or Δt are too severe, it'll end up with the sprite either hovering or getting stuck. Maybe - I haven't got it stuck yet. Each Feature (which might be a platform or many other things) has a collision function which is as of right now either kNone or kTotal. The former being don't collide with this at all, the latter being everything collides with every facet of it. These will be expanded on later.

I've also got some basic gravity working. I define a ΔΔx and ΔΔy for gravity purposes, and a max Δx and Δy due to gravity. The result being that my white box speeds up until it reaches the max speed I've set for objects in the world, and then keeps going while the program runs, or the box runs into a feature.

A productive evening.

I've also included my current source metrics below - if that's your sort of thing. I might put it up a little more often. There won't be much from me until at least next week, owing to a take-home exam on property law over the weekend. There is a good chance of a couple of reviews coming soon. They'll likely be for:
- Rock of Ages
- Jamestown
Without giving a full review, both are cheap, fun, worthwhile and fantastic for split screen multiplayer.

Maybe also Grim Fandango - or maybe a 'Let's Play' - I dunno. Either way, it is my absolute favourite game of all time, and I highly recommend you play it (probably through Residual to get it working on a modern computer)

Cordially and Nerdily Yours,


Current Stats:

Files 62
Lines 4472
Statements 2552
% Branches 22.5
% Comments 2.9
Class Defs 28
Methods/Class 8.79
Avg Stmts/Method 6
Max Complexity 47
Max Depth 9+
Avg Depth 2
Avg Complexity 2.82
Functions 9


Post a Comment