0

I'm developing a game for Android and iOS using AS3. My problem is that my game is 99% completed but I'm trying to do a Online Multiplayer Score.

For example: Player1 - 100 points versus Player2 - 500 points.

Untill here everything is going gratly. I'm saving scores to database and loading back to display. My problem is that because I need to set data to database and load it back when PVP is in the last second (1 sec remain) I can send data to database, but sometimes, when load it back, I get errors and no database is loaded.

Is there a simple way to share and display data without using database in AS3. I think if I don't use database, things gonna be faster, but I don't know how to do this!

6
  • There are too many ways to approach this problem. The answers would just turn into a straw-poll for which one people liked. The best thing is to do some research on the topic yourself, find two or three, analyze them, determine if they work for you or not, and try them out. Come to use when you have a specific question about something you have attempted to do.
    – gunr2171
    Aug 19, 2015 at 17:14
  • If you don't see, i did my question and i show the way i'm doing. I try many other ways to do this but nothing is working. So i decided to ask help... All answers i found here is how to build an online game using data servers. This way i have already passed. Now i want a faster way and with less errors to show score in real time
    – BrMyAppsAD
    Aug 19, 2015 at 17:19
  • Fast would be PvP and sockets.
    – BotMaster
    Aug 19, 2015 at 17:53
  • Rather then loading back to score store the updated score in your local model and after getting success message from the database use the same score to display which you have stored it in you model. Try this hope it will solve your problem. Aug 20, 2015 at 4:33
  • In my opinion the score should be tracked by the clients themselves locally. Hook the score into whatever event is used to increase/decrease the score for X player. And show the score but once in a while do a call to the DB to see if the score fits what is being locally represented and adjust accordingly. It you fail to fetch the score from the DB just use the local count instead.
    – Placeable
    Aug 20, 2015 at 11:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.