Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (dr_panther, Ayumi, 1 invisible), 877 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: A question to the MP community [Re: fastlane69] #159932
10/16/07 19:06
10/16/07 19:06
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
What if I define 100 pointers and assign each one of them everytime to the same client. The client registers the building in the database and assigns ID xxx. Now if I want to send to that client I use the ID for playerxxx pointer and the building stays independant , created by the server because of the database update. How does it look now,possible?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: A question to the MP community [Re: EpsiloN] #159933
10/17/07 02:50
10/17/07 02:50
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
You are making it too convoluted. Since you are using a MySQL DB, here is the better solution:

-Keep a listing of all users in the DB... each player should correspond to one user and each user has a unique User ID (UID).
-When a client logs in, they log in as a user. Now you assign that UID to the Client's Pointer in the DB.
-When the client creates a house, it is assigned this UID.
-Now you trace through the DB: house --> UID... UID --> User... User---> Client Pointer.

There are more efficient ways of doing this in the DB (I'm no DB expert) but you get the idea... use a series of "lookup tables" to assign each object in the world to the right client and thus the right pointer and thus can send to the right person.

Re: A question to the MP community [Re: fastlane69] #159934
10/17/07 03:47
10/17/07 03:47
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
You're probably right. I tought it'll be less data to transfer if the player and the server update separately localy,but I'm not going that deep right from the start. I'll try the simplest solution first(yours).

PS.: Thanks for your help , I've never received that many responses to a project I was ever working on
Yesterday I made all the spells,and damage calculations on paper,today I'll finish everything up with the items,and their stats,and I'll be ready when I make my 'simple' movement code BTW , doesnt it look easy the way I want to make it? With just a few vars... Or I'm wrong again?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: A question to the MP community [Re: EpsiloN] #159935
10/17/07 16:18
10/17/07 16:18
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

doesnt it look easy the way I want to make it? With just a few vars




There is no WAY i'm reading through all that mess to deceipher your network plan.
If you can repost your plan and specify exactly what you plan to do with the vars I can comment further.

Re: A question to the MP community [Re: fastlane69] #159936
10/17/07 19:33
10/17/07 19:33
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
Basicly,the system works like this : A player clicks for example on another player with the RMB. (RMB will be for trading,example only! Still deciding what the controls will be,I want RMB for first person for bows & crossbows) The client than sends object ID(the other clients ID) and interraction variable for trading (example 1). The server than sends a request for trade by that certain player by setting no more than 2 skills of the other client. If the other client accepts,sends an interraction variable for trade and an object ID of the other client. Now two of the clients want to trade with eachother...initiate script for trading (Waiting for 1 variable only,everything else will be done in the database...). If you prefer,I can give you the same example with casting a spell,opening a door or building a house. The building process will be with 6 variables. 1 for object ID '0' , 1 for building type (house,shop...) , 3 for pos of the building and one for pan.(No tilt). The highest data transfer will be when a client builds something. Everything else will be limited to state (attack,walk) , pos & pan updates. Health and stats of objects will be managed mainly thru the database with object ID,as you said. I think it'll work,what do you think ?

PS.: I'm almost at the movement code,figuring out input right now I tryed to add animations,but for some reason I can get eighter only client animations,or only server. Couldnt animate on both for some strange reason I'll have to try another way tommorow. Thanks for reading,and sorry if I'm boring with my endless questions,but thats the easyest way to learn...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: A question to the MP community [Re: EpsiloN] #159937
10/17/07 20:03
10/17/07 20:03
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
That seems to be okay. I'm worried about security if you are relying on the client to tell the server what it wants to trade. A more secure solution is to send down which inventory slot you want to trade to the server and then the server determines what object is in that slot... they should be the same. This way you avoid a hack where a client can trade an object it doesn't have by sending down the ID of an object it doesn't have.

Other than that, seems doable... but the proof is in the pudding. You'll need to implement your idea in order to truly see if it will work!

Re: A question to the MP community [Re: fastlane69] #159938
10/18/07 03:59
10/18/07 03:59
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
To prevent cheating to some point,I tought I could limit all numbers in-game to a certain maximum,this way if someone cheats he can do it only to the maximum level possible in-game,but right now I'm not worried about cheating. Maby I should,but my primary task right now is to learn how all this works. I tought Trading done thru the server will increase the data send with 18 variables (Trading cells 9 on each client) , but now you got me thinking ... I'm only sending this once,possibly (with 100 people) once in 30 sec.
BTW , I assigned playerxxx to every player , but only on the server. I dont think it will be needed on the clients,but would be good to have. I should do it in a proc_local function,right ? (I tryed the normal way,like 'player' pointer,but only the 'player' pointer works that way.)


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: A question to the MP community [Re: EpsiloN] #159939
10/20/07 07:46
10/20/07 07:46
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
After reading Giorgi3s Newbies guide (I found it burryed deep on my HDD ) I learned what is executed on server,and what on client. Its easy to understand,but when you have it explained...
I have an idea,not shure if it'll work,gonna test it later. In Locoweeds tut and Giorgi3s tut,I saw they both used sending movement skills only when the skills change. This reduces the data sent to the server a lot. I tought,shouldnt it reduce more if you send only one skill ? Using for example 1 for forward,2 for back,3 for left,4 for right,5 for forward & left,6 for forward & right... This way it'll send only one skill,and I can even include the speed with wich the entity is moving,but in my case this'll be decided by the server. Entity rotation will be done client side(as in the templates) because the one I have right now is more than 'jerky' The entity doesnt even turn if you move the mouse constantly in one direction...
I smoothed to some point the movement,but still needs tweaks. Tested on only one machine,after I get answer to my question,about the 'one skill movement input' I'll test it on two machines(possibly 3,2 LAN and one internet). I wont plan further testing until I see it working correctly on 2~3 machines
I think I'm making progress right ?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: A question to the MP community [Re: EpsiloN] #159940
10/30/07 17:31
10/30/07 17:31
Joined: Jan 2006
Posts: 968
EpsiloN Offline OP
User
EpsiloN  Offline OP
User

Joined: Jan 2006
Posts: 968
If anyone is interested to hear about the progress of this project,I'm not only learning more about MP programming,but I also have 4 bases for a MMO game(I'm always starting from scratch when I have a bug/problem). I only have to figure out how to move the clients smooth to the updated possition,what I currently have looks just a little jerky,but I have an idea how I can fix it.
So far , if I understood correctly from the manual , my clients are receiving 300 bytes / second from the server , and sending less than 80 bytes / second. Theese numbers will increase no more than 50% when I finish all the 'features' of the base. From this point (after finishing the base) it'll need only the graphical parts done,and I already have GUI,Houses and a few items to test the inventory. Basicaly I'm almost half done with the scripting. I'm sorry that noone wanned to help me out...for free...I now have a debit card with enough money to hire a programmer,but I'll never do that now,because I almost learned what I wanned

PS.: I hope I can finish it on my own,and I wish you good luck with MP...


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Page 3 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1