Page 1 of 2

Just question of GTA2

Posted: 15 Jan 2018, 23:32
by Logofero
DISCLAMER: This topic is just for discussion. Please do not take it too seriously. But it's also interesting to know your opinion. You can also ask your questions here on GTA 2.

I have a ripe question. Who's in this sort of thing. Why is there a strong lag behind the network? Is it a bug in the engine code? The same GTA Vice City / GTA SA supports up to 100 players and does not lag as GTA 2 with 6 players. What is the reason, the transmission limit of bytes through a network connection? That is before there were 52k / bit reason for the architecture of the engine?

Re: Just question of GTA2

Posted: 15 Jan 2018, 23:50
by Sektor
TLDR; Other games hide their lag.

GTA2 just sends the keys pressed and it has to wait for every key before it can move to the next frame or the game would go out of sync. Advantage, perfect sync, less data needs to be sent (sometimes) and it makes some types of cheats impossible.

Other games often send coordinates and actions instead of key presses, so it doesn't matter so much if a packet is missed since it will just be a small teleport or slight desync and the game will continue. They might also send keys but they have methods of fixing the sync, GTA2 doesn't have any code for that. The fact is they do lag but they hide the lag at the cost of sync and they trust the client not to be cheating, so it doesn't matter so much if sync isn't perfect, if the client says their aim was good then it counts as a hit on the server. There can be protections but when you have two clients telling the server different things, one a hit, one a miss, the server decision is going to be wrong for someone. It's also a lot easier to get away with hiding lag with instant bullets. In GTA2, the bullets are slow and you can clearly see when there's a hit or miss, so it would seem like horrible sync if I started losing health but the bullets were clearly missing on my screen.

Re: Just question of GTA2

Posted: 16 Jan 2018, 00:17
by Logofero
Sektor wrote:TLDR; Other games hide their lag.

GTA2 just sends the keys pressed and it has to wait for every key before it can move to the next frame or the game would go out of sync. Advantage, perfect sync, less data needs to be sent (sometimes) and it makes some types of cheats impossible.

Other games often send coordinates and actions instead of key presses, so it doesn't matter so much if a packet is missed since it will just be a small teleport or slight desync and the game will continue. They might also send keys but they have methods of fixing the sync, GTA2 doesn't have any code for that. The fact is they do lag but they hide the lag at the cost of sync and they trust the client not to be cheating, so it doesn't matter so much if sync isn't perfect, if the client says their aim was good then it counts as a hit on the server. There can be protections but when you have two clients telling the server different things, one a hit, one a miss, the server decision is going to be wrong for someone. It's also a lot easier to get away with hiding lag with instant bullets. In GTA2, the bullets are slow and you can clearly see when there's a hit or miss, so it would seem like horrible sync if I started losing health but the bullets were clearly missing on my screen.
Thank you for the detailed response, Sector.

In my opinion it's better to face cheating than with the lack of players (which inevitably in any case it will and this is one of the indicators of the success of the game). I would love to play on a more synchronized GTA 2 than on: rrrruuunn ... jjjuuum ... p. Departure. Well, you understand.

Added:
So it's allowed to add more players it would be great.

Re: Just question of GTA2

Posted: 16 Jan 2018, 00:26
by Sektor
Yes it's worth compromising on sync and risking cheats if it means the game runs faster and we get more players. Hiding lag and making it easier to play (no fucking port forwarding) are my most wanted features.

There are improvements that could be made without compromising sync like switching to a client/server model instead of directplay peer to peer. With GTA2, all players send keys directly to all other players, this would mean all clients would need a lot of upload bandwidth to support 100s of players, it would be much better for just the server to have the good bandwidth and relay all the communications.

Re: Just question of GTA2

Posted: 16 Jan 2018, 00:37
by Logofero
Sektor wrote:Yes it's worth compromising on sync and risking cheats if it means the game runs faster and we get more players. Hiding lag and making it easier to play (no fucking port forwarding) are my most wanted features.

There are improvements that could be made without compromising sync like switching to a client/server model instead of directplay peer to peer. With GTA2, all players send keys directly to all other players, this would mean all clients would need a lot of upload bandwidth to support 100s of players, it would be much better for just the server to have the good bandwidth and relay all the communications.
Just as implemented in SAMP? That is, write a server to which the players will connect and the server will work as the translator of all the commands. Who tried to implement such a scheme in GTA 2. From your experience? It interesting.

Re: Just question of GTA2

Posted: 16 Jan 2018, 06:32
by elypter
i dont know how they did it in samp but there is no easy way to interact with the internals of gta2. the scripting language is very rudimentary and you would have to do a lot of binary patching. it would probably be less work to finish one of the gta2 engine rewrites like opengta2

Re: Just question of GTA2

Posted: 16 Jan 2018, 07:33
by Logofero
elypter wrote:i dont know how they did it in samp but there is no easy way to interact with the internals of gta2. the scripting language is very rudimentary and you would have to do a lot of binary patching. it would probably be less work to finish one of the gta2 engine rewrites like opengta2
If we discuss how it is easier to implement a fast multiplayer then: It's easier not to end someone else's code and write your own ready engine: Unity3D or UDK or other, using ready-made content, trying to observe the physics and mechanics of control. I have not finished understanding yet why no one did it that way. Although I have long encountered a similar clone, but it was a Game Marker 2D engine. The guy almost recreated the original GTA even the helicopter added the only thing that was not similar to the crooked control and the feeling of not reality and emptiness in the game. R* all tried so hard to avoid the empty city and tried to create the impression of a live megapolis: the sounds of this, the changing density of traffic and so on, that lovers to return with a remake are usually too lazy to do, long and time-consuming. Therefore, we considered the idea of ​​using the ready-made GTA and its refinement. It would be interesting to know how realistic this is at the moment.

The server is exchanging commands with the client. As it was written, Sector. Rather than correcting and writing the control of the game with the help of memory. I see it only in this form.

Re: Just question of GTA2

Posted: 16 Jan 2018, 07:58
by Logofero
Also. You can even open a donation for the developer of the server part of GTA 2 to motivate it. Everyone who is interested in the development of network GTA 2 has thrown himself at its development. A tip at all to the server switched and earned on advertising and adding servers to the selected list as it is done in SAMP. I think the whole thing is laziness, there is no desire to do a project that is not popular with most players. But since the community of GTA 2 lives for so many years then with a good multiplayer, its number would have grown 2 or even 3 times.

Added:
How paradoxical it would be. The success of the game is determined by three points:

A) If it invests money (any),
B) If the game has respect and love of the players,
C) If the game has enough opportunities for cheating.

Re: Just question of GTA2

Posted: 16 Jan 2018, 09:09
by elypter
i don't think it is a good idea to bring money into the game. this brings the kind of attention that causes trouble.

there certainly is potential to make gta2 more popular. sure a new engine could make it more attractive but there is also the risk of turning it into yet another generic casual game. much of the originality of gta2 comes from its engine quirks. so if your motivation to add a new network stack to gta2 is to keep the original then i agree but i dont know if this is technically the best way. but if networking is the only problem for you then i kinda have to disagree. with a decent connection you can easily get pings under 120 for you whole continent. the only real problem with latency comes from the fact that there are so little players that you have to play with people from other continents. if there were just 20 active players on each continent you would not have that problem because there can only be 6 players max on each game.

Re: Just question of GTA2

Posted: 16 Jan 2018, 09:37
by Logofero
elypter wrote:i don't think it is a good idea to bring money into the game. this brings the kind of attention that causes trouble.

there certainly is potential to make gta2 more popular. sure a new engine could make it more attractive but there is also the risk of turning it into yet another generic casual game. much of the originality of gta2 comes from its engine quirks. so if your motivation to add a new network stack to gta2 is to keep the original then i agree but i dont know if this is technically the best way. but if networking is the only problem for you then i kinda have to disagree. with a decent connection you can easily get pings under 120 for you whole continent. the only real problem with latency comes from the fact that there are so little players that you have to play with people from other continents. if there were just 20 active players on each continent you would not have that problem because there can only be 6 players max on each game.
Donations in this case is not a mandatory collection for the game, but when it is launched this motivates the developer of the beta developer. Problems with this kind of fees should not arise. Of course, the fund holder must be a reliable, honest person who will distribute the funds received for the development of the project. This does not mean that you should invest in what to play with others. And if you suddenly decide to become an investor, you will be able to use additional services such as: Add your server to the selected list and etc, while you can start the server in the general list, where there will be more regular servers. This is an example of earnings. Investments are important in any industry without them, people lose the need to develop something, interest disappears, the developer starts to engage in a commercially successful project. In the end, everyone must live for something. You know this very well.

Re: Just question of GTA2

Posted: 16 Jan 2018, 10:03
by elypter
i have nothing against donations for direct expenses or any small amounts but if big money is involved, and by that i mean anything that could pay a salary, it causes all sorts of problems. if you have enough people to donate a reasonable salary then you also have enough players near you for a good ping. money makes people take control, manipulate, exploit people and it attracts people with lawyers. i wouldn't really fear that anyone on the forum would suddenly grow cartoon dollar signs out of their eyes but capitalism always finds a way and countless community orientated projects went down the hill because of popularity and the money. it is the number one source of software drama. rather donate tools and workforce and spread the word and small amounts of money if they are directly needed like server costs or as a small "thank you".

Re: Just question of GTA2

Posted: 16 Jan 2018, 10:29
by Logofero
elypter wrote:i have nothing against donations for direct expenses or any small amounts but if big money is involved, and by that i mean anything that could pay a salary, it causes all sorts of problems. if you have enough people to donate a reasonable salary then you also have enough players near you for a good ping. money makes people take control, manipulate, exploit people and it attracts people with lawyers. i wouldn't really fear that anyone on the forum would suddenly grow cartoon dollar signs out of their eyes but capitalism always finds a way and countless community orientated projects went down the hill because of popularity and the money. it is the number one source of software drama. rather donate tools and workforce and spread the word and small amounts of money if they are directly needed like server costs or as a small "thank you".
It is about donations in question. Just do not be afraid that you will be paid. No one will force you to do something if you do not want to - everything is simple. It is important to understand that this is not an obligation, it is an initiative. Accordingly, if it comes from you, you will have a better chance of getting a "reward" for it. Any commercial project was always made first on the enthusiasm, and afterwards people created staff from employees who love their work and make it a hobby. Any project either develops or falls apart from bankruptcy and laziness. If you do nothing you do not get anything. It is obvious. As the saying goes: "Water does not flow under a still stone".

As I see the development of this project:

What the change in client:

1. Editing gta2.exe. Adding new functions, methods for networking. Change the sending of all traffic from the client-client to the client-server.

What the client does:

1.1. Connecting/Disconnecting to the server,
1.2. Run/Change a map that is running on the server,
1.3. Sending/Receiving data (keys) as written by Sector.

What then make server:

2. Create a server from any of the languages ​​that supports working with sockets. Starting from C ++, C #, VB, or other.

What the server does:

2.1. Starts/Changes the map (via script or settings),
2.2. Receives/Sends keys, listening to the IP and the port on which it is running. If the client is connected, it starts distributing/Receiving received keys from the client to all clients connected to it.
2.3. Regulates the rules between customers. It is a regulator between customers.
2.4. It filters incoming connections: Enables/Disables/Disconnects clients by IP.
2.5. Sends data about the list of all connected players to the specified FTP for example via POST.
This is for monitoring and statistics so that people can see who is playing on the server. There is another option. In this case, there is no point in pointing it out, since even the above discussion is nothing more than just a discussion. It takes time and motivation. As I wrote above, many developers take on something only with funding because they need to live on something and not only engage in hobbies.

Re: Just question of GTA2

Posted: 16 Jan 2018, 11:10
by Logofero
Also, for each client to see all running servers, you can:

Option A:

Create a master server that will receive data from all running regular servers on the network. These are only infarction data:
Hostname, IP, port, name of mod and the like.

Option B:

Store all data about running servers on FTP in MySQL, or other DB and accept requests to Overwrite/Read data about running servers on the network. After transfer to the client as an online list of server names.

I remind you. All of the above is just a discussion. It would be great to see your beloved GTA 2 in a more successful network accompaniment.

Re: Just question of GTA2

Posted: 16 Jan 2018, 11:25
by elypter
im not saying that paying developers is an entirely bad thing but before a community decides to go this route you would have to think through every possible scenario. and that implies that the community even has any saying in it at all. i was checking out vr lately and thought if i could put my old xbox kinect to any use for this. i found out that relatively short after the release hackers found a way to use it on a pc and without microsofts proprietary software. they tried to deny it but eventually gave in. enthusiastic hackers continued to develop and a small company formed which had some great plans and made a decent software. up until then this sounds like it was a good idea to put money into the equation? well, the company got bought by apple and development stopped. the project site now redirects to apple.com it might have been good for the employers, who knows but it certainly ripped a whole into the open source community around that topic. no idea if they would have ever gotten that far without investing money but it got everyone hyped up and then betrayed them. this leaves scars and splits up the community. even if projects are open source they still lose a lot of momentum when they stop and a fork slowly has to move people over and has to compete with other rivaling forks.

Re: Just question of GTA2

Posted: 16 Jan 2018, 11:59
by Logofero
elypter wrote:im not saying that paying developers is an entirely bad thing but before a community decides to go this route you would have to think through every possible scenario. and that implies that the community even has any saying in it at all. i was checking out vr lately and thought if i could put my old xbox kinect to any use for this. i found out that relatively short after the release hackers found a way to use it on a pc and without microsofts proprietary software. they tried to deny it but eventually gave in. enthusiastic hackers continued to develop and a small company formed which had some great plans and made a decent software. up until then this sounds like it was a good idea to put money into the equation? well, the company got bought by apple and development stopped. the project site now redirects to apple.com it might have been good for the employers, who knows but it certainly ripped a whole into the open source community around that topic. no idea if they would have ever gotten that far without investing money but it got everyone hyped up and then betrayed them. this leaves scars and splits up the community. even if projects are open source they still lose a lot of momentum when they stop and a fork slowly has to move people over and has to compete with other rivaling forks.
On account of the impact of an unsuccessful investment - this is a human factor. The more the company the greater the risk of its collapse. It's a snowball. Do not dramatize everything. Without a real investment in modern society from the place can not get off. Or you live in the forest. Charities are engaged in those who already have a passive income, and not someone who has good intentions or one idea. And to compare investment with disintegration is also not true. And you connect the contributions and development with the large companies that have burned out. The companies burn out because of greed, co-operation and lack of interest in the business that they do. This can happen to any non-commercial community. It can even happen to the best friends and lovers. If you argue this way, you can go on to a rhetorical philosophy: All that is in this world has a life and its death, the collapse is irreplaceable. To revive the dream in a different guise and variety. Starting from the life of man, the planet, ending the universe.

But we are not discussing this with you. You do not want to invest - your right. You do not want to fulfill someone's errands - your business. You do not want to develop the project in a commercial way - nobody calls you. After all, it can be done by others who see in this a real potancial. Of course they vryatli will share with those who did not participate in this work. And no community will fall apart - If it's simply not there.

It's all cool. But it's not very constructive. Can you suggest something from yourself?

Re: Just question of GTA2

Posted: 16 Jan 2018, 12:34
by elypter
i dont see why we should not talk about life and the ending of the universe. this is the chat section after all ;) my point isnt of rethorical nature at all, it might be theoretical though because of the slim likelihood of this happening. dont get me wrong, it would love to see new projects to emerge but this community has not been growing over the last 10 years and there were enough chances. i dont see big chances for projects that rely on external motivation. there is not enough for such a big project and those who have it are already occupied with their own projects. thats the sad truth about the open source community. you can share all those great ideas but if you want to see any of them realized you have to do it yourself and you will never have time to realize some cool idea you read somewhere because your own ideas occupy you enough already. you cannot get around this problem with money because that usually has to be earned which costs time that could be used directly more effectively.

Re: Just question of GTA2

Posted: 16 Jan 2018, 13:39
by Logofero
elypter wrote:i dont see why we should not talk about life and the ending of the universe. this is the chat section after all ;) my point isnt of rethorical nature at all, it might be theoretical though because of the slim likelihood of this happening. dont get me wrong, it would love to see new projects to emerge but this community has not been growing over the last 10 years and there were enough chances. i dont see big chances for projects that rely on external motivation. there is not enough for such a big project and those who have it are already occupied with their own projects. thats the sad truth about the open source community. you can share all those great ideas but if you want to see any of them realized you have to do it yourself and you will never have time to realize some cool idea you read somewhere because your own ideas occupy you enough already. you cannot get around this problem with money because that usually has to be earned which costs time that could be used directly more effectively.
Why did I decide to create a theme?

* This can be useful for anyone who thought how best to implement a network game, but maybe someone decided to learn it in more detail. Maybe this will inspire any then to create a new multiplayer for GTA 2 because there is simply no good multiplayer.
* If I was going to create this, I would not write this as an offer for the community.
* Exchange of constructive, useful advice, ideas for implementation.

What for?

* New members of the community, unfortunately, quickly lose interest, write on 1-3 posts and then disappear without a trace. Have you ever wondered why this is happening.
* It is necessary to try to interest people, to surprise. Why not collect general knowledge and create something together.
* Community today does not have a stable/productive multiplayer.

PS: I like that all the participants that are here, it's really a fan of GTA 2, not forgetting about the game and the forum. This is a plus for this very reason that GTA 2 is not completely forgotten. But do not you want to play in GTA 2, say in a zombie mode, in a cooperative or somehow with an ideal synchrome? Where will there be enough players for the RP or just post-shooters? Certainly I wanted to.

That's why I created this topic. For anyone who wants to see what's useful. Or just discuss, dream, share a useful info.

Re: Just question of GTA2

Posted: 16 Jan 2018, 14:56
by Logofero
Sektor, were are get database with all known memory addresses of GTA 2? (except those on the form).

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.

Re: Just question of GTA2

Posted: 16 Jan 2018, 16:59
by elypter
i think many lose interest because the community is not very big and you wont get the kind of feedback loop you get with modern games where you also get stats, likes and instant gratification. it also takes a while to get used to to the tools and setting up a toolchain. and of cause it is the lack of activity on this forum in general. but the most important point is that this happens everywhere. most commenters on any forum have between 1 and 5 posts. btw, i think you can have a decent zombie map with enough pointer magic and a 6 player coop would be quite fun i assume.

Re: Just question of GTA2

Posted: 18 Jan 2018, 02:32
by Logofero
Dude. I've been thinking about the mechanics of the network game and I've come to the next one.
In GTA 2 there are a number of limitations that complicate the game for a large number of players, making it difficult:

1. The network game is based on the "lobby" mode - the game starts at all at the same time - this means that if the server is already started to join, enter the game, new players will not succeed. At the start of the map all the data about the players are initialized: their maximum number, spawn position, objects, counters. And only after initialization is synchronization with customers. That is, the server becomes closed to other connections. Perhaps it can be patched, but how should this be said by a person more knowledgeable about the architecture of the game.

2. As I already wrote earlier, these are terrible lags. With the fact that the game can be a little players from 1 to 6. With this amount of delay is a torture for the player. It is not pleasant to play not in the newest game with creepy lags.

3. Loss of communication means a non-return flight. That is, the player flies and can not enter back. This would not have been if the game was built on the "Lobby" system. If this could be changed to a "permanent connection" this could be avoided. In general, I found a number of limitations multiplayer in which it is simply not rational to use the game engine GTA 2.

But after all, we are not looking for the easiest ways with you. I pondered on this and realized that the prospects for a network game on this engine so far there. The lobby system spoils everything. In the past, most games were based on this system, since the developers did not think that the Internet would become so popular and did not pawns (more slots) into the network mode.

If someone has their thoughts on this topic - write, discuss.