GTAMP.com

Grand Theft Auto Media Press
It is currently Tue Apr 24, 2018 2:40 pm

All times are UTC




Post new topic Reply to topic  [ 35 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: 1094
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: 1328
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: 1094
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: 1328
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
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
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
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
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: 1328
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
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
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: 1328
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
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
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  
 
PostPosted: Fri Feb 23, 2018 2:05 am 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
paul wrote:
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 :).

What prevented you from completing the GTA open sources?

You just became not interested. After all, everyone sees everything. Now you think that the other will finish your project - this is the psychology of the "given project". The time of open (free) information is replaced by a closed time. All that is readily available loses the consumer's price, tsenost for the author himself.

Therefore, I refused the project's drafts. Not because I'm greedy. And to finish it and not give up as many who have laid out the surprises. This is psychology. With her, it's hard to fight harder, do not.

My MISI project is closed, but I'm ready to share useful info but only with interested developers who in turn are ready to help me. For this, you do not need to have an open project. You yourself are driving you to a dead end by someone else's idiology of "everything free". It is she who stops you from continuing to do the project. After all, you (without knowing it) think that it will be completed by another.

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


Top
 Profile  
 
PostPosted: Tue Feb 27, 2018 7:25 am 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
At the expense of rewriting and collecting source code bit by bit, and then a lot of engineering.

In our case, it's much easier to write a client and a server managed through memory games, screw the scripting language and run the server, the server will send to the DB to FTP "my name and IP will be launched" and then other clients will see the server in the list and be able to connect to it . As soon as someone connects the client, the server synchronizes with the server and the server map is loaded in the game, and so many players will be able to connect to the server as long as it is configured to 65535.

At the same time, it is necessary to make trust to the game client. All basic calculations must follow the rules of the server. The client should be able to connect without waiting for permission to go to the server (non-stop join). This means that only the server will create and clean up new objects and monitor the health of the player. Sometimes you can do synchronization to check the integrity of the game (a sort of anti-cheat), but not often so as not to clog the connection with heavy packets.

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


Top
 Profile  
 
PostPosted: Tue Feb 27, 2018 12:56 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 1094
but as long as you dont control the world mechanics you need constant updates because if you leave some parts to the original gta2 code then small changes are enough to desync the game. peds walk randomly and cars drive randomly. the random number generation depends on the world state. if it just slightly differs a car might turn right instead or left and that will cause other cars to drive differently too and the world state diverts even further. you could either replace all machanics with your own or you could try to reverse engineer the random number generation and then sync that but i think that is very unpredictable and hard to do.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Tue Feb 27, 2018 3:23 pm 
Offline
Hitman

Joined: Wed Dec 09, 2015 2:18 pm
Posts: 151
elypter wrote:
but as long as you dont control the world mechanics you need constant updates because if you leave some parts to the original gta2 code then small changes are enough to desync the game. peds walk randomly and cars drive randomly. the random number generation depends on the world state. if it just slightly differs a car might turn right instead or left and that will cause other cars to drive differently too and the world state diverts even further. you could either replace all machanics with your own or you could try to reverse engineer the random number generation and then sync that but i think that is very unpredictable and hard to do.

This is why most multipliers abandon standard bots in view of reducing the resources for packet exchange.

To synchronize players, you need less resources, of course, this will require updates on this, I say the server is a client, as it will be these calculations of all players, and already customers will take them as their own. I tried to run MISI saw how bots behave with 2 players, each computer does not sync on this the difference happens. It is necessary to add speed as there is "dissynchronization". And now it will happen all the time for various reasons during the game (as time gets lost, then brakes the internal count of 1 player, then 2).

On this synchronization is necessary without it anywhere. For this, it is not necessary to rewrite all code from scratch. It's much faster to create your own engine by simply removing standard pedestrians and adding synchronization to your customers.

All this is only a thought.
Do not assume that I intend to create it.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 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:  
Powered by phpBB® Forum Software © phpBB Group