Jump to content

Suggestions for sync peds and traffic


Guest Monkeymagic2

Recommended Posts

I think maybe GTA 3 might use a random seed :?: you could try and match these seeds :?:

or

The game gets started within the console, and the server "waits" till all players (clients) are ready then the server c;ocls GO! or something.

I think here we should all post suggestions on how to get past the sync.

And also, (For the MTA team)

Are you accepting new recruits?

Link to comment

It would be virtually impossible to code synchronized pedestrians AND cars without severe lag (for net gaming anyway). The possibility of synchronized LAN gaming exists, altho it is a lot of data to be sent back and forth considering the size of the map and the amount of cars and pedestrians in it. But, it seems only pedestrians and cars within a certain distance of where you are on the map are rendered, perhaps that could be used to decrease the amount of information sent some how, by maybe only sending back and forth the data regarding the models within a certain radius of the players location. I have done some TCP/IP programming before and i know how difficult/repetative it can get, which usually results in the project being discontinued due to sheer boredom. I hope of course, this wont be the case here ;). So remember, when your ratting the poor programmers ass as to the release date of the next version, just think to yourself the amount of work required to, effectively, 'recode' a game in a way which the original makers of GTA3 failed to do, and implement a feature left out for reasons of obvious difficulty. Your prayers are being answered, the least you can do is have a little patience :)

Link to comment

Monkeymagic2: we've already discused traffic syncing multiple times:

https://forum.multitheftauto.com/viewtopic.php?t=13&postdays=0&postorder=asc&start=0 is perhaps the best debate, and my opinoin is in there, second page.

im pretty sure the random seed is an original idea, i see how it could work, when i program in vb, if i forget the "Randomize" statement, all the ranom numbers will be the same predictable pattern

to stat^: he is not talking about syncing all the cars by sending huge amounts of data back and forth, he is saying just to sync the random seed. for all non programmers: when you use random in code, its a list of numbers, un changing. the random function has a thing called a seed. its sort of like the base numbers in a Fibanachi sequence. so he is saying to sync the seed, so all the numbers the gta3 generates will be the same, thus anything left to ai (randomness) will be the same simply because the seed is the same.

btw: the reason this wont work: all the numbers generated will be the same for everyone, but for different reasons. for example: if im in a place where the options for traffic is: foward and right, but the sycned seed says left, that is not a valid option therefore they are now unsynced. second: lets say one player has one car on screen. the amount of random numbers his gta3 will use would be less than another player who is perhaps in the tunnel, where there are lots of cars, therefore a greater need for random numbers. all though you both will have the same pattern, one will be used quicker than the other, meaning that the random events will be different unless you stay on the same area as the other person the entire game... no fun (also .03 will have many people)

Link to comment

-one other thing: this mod was programmed in vb

-and for internet play, it uses winsock (perhaps .03 wont)

-i know this because the runtime errors when the program crashes are the same ones i frequently get when programming with winsock

-once you have the data-transfer part down, programming w/ winsock is increadably easy.

-on a preivoius thread (i think perhaps the old forums) i said that i hated winsock, i do for the following reasons: getting the data-transfer part working correctly is annoying. winsock is not good at cramming: i had a for-loop sending data through an array of ws's and it only sent the last element and it does not like firewalls. it took me ages to realize that having the "setup.exe" for my firewall was causeing it to die when i tried todo "winsock1.listen" but other wise, once all is figured out, it works fine, and i think that the MTA Team can definately handle it.

Link to comment

The *ONLY* way the game can be synchronized, both pedestrians and traffic is to have the host constantly sending out the coordinates of every model rendered to every client connected, there is no 2 ways about it. This is why the Multiplayer extra was originally left out, and also why you never see this in any other game. The amount of information to be sent is just too great, the only hope would be a LAN solution. Allow me to illustrate.

................ [CLIENT]................

.......................|.....................

[CLIENT] - [sERVER] - [CLIENT]

.......................|.....................

................[CLIENT]................

The server would control the positions of everything on the map, from cars and pedestrians, to debris and police. To allow free flowing gameplay, with pedestrians and traffic following the exact same route on each system, the information would have to be sent 4 ways (assuming there are 4 people connected). The bare information itself it just huge, sending it between 2 systems would be far too big, sending it between 4, thats quite a large upstream rate. Plus, each client has to send the same information back, EG Client1 hits a car, causing it to swirve off the road and hit 3 pedestrians, then topple on its roof and explode killing another 4 pedestrians and setting 2 cars on fire. That information must be sent first to the server so the changes can be made, then resent to all the clients connected. Considering the speed of which all that can happen, that, bundled with the positions of everything on the map, is a lot of data.

With regards to randomize 'seed', if by that, you mean the server and client each follow a ruleset where the pedestrians and cars all follow a set of instructions, predefined, what happens when client1 hits a car, sets it off the ruleset. That car for all the other clients would have to follow the ruleset, thus breaking the snychronization. The only way around it would be to send the coordinates of the changed position, which would start off a chain of coordinates having to be sent, thus resulting in the masssive amount of data being sent, there is no way around constant packets of huge data being sent.

It is more than likely, the programmers will remove all pedestrians and most traffic, and have a small amount of synchronized AI to give the game a level of realism. Or alternatively, remove all AI and have plain deathmatch mode, or simplify the map, perhaps have a custom map built which would have to be a lot smaller.

All this would take away the realism of GTA3 which would make the multiplayer mod as addictive as single player mode.

The truth of the matter is, there is no real way to do it without sending data of this magnitude. One day, when high-end broadband internet becomes standard, and we all sit at home on our T3 lines piped directly into our rooms, perhaps this will become a reality. For now, we must settle for the simple CLIENT vs CLIENT method, with the slight possibility of some realistic AI, and LAN of course ;)

Link to comment

couple things... more concept than anything

the server wouldn't have to send the data of EVERY car and EVERY ped to EVERY client...

it could just send all those near a current players location...

as far as clients having ot tell the server about interraction w/ the world....

why couldn't hte server do that itself based just of the objects position as told by the client...

I.E. Client A drives along and runs through a telephone pole... (or a pedestrian).. the server's GTA3, sees this car go through and adjusts the world accordingly... this is then sent back to all the clients..

Iuno seems like that could work... and save a lot of bandwith...

Link to comment

stat^ I didn't mention anything about the release date about .03, and for 1 thing i'm also a programming and I also have done TCP/IP programming. Also, I wasn't ratting anybodys arse.

For the MTA team:

Why did you choose VB? Its not the best programming language for this sort of stuff.

For Stat^:

What programming language do you use? Why?[/b]

Link to comment

but are you guyz able to totally (or minimally) rid the traffic and peds all together? Im a MTA newb and just wundering. Im already guessing that the engine only allows one player entry to the world.......blah blah i have no clue. But keep ups the work.

Link to comment

Alright, I posted my syncing idea in it's own thread, but I really messed up, so I'm gonna take another shot at it.

Things WOULDN'T be random. So... the entire city would go in a 5 min loop, where at the end of five minutes, it's back where it started.

The only time peds and traffic would be synced would be if a player entered a ped/car's "bubble" (an invisible bubble that extended say... 15 game feet). Just so that if you ram into a ped's car, that all of the players will see the car flying off the road.

this way, at any time, only about 30 peds - max, would have to be synced, yet traffic would still function.

(the only problem would be that when you download the mod, you'd also have to download all the info for that 5 minute loop, which would make it a big file :( )

Link to comment
  • 2 weeks later...
Things WOULDN'T be random. So... the entire city would go in a 5 min loop, where at the end of five minutes, it's back where it started.

so at the end of the loop everything would magically jump back to its previous starting point ? that would add to the realism of it, im sure ;)

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...