Tuesday, March 27, 2012

Quick Tip: A Simple Score Display for Flash Games

Almost all games out there use a scoring system to help players see their progress. It is essential to show the player’s score in a clear and fun way. In this Quick Tip we’re going to learn how to do just that!

Introduction

Click the button to add 20,000 points to your score:
In this Quick Tip we’re going to learn how to create a score display. To improve the quality of our display, we’re going to do two things:
  1. Add commas to our score, so it reads 1,600,000 instead of 1600000. This makes it easier for the player to figure out how big his or her score is.
  2. Make our score transition between values, instead of changing immediately. This gives the player a sense of achievement, because he or she actually sees his score grow.
In the end we’ll have a very simple and useful class, which you can easily use within any of your projects.
This class will only concern itself with displaying the score, not with calculating it.

Step 1: Creating Our Class

First off let’s create our class; I’ve named it ScoreDisplay: [...]
Read more: Quick Tip: A Simple Score Display for Flash Games

No comments:

Post a Comment