Timing the scenes and displaying the time

MaikeMaike Member Posts: 7
edited November -1 in Working with GS (Mac)
I'm making a platformer, five levels, and I want to time the time the player spends in the level (and display it in the corner). At the end of the five scenes, I want it to display all times and give a total. However, I have no idea how to appraoch this. Any ideas?

Also, I'm having some troubles with creating the animation. I have four images, all of the same size pixel-wise, all sharp. I put them in the animation-behaviour, but for some reason it's all blurry in the actual game. It doesn't animate fluently, but creates a big blur of the main character. I have it at 0 or 1 fps.

Comments

  • juzcookjuzcook Member Posts: 259
    I've basically done exactly what you're doing in my current platformer project, where it records the times for every level and then adds them up as a method of scoring. In my game I have around 50 levels, so every level changes game.CurrentLevel to a value, then at the end of the level, it tallies up things you did, and a single scene operates for every level's totals. With only 5 levels, you could rather just use "Level 1 Time", "Level 2 Time" etc rather than a current level attribute.

    With the timer in the corner there are a few demos (check the sticky at the top of the forum). You'll need to use an attribute to keep the time. Something like:

    Every 1 Second
    Change Attribute game.LevelTimer to game.LevelTimer +1

    Then to display the time, either have an actor that displays text for the timer attribute, or make a custom font like those seen in the demos.

    As for the blurry character, make sure images are all EVEN numbers, and that the actor size are also even numbers, otherwise you'll get blur.
  • MaikeMaike Member Posts: 7
    The images must be EVEN numbers? What do you mean by that? I'll try looking at the size though, I thought that had even numbers as well.

    Thanks for the help, by the way. (:
  • juzcookjuzcook Member Posts: 259
    Even numbers meaning that they need to be multiples of 2. So if for example you have an image 14x16 it will be sharp, but if you have an image 14x15 it will appear blurry. The same deal goes for actor size.
Sign In or Register to comment.