New games every week!
Score Display Blog
7th May 2017
One of my favourite discoveries in coding is A=A-((A-B)/C)
It's a very simple little formula which has a myriad of multiple uses.
In my framework, it's taking care of all manner of different things for me, but today I wanted to mention it's use in score displaying.

-=-=-



To help give an example, and to also allow you to grab the code, I've made the above example over at PlayMyCode.com.
You can view, and play with the code here.

The effect is really easy to pull off, and works a treat, making the score counter seem a little more lively.
Just be sure that, when saving the player's score, you remember to save the Actual score, not the displayed score!!
Views 44, Upvotes 12  
Coding , Developer Tips
New games every week!
Site credits : This was all done by Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 76

Blog - Score Display - AGameAWeek