Old arcade style hi score screen

ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
edited March 2012 in Working with GS (Mac)
Hi guys

I'm trying to work how to do an old style arcade game hi score screen.

I have set up the score and hi-score attributes within the game but now need the screen to be created.

I want it so the player can add there name in using the apple keyboard and then their name appear with their score in a table of 10 names.

How can this be done?

Thanks in advance

It takes a Zombie to know a Zombie!!!

Comments

  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    Hi TS

    Yeah, I would like to add an authentic 'add player initial' to my app
    But not sure how to do the letters.

    I could do the arrow buttons but unsure how to do the letters?

    Is there a Gamesalad video showing how thos is done?

    It takes a Zombie to know a Zombie!!!

  • AppsterDudeAppsterDude Member Posts: 84
    I would make a integer attribute then go in the triangles and make rules that say when mouse bottom is down, change game.letter to 1 for A and 2 for B and so on and in the letter actor say if game.letter is 1 change image to A. Make sure you start the actor at 0 and when you try to go to B say if mouse button is pressed change game.letter+1 so it adds and vise versa! Hope that helps! I'm not good at explaining thing so I think I'll make a template later cuz it's 2AM were I live!
  • AppsterDudeAppsterDude Member Posts: 84
    I might have spelled some things wrong because I'm tried as heck!
  • CloudsClouds Member Posts: 1,599
    what would be even coooooler then using the keyboard is a half triangle pointing up and a half triangle pointing down on top and under the letter there changing.
    so when they touch the half triangle it cycles through the letters tell they get the letter they want.

    +1
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    Hi Tatiang

    That's just what the doctor ordered...superb and so easy to input.

    No my next question is...

    How could I use what you have created in a screen, say with 10 players with a score of 100 (Bottom plater) to 1000 (Top player) and how could I get is so that when i use your excellent name inputter it would then appear in the right place in the top ten player...via how good the score was.

    Any clues...

    It takes a Zombie to know a Zombie!!!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Until tables are writeable (and IF we will even be able to save them as attributes is another question), the only way to do that is to have 10 keys that you save high scores to. I think you'll have to have a messy rule set that says if game.score >= highscoreKey1 then save attribute game.score as highscoreKey1; otherwise if game.score >=highscoreKey2 then save attribute game.score as highscoreKey2; otherwise... etc. all the way down to highscoreKey10. The otherwise on highscoreKey10 would be blank since you wouldn't save the player's score if it wasn't in the top 10.

    You'll need a scene to display the saved keys, but since they are named in numbered order, it's just a matter of using 10 displayText actors. As for my input system, you can still use that. You would check the 10 saved keys as I suggested above and then before you save the new high score to the respective key, you would unhide (or use a pause game behavior to display) the high score input actors and finally save the key when the player taps the submit actor. You'll need to capture the high score initials (which I did in the template I sent you) and save them to a key (e.g. highscoreKey1Name) so that you can load them on the high score screen and display them next to each score.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • overzero3overzero3 Member Posts: 18
    Resurrecting this thread over here...
    I downloaded tatiang template and tried to modify it even more like an arcade high score but it didnt quite work!
    Insteed of using touch to change letters, i'm using keyboard keys! But for some reason, i can't make they work independently. Whenever i hit the key, all three letters move together. I tried to use some boolean attributes to make them work one at a time, but apparently my logic is broken! Also, is there any other way to display the tables high score values without making one actor to display each position?!
    Can anyone help me out with this?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Well, a lot has changed since this thread started. :)

    I just made an iterative loop demo (attached) that displays table values using a single actor.

    It sounds like you need a counter (e.g. index attribute game.keyCounter set to 1) for your high score keyboard keys. So something like this:

    key 1: When touch is pressed AND game.keyCounter=1 --> do key rules... and change attribute game.keyCounter to 2.

    key 2: When touch is pressed AND game.keyCounter=2 --> do key rules... and change attribute game.keyCounter to 3.

    key 3: When touch is pressed AND game.keyCounter=3 --> do key rules...

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • overzero3overzero3 Member Posts: 18
    Hum...many thanks for this demo! I going to figure it out how to do it with custom fonts now, but I'm still having some troubles with the input of the scores.
    I'm doing as you suggested and using a single attribute to set the rules of the letters input. So i scroll through the letters with W and S and when i hit space it confirms the letter, writing it in the right position of the score table and changing the counter to the next one (2,3 and 0 to stop the rules). I'm using three actors with the same basic set of rules, just saving the letter in a different column of the table.
    The problem is, when i confirm the first letter the counter changes right to the last value (0 in this case) leaving the other two letters unchanged.
    Dont know why this is happening...if i change the confirm key of the second actor it kind
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Are you using When Touch is Pressed (not When Mouse Button is Down)? Can you post a screenshot of your rules for one of the actors?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • overzero3overzero3 Member Posts: 18
    edited October 2012
    Actually, i'm using When Key is Down. I mean to build an actual arcade cabinet for this project so i need it to be all done with the keyboard!
    Here is the picture: http://img801.imageshack.us/img801/3514/capturadetela20121030s1.png

    I'm using this game.Letter Input as the counter you suggested. So when it's one, it will allow me to scroll up and down all the letters (working fine) and when I hit space it writes the letter into the table (hope it's working, didnt got there yet) and changes the game.Letter Input to 2. The second actor has the same rules, only the condition is When game.Letter Input = 2, as the third actor for 3.
    But after inputing the first letter, the game.Letter Input changes straight to 0, and skips 2 and 3.


    EDIT: Sorry, in this picture i was testing using change attribute to game.Letter Input +1 insteed of changing it to 2, but it didnt work anyway!
    I just realised that this is the same problem i'm having with another actor in a different scene!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Sorry, I had read that you were using keys but just assumed that was for testing purposes.

    I think the problem is that we think of the rules as "if I press the space bar, game.Letter Input changes to 2 and the second actor is waiting for me to press the space bar again" but what is actually happening is that we are pressing the space bar causing game.Letter Input to become 2 and since the space bar is already pressed at that instant, the second actor runs the rule immediately instead of waiting for us to press the space bar again.

    I think you can fix this (and I tested it and it worked for me) by wrapping the Change Attribute game.Letter Input to game.Letter Input+1 behavior inside of an After 1 second Timer with run to completion checked.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • overzero3overzero3 Member Posts: 18
    Hum...once again so simple and i didnt just though of that! Many thanks!
    Since i'm already bothering you so, let me ask you...i read somewhere here in the forums that Timers are not the best solution performance wise, is that true? I dont remmember exactly where i saw it, but since then i've being trying to avoid using Timers as much as i can! (thats why i rarely consider using it)
    I'm also trying to make an actor that changes directions (90°) after it crossed some distance (no user input here), but just like here, it just skip one of the rule set (used the same logic. If counter = 1, move in this direction then change to step 2). I've being avoiding Timer for this actor, but now i'm considering using it.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'm not sure about your distance question, but I can tell you that yes... timers do affect performance worse than other types of conditions, but I don't avoid timers because they can be very useful. I simply limit the number of timers I do use.

    You may have already read the Timers are for Chumps thread: http://forums.gamesalad.com/discussion/44707/timers-are-for-chumps-gs-optimization-tips/p1 but if you haven't it's great reading. So there are also ways to setup a timer without using a Timer behavior.

    In this case, you might do When space is pressed --> change attribute self.pressTime (real) to self.Time. When attribute self.Time >= self.pressTime + 1 --> change attribute self.Letter Input to self.Letter Input + 1. The problem, though, is that there is no "run to completion" option, so if you set it up this way and the player lets go of the space key too early, it may not work.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • overzero3overzero3 Member Posts: 18
    Ok, if you are still out there, got another supid question!
    The way i made the score table, i made so when i confirm which one of the three letters i will save it in a different column. So i got three text columns and a integer column for the points. I don't know if this is the best way to do it, but i coulnd find a way to save all three letters in the same column with Change Table Value behavior. The same way i couldnt use the same text attribute to display all three letters. I keep geting 'invalid expression'
    This take me to my question: is there a way to display the three letters, without using three actors? Or even better, is there a way to save all three letters in the same text column of my Score Table?
Sign In or Register to comment.