Page 2 of 2

Re: Just question of GTA2

Posted: 18 Jan 2018, 06:41
by elypter
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.

Re: Just question of GTA2

Posted: 19 Jan 2018, 13:12
by Sektor
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.

Re: Just question of GTA2

Posted: 19 Jan 2018, 13:46
by elypter
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.

Re: Just question of GTA2

Posted: 19 Jan 2018, 14:08
by Sektor
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.

Re: Just question of GTA2

Posted: 19 Jan 2018, 16:31
by Logofero
Guys, I launched the funding company http://gtamp.com/forum/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-)

Re: Just question of GTA2

Posted: 19 Jan 2018, 19:21
by Logofero
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.

Re: Just question of GTA2

Posted: 20 Jan 2018, 00:09
by Sektor
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.

Re: Just question of GTA2

Posted: 20 Jan 2018, 00:53
by Logofero
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

Re: Just question of GTA2

Posted: 20 Jan 2018, 01:05
by Sektor
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.

Re: Just question of GTA2

Posted: 20 Jan 2018, 01:13
by Logofero
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.

Re: Just question of GTA2

Posted: 19 Feb 2018, 23:54
by paul
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 :).

Re: Just question of GTA2

Posted: 23 Feb 2018, 02:05
by Logofero
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.

Re: Just question of GTA2

Posted: 27 Feb 2018, 07:25
by Logofero
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.

Re: Just question of GTA2

Posted: 27 Feb 2018, 12:56
by elypter
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.

Re: Just question of GTA2

Posted: 03 Nov 2019, 20:21
by BBBean
This looks like a general questions thread. So...

Has anyone figured out how to make the Mad island gang drive their gang car (Shark by default, I think)? I tried to change the car ratios of the area but it didn't work. Or perhaps I edited the wrong section but I think it's unlikely. The gang cars simply didn't appear.

Re: Just question of GTA2

Posted: 04 Nov 2019, 14:59
by Logofero
BBBean wrote: 03 Nov 2019, 20:21 This looks like a general questions thread. So...

Has anyone figured out how to make the Mad island gang drive their gang car (Shark by default, I think)? I tried to change the car ratios of the area but it didn't work. Or perhaps I edited the wrong section but I think it's unlikely. The gang cars simply didn't appear.
Hi, BBBean.

Please attach source of the modification it. Maybe so someone will prompt a solution faster.