Home   Help Search Login Register  

Author Topic: How do servers save players info for games like Sahrani life and evolution?  (Read 10220 times)

0 Members and 2 Guests are viewing this topic.

Offline ModestNovice

  • Members
  • *
wow....Great Job Mr.Peanut :)

I can't wait, as for two of the servers I host my mission are linux = can't use armalib :(
"The road became empty and the people disappeared. The clouds ran away; opened up the sky, and one by one I watched every constellation die."
- Sean "Slug" Daley

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
It has bugs! So it does not work yet....

Quote
The immediate issue with this is that you can only ever set values on one machine, ideally the server. For example, should the player sell something and get then set, he might overwrite the get/set from someone else transferring money to him. If you are just using numbers, then an add and subtract could more safely replace set.
This is an issue for player-player interactions, but I might ignore those completely. Even SPON_Money is entirely client side isn't it?
« Last Edit: 03 Sep 2008, 14:20:52 by Mr.Peanut »
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Indeed it is, but people keep kicking me to fix it (I've actually already made a rack of improvements to it, but they haven't been finished, tested, etc. Please don't hold your breath though, since my enthusiasm for individual projects is fickle at best!)
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
So what are people asking for? Are they asking for player-player interactions? With player-player I have trouble imagining any system that is fool-proof.  The only (simple) way I can think of is locking the server to perform only one interaction at a time. Would people be satisfied with that? Somehow I doubt it. The only other way is to lock the server so that no other interactions can take place with the two clients presently interacting. One step further would be locking based on interaction type and client pair.  :blink: 
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
The big requests are for player-to-player money transfers and persistent bank balance (mainly just mission-persistent, but also using ArmALib). Not got anywhere with any of those, because I was working on different things (such as an abstract object system, but Wolfrug made one of those).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
(such as an abstract object system, but Wolfrug made one of those)
Where is that? In his inventory system?
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Yes, by abstract objects, I mean stuff that doesn't have an object to represent it, but you can manipulate, like money or "driving license". Also things like the "un-attached" attachments I use in SPON Attachments.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
So for a server-client persistent data model, do you think the following would be sufficient?

1) Transactions are classified by channels. Each channel is named by [player name/index, data field name/index].
2) Only one channel of each name can be open at a time on the server.
3) When the server receives a transaction request it PV's which channels are now blocked.
4) If the server receives a request for a blocked channel, it declines the request and PV's this failure back to the sender.
5) Both get and set attempts on clients wait until the needed channel is free i.e. channel name variable is either nil or True
6) If a client's request is declined, it retries x times.
7) When each channel is blocked a server side script will timeout the block if it takes too long.


edit: Two different methods:
1) Each client sends multiple transactions to server at once. Server broadcasts which channels to lock.
2) Each client sends one transaction at a time. Client broadcasts which channels it is locking.

I am becoming a blathering idiot....  :blink: ...I should just read an RFC or two on asynchronous data transfers...
and then shoot myself... :goodnight:


« Last Edit: 03 Sep 2008, 20:14:36 by Mr.Peanut »
urp!

Offline David.B.

  • Members
  • *
gl Mr. Peanut. myself and bishop are just finishing up quarantine. i keep checking up on this post to see if any luck yet so we can use it.. mission will probably be out without it ; ;,but its understandable.. tough work and not much credit doesnt motivate does it XD.. anyway keep up the good work.. thanks for the help on everything..hope you figure it out.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
This is the state of affairs. If all your data is client-side(i.e. no item/money exchange between players), I have something ready to test, and least for mission persistent data(i.e.as long as server does not crash and mission is not restarted). It extremely light weight, without any error handling. Your problem will be integrating it with SPON_Money, but that is no biggy. PM me an email address and I'll send you what I have, with a few notes on usage and poking it into SPON_Money.

For true client data sharing(i.e. full item/money exchange between players) the issue is more complicated, as you would really like to store all data on the server and verify each transfer. It gets a bit messy for my ability.   
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
DaChevs doesn't use SPON Money ;P
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
I know, but D007 does.
urp!

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Oops, lost track.
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline D007

  • Members
  • *
I know, but D007 does.

Yes I do.. Yes I do..

Oh Peanut version 1.1 is out now.. If your trying to incorperate that into this..
"which we would greatly appreciate lol"
you may want to get the new version at armaholic key word quarantine.
Thanks a bunch.. cheers. :)

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
urp!