So much closer still

ads support indie game development:
Hey it's another screenshot
Sep
07

So much closer still

Argh. The end is almost in sight but it’s already September. I am really trying to get this into certification before the end of the year but it’s looking tight now. Well, lots of things to talk about so here’s the latest dev blog.

What’s wrong with passing

It became evident over time that people were having trouble passing. After adding the pass target icon to Arcade Edition, I started to realize why. The speed of the players is not constant.

Of course I knew this, one of the early things I did was change the way the players moved to a series of pushes, much like feet would push you forward. This meant at any given time your speed would change between footsteps. This meant my passing prediction was only as right as it was close to some average.

So I logged the last few velocities at a small interval and now predict passing based on the average.

The other thing I noticed was the speed of the player was not added to the speed of the ball as it would be if you were in motion and threw a ball. Since it was needed for the pass prediction to be accurate, it is now working a lot better.

This actually didn’t take much time to implement and I’m sorry I didn’t do it sooner

One final way passing has been improved is when passing to a CPU teammate. The player control will switch to your pass target as soon as the pass starts, so it is up to you to receive a pass. These changes had an immediate improvement to passing and felt very natural.

Notice the new STAR icon. NOTICE I SAID. Ok thanks.

Another Quality of Life improvement is the new Star icon representing the “team captain”. When 2 humans are on a 3 player team, there’s the awkward moment of wondering where your player is because you didn’t know you are the one switching with the other player. Now you have a giant star icon. It helps a lot even in 1 player matches to draw your eye to your player.

Porblems

Always test on the hardware.

Always test on the hardware

Things were going well, and then: weird errors! I knew right away what this was fortunately (from testing on the hardware). Unfortunately it means I can’t use a handy method of averaging the player velocity vector logs for the pass target improvements. The convenient method was this:

//I'm commenting this right before I delete it forever!
//averages the velocityLog list of Vectors! How handy. Too bad I have to rewrite it.
AverageVelocity = new Vector3(
	velocityLog.Average(v => v.x),
	velocityLog.Average(v => v.y),
	velocityLog.Average(v => v.z)
	);

I kind of know what JIT compiling is from my web developer days, but it’s not important if it’s not an option with this development configuration. Welp, setbacks happen. Fortunately my brain hasn’t completely atrophied and I recall how to average numbers.

Vector3 sumVelocity = Vector3.zero;

foreach (Vector3 v in velocityLog)
{
	sumVelocity += v;
}
if (velocityLog.Count==0)
{
	//i mean how? unless you did something dumb, like not add to velocity log literally right before you do this
	Debug.LogError("i did something terrible");
	return;
}
else
{
	//divide by my non-zero! probablyoverkillbutwhatever
	AverageVelocity = sumVelocity / velocityLog.Count;
}

I gotta say it’s pretty handy you can do basic math right on the Vector3. But I digress; this was more a lesson in “ALWAYS TEST ON THE HARDWARE” than how to do a math.

Trust but verify

Morblems

After submitting my 110th achievement to the server, I found out there’s a 100 chievo limit. I had to find 10 to axe, reassign my gamer score values and fix my code to not break with the missing ones. Not a huge setback but kind of annoying I didn’t realize that sooner.

Also during testing I found a horrible edge case involving a new player unlock at the very start of a new season. Testing it is very annoying because I have to sit through the ending, go through the entire training game and then see if it is working the way it should back at team HQ. It often wasn’t, and took a lot of testing to nail it down.

Cheating

My first Konami code

I’ve always said you should play your own game, but when it comes to testing multiple endings and such it pays to have a shortcut or two. So I’ve got a debug cheat system that’s pretty simple but gets the job done. I can auto win, auto lose, run down the clock or add time to it. And no, I’m not leaving it in the release version!

What else?

A lot of bugs have been fixed but there’s plenty more. Endings and cut scenes are cleaned up but not 100%, and training modes need a bit more love, there could be other improvements but I’ll have to stick a fork in it before too long. My main priority is fixing bugs, testing the achievements and all various things you can do in the season. And as I do those things I clean up the remaining bits. It’s almost there.

About rick

Founder of Tipping Goat and creator of Super Slam Dunk Touchdown. On Twitter @TippingGoat

Leave a comment

*

Super Slam Dunk Touchdown

Categories