Retro arcade style highscore table in GM

A place for people with an interest in developing new shmups.
Post Reply
User avatar
ohmsweetohm
Posts: 3
Joined: Sat Sep 14, 2013 12:39 pm

Retro arcade style highscore table in GM

Post by ohmsweetohm »

Long time no see... :)
I implore you. I have big trouble in making highscore table with GM. :cry:
I hate nooby style highscore table(if you use the GM, you will know quickly).
I want to make scroll through the letters with up & down key and input only three letters.
So I found yoyogames forum but I couldn't get good information. :(

Here is Example↓
http://klaxthecanary.deviantart.com/art ... 1384685391

- Press up & down key to Scroll through the letter.
- Hit fire button input that letter.
- Only input three letters.


Any help would be appreciated(especially good example files).
I'm nihilist.

ohmsweetohm = Avinga
HERE IS MY BLOG
http://avingagames.blogspot.kr/
User avatar
DJ Incompetent
Posts: 2374
Joined: Tue Jun 13, 2006 10:28 pm
Location: Murda Mitten, USA

Re: Retro arcade style highscore table in GM

Post by DJ Incompetent »

User avatar
Rozyrg
Posts: 918
Joined: Wed Feb 11, 2009 12:03 am
Location: Southeast USA

Re: Retro arcade style highscore table in GM

Post by Rozyrg »

It's not too hard, you just have to use separate strings for each place, have a preset range of characters/letters in an array,then just weld them together into one string once the player confirms entry.

You will need to check each char both ways, though:

Code: Select all

//script0
var tx; tx=""
switch argument[0]
{
 case 1: tx="A" ;break;
 case 2: tx="B" ;break;
 case 3: tx="C" ;break;
 case 4: tx="D" ;break;
 case 5: tx="E" ;break;
}
return tx

Code: Select all

//script1
var num; num=0
switch argument[0]
{
 case "A": num=1 ;break;
 case "B": num=2 ;break;
 case "C": num=3 ;break;
 case "D": num=4 ;break;
 case "E": num=5 ;break;
}

return num
So, assuming each name entry started off with a default value, say "ABC", and the player had just set a record replacing the #5 hiscore slot:

Code: Select all

var sctx, s,txx; s=0

sctx=global.score_name[5]
repeat 3
{
 s+=1
 txx=string_char_at(sctx,s)
 letter_num[s]=script1(txx)
}
Therefore, those arrays would read as :
letter_num[1]=1
letter_num[2]=2
letter_num[3]=3


Then, when saving...

Code: Select all

var txx,s; s=0;txx=""
repeat 3
{
 s+=1
 txx+=script0(letter_num[s])
}
global.score_name[5]=txx
Is the equivalent to global.score_name[5]=""+"A"+"B"+"C", assuming each char was left the same.
Post Reply