Now that I’m getting a grip on this project I’m going to look at expanding into the 3rd dimension.
I’d initially abandoned the idea of doing this project in 3d due to the problems I was having using the framework. Now I’m thinking that I should give it a go.
So sprint 3 is going to be exploratory. I’m going to take a slightly XP approach and write a bunch of experimental throw-away code and see if I can’t get a hold on the Z axis. I’ll implement what I can and identify the things that are going to cause me trouble. Then speak to my supervisor about it all.
I’m very proud of myself right now.
This sprint started off well but got very rocky pretty quickly.
I set off to correct by collision handling so the rocks weren’t just reversing direction when they collided.
Turns out that the gravity wasn’t working anywhere nearly as well as I’d hoped. Some problem with my implementation made managing collisions impossible.
So once again I found myself working on the gravity forces instead of moving on with the project.
Anyway, I’ve revamped my gravitations, it now less resembles real gravitational forces and more resembles a very simple pursuit model. Basically all of the objects encourage the other objects to chase them at speeds calculated by their mass.
Once that was completed the collision work went relatively smoothly. I say relatively because at the level where the collision responses are being handled I only had access to one of the objects velocity, which made working out the forces pretty challenging. But what I did have was both their masses and positions. So my algorithm assumes that all colliders are moving at least a little bit, it then works out the trajectories of the collision from both object positions and combines, multiplies that by the collidee’s mass and applies the result to the collider’s speed with a 40% reduction to make it feel a little more real, and controlled.
It’s still not perfect but it’s much better than it was, I’m hoping that as I get more practice with my vector math I’ll be able to more finely tune it.
What I would do differently?
Don’t worry so much about getting stuck. Even if you find yourself redoing work, of course it’s not ideal, but it’s still a step toward completion.
What did I learn?
Smaller bites certainly works. I pretty much chose a single thing and went for it. Now here I am having completed what I wanted to right on schedule.
I’ve had to take a week break from project work to complete other assignments.
Planning for Sprint 2. The plan is:
Collision Detection. Get the collision forces and vectors calculated correctly.
Gravity: turn down the gravity to a slightly more realistic scale. The idea being that the gravitations might be less dramatic but more realistic and more importantly more manageable while ‘playing’ the game.
Triple all my time estimations.
While planning Sprint 2 I estimated that I’d need 13 hours to complete all the tasks I wanted to complete on this sprint. Looking at my current workload I couldn’t see how I could schedule in that many hours. So I had to push from of the tasks to a later sprint.