GTAMP.com

Grand Theft Auto Media Press
It is currently Wed Feb 21, 2018 11:15 am

All times are UTC




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Jan 18, 2018 6:41 am 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1089
the lobby system however also has advantages: scoring starts for everyone at the same time. teams can be balanced before start and races can start immediately without having to wait for players. i think it is nice to have. the real problem is that there is no way to join later on at all. it would be cool if players were allowed to rejoin if they lost connection and if you could have a setting in the lobby to allow or deny joining in general after the game has started. whether that makes sense depends on the map and players preferences. if there are only few players online i would switch it on by default. if i want to play a 1 on 1 or a mission map i would turn it off.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Fri Jan 19, 2018 1:12 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1303
Location: GTAMP.com
Logofero wrote:
Interested in: How the game verifies that the player has responded to it, what sends in response when Connecting/Disconnecting, how many bytes, what keys are included, what the structure of data exchange between clients looks like. What addresses are used for the network game.


None of that has been documented. GH used to get the game name and player count by sending 3400B0FA020008FC000000000000000000000000706C617902000E0020891E56705CD211AD0000A0C9B613980000000011000000 to port 47624 and listening for a reply on port 2300 (or a custom port by changing 08FC) but now it just gets that information from memory. That was the only network code I documented.

I will eventually release a program that can read and write ped/vehicle coordinates over a network. I made a proof of concept but I got distracted and haven't touched the code in 9 months. In theory it should support hundreds of players but syncing weapons/damage/combat would be more difficult, so first version would be just for racing and messing around.


Top
 Profile  
 
PostPosted: Fri Jan 19, 2018 1:46 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1089
the biggest problem could be hidden variables because everything depends on the internal state because there is no syncing. peds and cars move dependend on a pseudo random number generator which has to get its seed from the internal state of the game which might be random memory reads. so these could maybe never be put in sync again except you find out how the random function works and it turns out it is predictive. if you cannot get this in sync then npc peds and cars will be zapping around when the ping isnt good enough because the driver in the host game decides to move in one direction while the one in the client is going in the other direction. this could be even more of a problem if a car spawns in one game but not the other and the memory then gets used for something else.

the only realistic way this could be done would be by syncing the whole internal memory that doesnt interact with the os because that has to be different on each system. you could probably find a way to separate those but this also means a potentially huge bandwidth requirement and latency problems. even if you only transfer diffs and only if the client detects a desync. i think, if anything then it could only be used as a desync fixer. another problem would obviously be security problems because you essentially send executable memory content over the internet.

if we go so far then it is probably better to just run all games on the server and just stream video and audio to the clients. considering the relatively low resolution this might even work and could also be useful to give emulators a way to play old splitscreen games over the internet.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Fri Jan 19, 2018 2:08 pm 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1303
Location: GTAMP.com
For my test map, I disabled all traffic and random peds and made all players and vehicles indestructible. Most of the racing maps don’t have peds or traffic anyway.

Syncing every little thing would be a huge effort, so unlikely to ever happen but I still want to sync the basics and see if I can keep it stable.


Top
 Profile  
 
PostPosted: Fri Jan 19, 2018 4:31 pm 
Offline
Psycho

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 77
Guys, I launched the funding company viewtopic.php?f=22&t=1135 if it turns out to collect $1000 I'll start developing a remake on the engine Unity 3D with a new multiplayer. 8-)

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Fri Jan 19, 2018 7:21 pm 
Offline
Psycho

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 77
Sektor wrote:
Logofero wrote:
Interested in: How the game verifies that the player has responded to it, what sends in response when Connecting/Disconnecting, how many bytes, what keys are included, what the structure of data exchange between clients looks like. What addresses are used for the network game.


None of that has been documented. GH used to get the game name and player count by sending 3400B0FA020008FC000000000000000000000000706C617902000E0020891E56705CD211AD0000A0C9B613980000000011000000 to port 47624 and listening for a reply on port 2300 (or a custom port by changing 08FC) but now it just gets that information from memory. That was the only network code I documented.

I will eventually release a program that can read and write ped/vehicle coordinates over a network. I made a proof of concept but I got distracted and haven't touched the code in 9 months. In theory it should support hundreds of players but syncing weapons/damage/combat would be more difficult, so first version would be just for racing and messing around.

Thanks you for answer. It's really useful. So there are successful results spawn/creating new objects on all connected clients? Sector, what area of ​​memory is responsible for calling a new object? This can be useful for modmeykers except multiplayer.

I've even thought about creating a library that loads its scripts (similar to CLEO from GTA SA). A simple parser and that the user could create scripts in a text notebook without the need for compilation. But these are just reflections.

Added:
100 players is fine. But what about the lobby and the reconciliation. Can this be changed to constantly connect new players to the game? If not, then all the calculation of the number of players in principle becomes meaningless. Nobody will wait for 100 people in the hall.

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Sat Jan 20, 2018 12:09 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1303
Location: GTAMP.com
Logofero wrote:
Thanks you for answer. It's really useful. So there are successful results spawn/creating new objects on all connected clients? Sector, what area of ​​memory is responsible for calling a new object? This can be useful for modmeykers except multiplayer.

I don't know how to create without using script, so I would just make a script with 100 cars and peds and teleport them around as required.

Logofero wrote:
I've even thought about creating a library that loads its scripts (similar to CLEO from GTA SA). A simple parser and that the user could create scripts in a text notebook without the need for compilation. But these are just reflections.

If someone figures out how to hook into all the existing GTA2 functions then adding support for a better scripting language is the next logical step.

Logofero wrote:
100 players is fine. But what about the lobby and the reconciliation. Can this be changed to constantly connect new players to the game? If not, then all the calculation of the number of players in principle becomes meaningless. Nobody will wait for 100 people in the hall.

The simple coordinate sync program would support joining and leaving at anytime.


Top
 Profile  
 
PostPosted: Sat Jan 20, 2018 12:53 am 
Offline
Psycho

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 77
Sektor wrote:
Logofero wrote:
Thanks you for answer. It's really useful. So there are successful results spawn/creating new objects on all connected clients? Sector, what area of ​​memory is responsible for calling a new object? This can be useful for modmeykers except multiplayer.

I don't know how to create without using script, so I would just make a script with 100 cars and peds and teleport them around as required.

On account of this, I also thought. And is there a way to change the skin of the already created cars?

Sektor wrote:
Logofero wrote:
100 players is fine. But what about the lobby and the reconciliation. Can this be changed to constantly connect new players to the game? If not, then all the calculation of the number of players in principle becomes meaningless. Nobody will wait for 100 people in the hall.

The simple coordinate sync program would support joining and leaving at anytime.

It seems that this is a good way around the Lobby system. Each player will create a game for himself at 1 player, and the client will connect in the background to the server, and the server will check (in a cycle) whether the player returns coordinates? If not, then it shut down (timeout) from the server. Hmm. Maybe it's nep

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Sat Jan 20, 2018 1:05 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 1303
Location: GTAMP.com
Changing the colour/remap of existing cars is easy but I’ve never changed the model, transforming cars would be cool but probably difficult. A car can transform into a wreck, so changing into a different car type isn't that different but I've never tried it, there might be many memory addresses to change. With peds you can change the graphic and remap easily.


Top
 Profile  
 
PostPosted: Sat Jan 20, 2018 1:13 am 
Offline
Psycho

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 77
Sektor wrote:
Changing the colour/remap of existing cars is easy but I’ve never changed the model, transforming cars would be cool but probably difficult. With peds you can change the graphic and remap easily.

Yep. I am the model in view of.

Just re-create. I was thinking about how to get the address of creating a car - it's to dump all the memory of an empty map and the one on which 1 cars is created. But I did not check it. Probably this way it will be possible to find out the memory address where the model is initialized.

_________________
[GTA2 Map] F-Industry-Live
[GTA2 FAQ] Help for scripters
[GTA2 Scipts] MISI Library


Top
 Profile  
 
PostPosted: Mon Feb 19, 2018 11:54 pm 
Offline
Mugger

Joined: Thu Mar 31, 2016 12:32 pm
Posts: 11
I think the best way of doing this is just to create an open source engine. But to get it "true" to GTA2 you'd need to do a lot of reverse engineering to get the physics to behave in the same way. That is probably the hardest part :).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group