Wednesday 17 February 2016

Flappy Cube v0.1.2 (Scoring Added - ewry games)

This patch update introduced scoring.


Flappy Cube v0.1.2 - ewry games

I implemented this by firing an event every time one of the pipes left the screen, as that coincided with the player jumping paste them successfully.  The out of the box "actor has left the scene" event in Stencyl didn't seem to want to play ball with me at all though. It seemed to fire really inconsistently and I can only assume I did something wrong with regards to the scene boundaries. In the end I went with writing a custom event that the pipe would fire once it detected it was out of bounds itself.

To improve on this design, I would instead look to make a specialised collision zone/region on the pipe where the gap is. This would detect when the player successfully goes through the gap and increments the score. Doing it this way would remove the dependency on fixing the player's lateral position on the screen. I'd assume there would be some performance overheads for that solution though.

Speaking of which, I'd really like to find out more about performance testing and unit testing games more. Stencyl seems to have very poor support in both areas but Haxe does have a unit testing library within it...

No comments:

Post a Comment