Jump to content

  • Log In with Google      Sign In   
  • Create Account


Statistics in games (AS3)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 JETeran   Members   -  Reputation: 265

Like
0Likes
Like

Posted 07 August 2012 - 07:03 AM

Hello everyone.

In another post, we were talking about making achievements in a video game, and something that I want to rescue (and I'm making it in another post) is about creating statistics in the game.

I'm working on a AS3.0 title and I want it to have global statistics so they can sum up all the data played by each players (for example total of hours dedicated to the game by every player).

I did some research and found that there are 2 ways to make this: one is passing global vars from a XML file to the swf file (mh this is more like a "load game"); and the other one is saving data in the SharedObject (but this will save only on local data)

So my question is, are there more methods to have global statistics in games using AS3 and have it save the info of all the players of the game? If so (or not), how can I get vars from every user that plays the game?

Using my imagination, I thought about 2 things: one is save all that data localy in the players computer (using the SharedObject method) and then get them with a tool I build. The other one is save that data, when the player exits the game, on a online tool that save that data. What do you think?

Thank you so much guys; lets keep up the good work !!

Success with courage.

José Eduardo Terán

Project Manager & Game Programming Professor. DSK International Campus

Indie Game Developer
Google + Account


Sponsor:

#2 prototypical   Members   -  Reputation: 301

Like
1Likes
Like

Posted 07 August 2012 - 12:00 PM

If I am understanding your goal correctly, you want users to be able to see the statistics of all players combined.

You could store the statistics in a database somewhere on a server. Update the database and retrieve the statistics from the database via script calls within your game.


Doing this requires more than AS3 obviously, as you will need to have an understanding of a server side scripting language like PHP and some database know how, MySQL for example.

You might choose another scripting/database technology, but in general you need to have a database server side that stores the statistics that the clients can interact with.

#3 JETeran   Members   -  Reputation: 265

Like
0Likes
Like

Posted 07 August 2012 - 12:29 PM

Hey prototypical, thanks so much for your response !!

I'm sorry, I didn't specify who will see those statistics, but actually the player will only watch only his statistics; the global results of all the users combined will be only for me.

In either case and following your guide, I'll probably need a server with a scripting in PHP with MySQL.

And now, is there a special way to recieve the data of each user? Should I use the SharedObject method to save the data in the gamer's computer or from the game I send the info to a server that can catch that data?

Thanks once again prototypical !!

Success with courage.

José Eduardo Terán

Project Manager & Game Programming Professor. DSK International Campus

Indie Game Developer
Google + Account


#4 prototypical   Members   -  Reputation: 301

Like
1Likes
Like

Posted 07 August 2012 - 03:48 PM

A SharedObject is for saving data client side.

For example if you want them to be able to save games and settings without the need of a database, that is a reason why you'd use a shared object.

The aspect of saving any data for your usage is the server side database part.

If your interest is tracking the data, you need to send it to the server database.

#5 JETeran   Members   -  Reputation: 265

Like
0Likes
Like

Posted 08 August 2012 - 08:16 PM

Great prototypical, thanks so much for your guideance.

Before finishing, you have any guide / tutorial that can help me getting start on configuring a database and server with AS3.0 ?

Thanks once again, your help is awesome !!

Success with courage.

José Eduardo Terán

Project Manager & Game Programming Professor. DSK International Campus

Indie Game Developer
Google + Account





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS