Author Topic: PC Version Multiplayer - Online Modification  (Read 37374 times)

Offline PermaNull

  • Raptor
  • ***
  • Posts: 52
  • T:REP 187
    • View Profile
PC Version Multiplayer - Online Modification
« on: December 13, 2015, 01:17:47 AM »
UPDATE 10/7/17:
For those of you just tuning in, I've made a lot of progress and have been able to get most of the objects to sync over the network while also fixing some bugs that were present in the game due to the port.

An example of some very early gameplay can be seen here:



First to introduce myself, I'm a random lol... I've never hung out in any Turok communities and I've barely played the game.

I'm an experienced programmer and I reverse engineer as well, I write in a ton of different languages and have experience hacking/modifying games.

Back in about 2008 I had randomly stumbled across a PC port of Turok: Evolution and was intrigued upon looking at the game it was amazing, it didn't make sense that it didn't have online multiplayer and I had discovered Turok 2 and the game that was coming out later that year had it...

Digging around I managed to find various files in the build which was released online documenting object data (not model objects, but class objects/game objects).

Long story short I did have a working multiplayer online modification which was ghetto at best the health was synchronized but the way players were shot and such was pretty rigged we basically synchronized where the player was looking and when they fired and sent the event to the other side, the de-synchronization was crap and caused things to happen like a player wouldn't actually be shooting you even though on their screen they were.

Now to get to this point the first step was modifying the files to allow us to go into multiplayer mode (Split-screen) I had discovered split screen existed due to the fact none of the menu files for it were removed from when it was ported to PC from the original xbox platform.

The way I originally went about this was simply replacing the files in the cheat folder with the files from the Mutliplayer folder, that will get you  into the basic multiplayer screen beyond that there's some additional check I can't quite remember how I got past.

As of today I've started to look into this again and I hate to say all of my original code for that project I called "t4mp" is gone and sadly not even the website which once was, was properly indexed to where you could've seen some of the screenshots and such we took.

Code: [Select]
http://web.archive.org/web/20070801000000*/http://t4mp.org

Though I did happen to make some slight progress reverse engineering the menu format and replaced the cheats Menu with Multiplayer without replacing the files and actually modifying the atr instead.

I'm still trying to figure out what it was I originally did in order to make the "MultiplayerJoin" screen not back out, this was pretty hacky ( I believe I deleted the events for players 2-3 ).

But long story short when this was active we had actually disabled the split-screen view port and could actively spawn more then just the original 4 players, meaning actual online multiplayer support.

I may work on this but I just thought I should share that little story and see if I can help you guys out or if there's anything you know about the game's file formats which I don't currently.
« Last Edit: October 07, 2017, 09:05:29 PM by PermaNull »

Offline PermaNull

  • Raptor
  • ***
  • Posts: 52
  • T:REP 187
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #1 on: December 13, 2015, 02:27:40 AM »
I'm still working on a way to fix a few things, but I've managed to get it past the player select now by removing the object/event definitions for the additional 3 players.

The method I used when I created this back in 07-08 though actually allowed me to control the first player as well as select a player other then Tal'Set, so I'm still experimenting with how to get this to work the way I want/need it to.





UPDATE
I've got it going into game with the player selection enabled and jesus christ I had forgotten about how much we actually had to fix the last time we worked on this..

I remember the spider control thing we had to fix a crash there, there's a crash with the scope on the pistol.
And the dinos at the bottom of the treehouse map didn't render properly we had to fix the zbuffer stuff to fix that.

Yet I did not remember that the second player didn't render (it's coming back) gonna be hell to figure this stuff out I'm sure if I remember correctly when we fixed it the first time it was by accident.

Anyway here's a video demonstrating the Multiplayer split-screen functioning on PC with me being able to select a character and etc, (I had to disable 2nd player input purposely) I don't plan to support actual split-screen on the PC as going that route is rather difficult and requires more knowledge of the ati layout that I don't have.


Also you cannot re-spawn the 2nd player due to them not having any controls assigned/mapped,
What I did previously was triggered this manually over the network.

Basically once you find the player object in memory back-tracing to the class constructor results in finding the player spawning function, so what I was doing previously was I followed the D3D viewport stuff back and disabled the 2nd player's screen and then manually spawned and controlled players through the player class.

« Last Edit: December 13, 2015, 06:35:40 AM by PermaNull »

Online Dinomite

  • Chronoscepter
  • ******
  • Posts: 2895
  • T:REP 8886
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #2 on: December 13, 2015, 07:00:21 AM »
DAMN DUDE! Thats AWESOME! I knew multiplayer was still in there! I have a feeling you and i will become great friends. Turok Evolutions multiplayer is one of, if not the best Turok Multiplayer out there. There are alot of talented people on the forum here so they might help you if you want.
Split screen on PC would not be that bad asuming that the other player could use a controller if properly mapped, but online would be way better. I used to play this split screen on my Xbox with my brothers or friends.

The most hated person on the internet.

Offline PermaNull

  • Raptor
  • ***
  • Posts: 52
  • T:REP 187
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #3 on: December 13, 2015, 07:11:04 AM »
DAMN DUDE! Thats AWESOME! I knew multiplayer was still in there! I have a feeling you and i will become great friends. Turok Evolutions multiplayer is one of, if not the best Turok Multiplayer out there. There are alot of talented people on the forum here so they might help you if you want.
Split screen on PC would not be that bad asuming that the other player could use a controller if properly mapped, but online would be way better. I used to play this split screen on my Xbox with my brothers or friends.

So with the object data I have online should be entirely possible and I've made advancements in my skills since the first time I attempted it,
The first time I was using TCP which was already a no no, as well as a remote server relaying all the packets (Written in BASIC don't ask lol).

Long story short the original implementation that was buggy as all hell was before I knew a lot about game programming and the proper way to handle a lot of the stuff.

It's just I don't really recall how we fixed most of these bugs like the rendering issues and stuff, reverse engineering the rendering loop should be simple enough so disabling the 2nd player's screen shouldn't be a huge issue, I've already found structures in relation to the player's health, spawning and etc so actually spawning players via external code also shouldn't be very tough.

But fixing these graphic bugs are where I'm going to have problems to be honest which I think is where people on the forums will come in handy especially the guy developing the level editor as it's safe to assume he knows a ton more then me about 3D programming in general.

As far as actual split screen on PC there's still issues like the one shown in the image below that need to be overcome, but I'm pretty sure controller mapping wouldn't be too difficult from what I've seen looking at the files.

The only other thing I would have to determine is if the MutliplayerJoin.ati patches would still be required if a controller was properly assigned to the 2nd player, if it wasn't possible without the patch I would have to implement some strange hack to allow the 2nd player to switch weapons or fix the really screwed issues it has where it will knock you out of multiplayer or spam accept buttons and stuff.

But yeah when I first started working on this project in 2007 there seemed to be no one really interested in the development of it so we went quite our domain expired and we stopped development then in 2012 I lost my drives which had the original code and research/fixes on it.


« Last Edit: December 13, 2015, 07:14:01 AM by PermaNull »

Online Dinomite

  • Chronoscepter
  • ******
  • Posts: 2895
  • T:REP 8886
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #4 on: December 13, 2015, 07:14:22 AM »
DAMN DUDE! Thats AWESOME! I knew multiplayer was still in there! I have a feeling you and i will become great friends. Turok Evolutions multiplayer is one of, if not the best Turok Multiplayer out there. There are alot of talented people on the forum here so they might help you if you want.
Split screen on PC would not be that bad asuming that the other player could use a controller if properly mapped, but online would be way better. I used to play this split screen on my Xbox with my brothers or friends.

So with the object data I have online should be entirely possible and I've made advancements in my skills since the first time I attempted it,
The first time I was using TCP which was already a no no, as well as a remote server relaying all the packets (Written in BASIC don't ask lol).

Long story short the original implementation that was buggy as all hell was before I knew a lot about game programming and the proper way to handle a lot of the stuff.

It's just I don't really recall how we fixed most of these bugs like the rendering issues and stuff, reverse engineering the rendering loop should be simple enough so disabling the 2nd player's screen shouldn't be a huge issue, I've already found structures in relation to the player's health, spawning and etc so actually spawning players via external code also shouldn't be very tough.

But fixing these graphic bugs are where I'm going to have problems to be honest which I think is where people on the forums will come in handy especially the guy developing the level editor as it's safe to assume he knows a ton more then me about 3D programming in general.


You have a point there.
So if i understood your picture correctly, that Tal'Set and flying Warclub are rendering errors right?

The most hated person on the internet.

Offline PermaNull

  • Raptor
  • ***
  • Posts: 52
  • T:REP 187
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #5 on: December 13, 2015, 07:18:05 AM »
You have a point there.
So if i understood your picture correctly, that Tal'Set and flying Warclub are rendering errors right?

Indeed, the game has rendering issues in Multiplayer due to the fact that it was originally built for the xbox and never intended to render on multiple viewports for PC, It's possible by just disabling the extra view port the issue would be fixed.

The issue with the Tal'Set being all deformed I don't believe relates to rendering, I believe that has more to do with the fact there's no input assigned or something isn't happening.

The floating warclub is actually the 1st player (The one I'm playing as, you can see it in the youtube video I've showed), there's more invisible stuff like the dinos on the treehouse level tons of stuff we had issues with early on the first time I worked on this and I believe some of it may have been fixed by actually disabling the spit-screen while leaving the 2nd player spawned.

Essentially just disabling the rendering of the second screen and making the game believe it only has to render the first player's screen.

Currently I'm going to debug the pistol zoom crash and see if I can't fix it,

I'll provide the patched files here (if that's allowed) once I wake up today (haven't slept been working on this all night), and then everyone can screw around with the multiplayer functionality.

Also the ATR viewer does actually load some of the multiplayer maps as well I was experimenting with that a bit.

UPDATE:
Some real quick nops in relation to the area it's crashing and the pistol zoom now works :D, really dirty method I should probably figure out what it was trying to access and why it failed... but regardless it doesn't seem to have caused any additional problems performing the nops that I did.

I could now reverse engineer the viewport stuff.

« Last Edit: December 13, 2015, 07:26:11 AM by PermaNull »

Online Dinomite

  • Chronoscepter
  • ******
  • Posts: 2895
  • T:REP 8886
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #6 on: December 13, 2015, 07:28:18 AM »
You have a point there.
So if i understood your picture correctly, that Tal'Set and flying Warclub are rendering errors right?

Indeed, the game has rendering issues in Multiplayer due to the fact that it was originally built for the xbox and never intended to render on multiple viewports for PC, It's possible by just disabling the extra view port the issue would be fixed.

The issue with the Tal'Set being all deformed I don't believe relates to rendering, I believe that has more to do with the fact there's no input assigned or something isn't happening.

The floating warclub is actually the 1st player (The one I'm playing as, you can see it in the youtube video I've showed), there's more invisible stuff like the dinos on the treehouse level tons of stuff we had issues with early on the first time I worked on this and I believe some of it may have been fixed by actually disabling the spit-screen while leaving the 2nd player spawned.

Essentially just disabling the rendering of the second screen and making the game believe it only has to render the first player's screen.

Currently I'm going to debug the pistol zoom crash and see if I can't fix it,

I'll provide the patched files here (if that's allowed) once I wake up today (haven't slept been working on this all night), and then everyone can screw around with the multiplayer functionality.

Also the ATR viewer does actually load some of the multiplayer maps as well I was experimenting with that a bit.

UPDATE:
Some real quick nops in relation to the area it's crashing and the pistol zoom now works :D, really dirty method I should probably figure out what it was trying to access and why it failed... but regardless it doesn't seem to have caused any additional problems performing the nops that I did.

I could now reverse engineer the viewport stuff.


Nicely done! You're showing rapidly quick progress dude and its only making me want more.

The most hated person on the internet.

Offline PermaNull

  • Raptor
  • ***
  • Posts: 52
  • T:REP 187
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #7 on: December 13, 2015, 07:32:37 AM »
Nicely done! You're showing rapidly quick progress dude and its only making me want more.

It helps that I've done it before, and I've actually figured something interesting out there's something that changes once the player is dead that resolves the rendering issues but only for that specific player.

I.E. If player2 is dead player 2 can see player 1 perfectly fine (No invisible stuff, no invisible dinos or etc), if player 1 is dead they can see the dinos and other player as well (I'm talking about in the kill camera that waits till you respawn).

So that may be one route to go about fixing the rendering issues while still having split screen is checking what exactly is changing between when a player is dead and alive as far as camera and rendering flags.
« Last Edit: December 13, 2015, 07:33:21 AM by PermaNull »

Online Dinomite

  • Chronoscepter
  • ******
  • Posts: 2895
  • T:REP 8886
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #8 on: December 13, 2015, 07:34:47 AM »
Maybe it has something to do with reseting the player and by doing that, automatically refreshing the renderer.

The most hated person on the internet.

Offline PermaNull

  • Raptor
  • ***
  • Posts: 52
  • T:REP 187
    • View Profile
Re: PC Version Multiplayer - Online Modification
« Reply #9 on: December 13, 2015, 07:51:03 AM »
Maybe it has something to do with reseting the player and by doing that, automatically refreshing the renderer.
I don't think that's it because if I die then respawn the issue is still persistent while I'm alive.

It only fixes while you're dead then goes back to the way it was while you're alive.