playMaker

Author Topic: Offline Highscores  (Read 6604 times)

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Offline Highscores
« on: August 05, 2015, 05:14:53 AM »
I am pretty stuck here. I want to do an offline Highscores for my android game but I am not that good with php and mySQL. I checked Playmaker actions, custom actions and add-ons but I found nothing related.
Can someone give me an example project/scene for a highscore page, or show me some simple instructions ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #1 on: August 05, 2015, 06:19:06 AM »
Hi,
you can use array maker for this

here are some tutorials for array maker

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Offline Highscores
« Reply #2 on: August 05, 2015, 06:36:46 AM »
I installed Array Maker and somehow it ruined my 2D Tool Kit and Playmaker, a lot of things are like removed from the game... I have Unity 4, should I upgrade to 5 ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #3 on: August 05, 2015, 08:55:18 AM »
Hi,
what version of unity do you have 4.3, 4.6 other version?
as far as i know it should work on u4 and u5.

jean is the maker of this, so he can help you further on this, meanwhile can you give some more detailed information of what is removed are there errors and if so could you copy paste them here so he can help you faster :)

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Offline Highscores
« Reply #4 on: August 05, 2015, 11:10:05 AM »
I repaired everything and I finally used Ecosystem instead of .unitypackage and installed arrayList correctly, but now I have another problem.
My Highscore should be something like this:
``Username`` ``Score`` ``Time``
With ArrayList (and a tutorial) I sorted and reversed in the array list all the scores, so the biggest one is first. But now, I lost the connection with my Username and Time for that score.
I think it's a bit complicated, does someone knows how to do this ?
« Last Edit: August 05, 2015, 11:24:43 AM by VascBogdan »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #5 on: August 05, 2015, 02:00:46 PM »
Hi,
yes you have to do that in another array list.

use "array list copy to" to copy it to another array list (name it "Score sorted" or something)
then use sort and reversed on that array list,
then on that list you need to get the index with "array list index of"
and you can use that index to get the user name and time. with "array list get"
with the index variable

i hope you understand it, else i will try to make a tutorial for it

i will try to make a tutorial for it.

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Offline Highscores
« Reply #6 on: August 05, 2015, 04:22:42 PM »
I am not very sure I understood it until I test it tomorrow. But, if you want to make a tutorial, when will it be released ? If soon, I would rather wait for it.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #7 on: August 05, 2015, 06:23:59 PM »
Hi,
i have made a sample, and I will try to make a video tutorial tomorrow.

you can try it out if you want.
you need array maker and ugui in your project for it.
if you are on a lower unity version than 4.6 you can
look to the array list fsm states to see how it works
but not play it

else you can wait for the video tutorial :)

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Offline Highscores
« Reply #8 on: August 06, 2015, 05:01:23 AM »
I am not using nGui but I downloaded your sample. I studied it 10 minutes and know I understand. You take from the sorted score each score and you find in what index is in the unsorted scores. At the index you got, that index is the username for the score.

I'm not very sure of myself that I can make it work, but I'll try right now and let you know if I got something.

EDIT: WORKING!! Thank you very much! Now I'm working on a "save-data", so everytime someone loads the highscores, the same values remains until someone get a better score. I may let you know if I get stuck somewhere, but your help was extremely usefull. I upload a photo from my Highscores to let you see how it looks.
« Last Edit: August 06, 2015, 05:34:20 AM by VascBogdan »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #9 on: August 06, 2015, 05:59:27 AM »
Hi,
Glad to hear it worked and you explained it better than me :)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Offline Highscores
« Reply #10 on: August 06, 2015, 07:40:16 AM »
I am not using nGui but I downloaded your sample. I studied it 10 minutes and know I understand. You take from the sorted score each score and you find in what index is in the unsorted scores. At the index you got, that index is the username for the score.

I'm not very sure of myself that I can make it work, but I'll try right now and let you know if I got something.

EDIT: WORKING!! Thank you very much! Now I'm working on a "save-data", so everytime someone loads the highscores, the same values remains until someone get a better score. I may let you know if I get stuck somewhere, but your help was extremely usefull. I upload a photo from my Highscores to let you see how it looks.

Hi!

How do you set it up, so you can write your own name if you get a new score?
I'm stuck at this.

Hope djaydino can make a tutorial soon. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Offline Highscores
« Reply #11 on: August 06, 2015, 07:48:30 AM »
I am not using nGui but I downloaded your sample. I studied it 10 minutes and know I understand. You take from the sorted score each score and you find in what index is in the unsorted scores. At the index you got, that index is the username for the score.

I'm not very sure of myself that I can make it work, but I'll try right now and let you know if I got something.

EDIT: WORKING!! Thank you very much! Now I'm working on a "save-data", so everytime someone loads the highscores, the same values remains until someone get a better score. I may let you know if I get stuck somewhere, but your help was extremely usefull. I upload a photo from my Highscores to let you see how it looks.

Hi!

How do you set it up, so you can write your own name if you get a new score?
I'm stuck at this.

Hope djaydino can make a tutorial soon. :)

I haven't done that yet, I inserted random stuff into the Username, Wave(score) and Time array lists.
What I want to do is that everytime you win/lose, a form appears asking you for your username or skip. Once you inserted your username, it adds that string to the Username Array List, the final score to the Score Array List etc..  The script created by djaydino runs only after it is told to run (so it doesn't loop to infinite).

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #12 on: August 06, 2015, 09:19:28 AM »
on pc you can use the custom action "any key store string"
and then use a "build string" action like this :


and loop that. if you want to limit the character ammount use an int variable and and "int add" action and an "int compare" action

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Offline Highscores
« Reply #13 on: August 06, 2015, 02:28:39 PM »
Hi,
i made a tutorial for the array list sort indexed,
you can find it here

VascBogdan

  • Full Member
  • ***
  • Posts: 118
Re: Offline Highscores
« Reply #14 on: August 07, 2015, 04:32:56 AM »
I made it work just from the sample you gave us, but the tutorial is great anyway. Now I have some strange errors, I'm creating another topic for them.