Old arcade style hi score screen
Zombiebrains
www.zombiebrains.co.ukMember, PRO Posts: 296
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
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
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!!!
+1
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
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!!!
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
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?
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
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
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
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!
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
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.
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
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?