How do I Save my specific info the right way

Get help using Construct 2

Post » Thu Aug 24, 2017 9:42 am

Hi Guys,

So after a while of not producing anything anymore i'm back in Construct 2 to create a little piece of software that can be used for my poker tournaments.

It's for personal use only so there is no need for 100% "the right way". If it simply works i'm satisfied.

I need to write away some (permanent) info. One of the things i'm stuck with now is creating the players as data.

Remember, this is going to be a piece of software, not a game. So when i say player i mean a real life player as in data.

It should be like:

Player 1
Balance: 50
Games played: 6
Ranking: 4

Player 2
Balance: 500
Games played: 16
Ranking: 1

Now i thought i should use an Array for this but i am no pro at this kind of stuff and to be honest i'm not sure how to write this away.

Some factors are: There can be unlimited players so i can't set an exact size of an array. Each player has multiple data inputs.

What i am trying to reach is something like:
[Player1,50,6,4;Player2,500,16,1] ( this is not actually a format, it's just so you can understand what's going on in my brain ).
In an other format it would simply look like:
Player1,50,6,4
Player2,500,16,1

This data should be used later on.

So long story short, i guess i need an array but i don't know how to add multiple data for each user. Players are actually creating in the application itself. So once clicking the "add player" button it should be able to create a new row with the x amount of columns that will contain the data as shown above.

Good to know is that it will be exported as NWjs. So i got a lot freedom as in how it's done.

Any help is appreciated. Thanks!
Last edited by Allardje on Thu Aug 24, 2017 9:44 am, edited 1 time in total.
B
10
S
4
G
3
Posts: 165
Reputation: 2,511

Post » Thu Aug 24, 2017 9:44 am

Often people will use CSV format for this then use the CSV plugin to import the data into the game. Not got a lot of experience with using this method but there should be some info around. In terms of the array, you never need to set a specific size, you can 'push' items into an array at the back so in reality it has an unlimited size.
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Thu Aug 24, 2017 9:46 am

I will surely take a look at CSV right away! Thanks for the tip. The thing is that all data can be edited and will be edited on the fly. So i need a nice way to edit and save this stuff. Now the loading and saving is not something i'm worried about i'll figure that out.
B
10
S
4
G
3
Posts: 165
Reputation: 2,511


Return to How do I....?

Who is online

Users browsing this forum: Darknessed, FabianB and 49 guests