Sunday, 28 February 2016

Retronoid Update XIII

Another quick update for you fine folks.

Managed to code in the remaining original levels (or slight variants of, actually). This brings the total number of levels from 15 to 35.

Started in on working out how to do ball spin / deflection off the players bat. The first main thing needed is a way to work out the speed the bat is moving over a timeframe. Started out by recording the movement differentials for the last 10 frames into a small array, then averaging out.

This works, but needs some modifications - it needs to average out at the point of impact rather than continually (easy enough), and the array needs to be reset when the direction of the bat changes / the bat remains stationary for a few frames. Should be easy enough to do.

Once that's done it should just be a case of working out how much of the bats velocity I actually convert to speed / direction change on the ball & tweaking it to suit.

Well, thats it from me for another week or so - another update soon.

No comments:

Post a Comment