Turok: Dinosaur Hunter Forums!

Turok Games => Turok Evolution => Turok Evolution Modding => Topic started by: PNill on December 13, 2015, 01:17:47 AM

Title: PC Version Multiplayer - Online Modification
Post by: PNill on December 13, 2015, 01:17:47 AM
UPDATE 3/16/2021:
This is still being worked on, just very slowly and the progress is not really there yet; I've reversed a lot more of the engine and have a lot of plans for this.

Some things that I want to do is move to a different networking engine for starters (ENet, or Yojimbo) than writing/using my own raw UDP implementation (If you want to help with this project, and know C/C++ that could be a place to start even if you don't know how to reverse engineer things).

All of that being said I had released a "Pre-Alpha" awhile back that was burried in this forum I'm bringing it up to here now, currently this is the only way to play the MP mod:
Quote
There's now an pre-alpha version of the browser/launcher for the game which can be used to host/join multiplayer games and will automatically install the mod for you;
https://cdn.discordapp.com/attachments/364499772112896001/569032869729533978/SPOILER_T4Browser_-_Pre-Alpha_0.4.rar

This has not be tested much and you will encounter plenty of bugs.

If you have an issue while playing in the game itself report it on this github:
https://github.com/pnill/T4MP/issues

If you have an issue with the launcher/browser report it on this github:
https://github.com/pnill/T4Browser

Thanks and I hope everyone enjoys this, hopefully we can improve this and make things just like the other classics.


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.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill 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.
(https://i.gyazo.com/b3203c57de659b45ce8d1d9f381f3dcf.jpg)
(https://i.gyazo.com/a56e2ec1034067e9f8510630d46873dd.jpg)
(https://i.gyazo.com/2489081812f2ccefd96bd22d353153c0.jpg)


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.

Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill 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.

(https://i.gyazo.com/8a0e1ed8d3794cd36db9622cab1f1c36.jpg)
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on December 13, 2015, 07:18:05 AM
 

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.

(https://i.gyazo.com/ed6702091e95efe3f01aef8c20816273.jpg)
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on December 13, 2015, 07:32:37 AM
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.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill 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.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on December 13, 2015, 08:19:57 AM
Than it probably has something to do with the screen resolution.
Well THAT, or the renderer is still used to the Xboxes unique GPU.

Not quite sure but I've followed D3DCreate9 to the DeviceCreate call and then followed the vtable from there to get where the game is calling BeginScene,EndScene,Present,and SetViewPort so I should be able to reverse how the the rendering is happening for the split-screen now as well as disable the second screen.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Drahsid on December 13, 2015, 04:11:06 PM
If you need any help, I know many programming languages and whatnot, I also know a lot about communication to the GPU.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on December 13, 2015, 08:42:40 PM
If you need any help, I know many programming languages and whatnot, I also know a lot about communication to the GPU.

If you know about D3D programming maybe you can give some insight as to why the players show as invisible some of the time and this changes once the kill camera is active (I.E. a player dies), I assume it has something to do with zbuffers but I truly lack knowledge on the matter.

Here's an example of the Player rendering issues (Ignore the song it was just what was playing on my pandora).

I truly believe this is in relation to depth buffering/zbuffer not being handled properly but I personally don't have enough knowledge on how rendering works to actually solve it maybe someone else with D3D/3D programming experience can offer advice on what to look for ;).

Notice how if the player isn't behind any other objects including the level itself and they're just in front of the skybox they're rendered perfectly fine.

Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on December 14, 2015, 09:11:06 AM
So i played around in the multiplayer and ive noticed almost all, if not, all of the shaders were missing but that kind of stuff is accepted and expected.
Another intresting thing is that when you touch the second player, he turns to a non-deformed version of himself, albeit in a falling pose and starts to slide away.
This is most likely because the second player does not have any inputs set up and the game doesnt know what to do.

I ment to post it yesterday but couldnt because of time constraints and because it uploaded so slowly, i had to let my PC on for some hours while i went to sleep.
EDIT: Here is another video showing off the Flight game mode.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on December 14, 2015, 10:19:25 PM
So while I sadly wasn't able to retrieve any information from my old forum I managed to nab a few screenshots out of a database it had at some point where my partner at the time we testing dynamically spawning objects in real time at the main menu screen.

(http://i.imgur.com/lcuTBEJ.jpg)
(http://i.imgur.com/47DAEPG.jpg)
(http://i.imgur.com/cuebV0Q.jpg)

For some reason I guess we had wiped our original data from the forum in 2007-2008 and re-created it in 2009 which really sucks because I'm sure I would've had things uploaded in the database of the forum in regards to my code which the Database I hadn't lost... but it seems that I had lost that data as well :(
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on December 15, 2015, 10:58:52 AM
I would surely play this if I could! Very interesting please keep it up :)
Title: Re: PC Version Multiplayer - Online Modification
Post by: Froglegs on December 15, 2015, 07:49:26 PM
I am going to keep close watch on this thread along with the Level Editor thread. Awesome work that you have got going on here so far, I can't wait to play Evolution multiplayer again, let alone on the PC!

UPDATE
I remember the spider control thing we had to fix a crash there, there's a crash with the scope on the pistol.

Speaking of these problems you have managed to fix, I noticed that in single player, the pistol's scope is incorrectly sighted which makes it impossible to land a shot on any target when you are aiming right at them. The spider mine also has incorrect camera positioning in single player as well. Do you think these two problems would be an easy fix?
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on December 26, 2015, 09:37:17 PM
I've been on vacation so I've had a lack of progress on this as well as other things I've been working on but it just so happens someone had the compiled version of our old code, I haven't had a chance to check exactly how old or new it is or what stage it was actually at when we sent it to this friend.

But....
It'll certainly integrate some of the fixes to graphics issues and crashes so that's awesome news here! less work less bugs always good.

Of course for some of the more advanced stuff I'll have to reverse engineer our old compiled binaries but that shouldn't be a huge issue at all.

Just thought I'd let you guys know there is some movement on this,
I've also managed to obtain a Beta of the Xbox Version so I'll be using that for reference to certain engine functions and stuff while reverse engineering.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Froglegs on December 27, 2015, 02:59:55 AM
But....
It'll certainly integrate some of the fixes to graphics issues and crashes so that's awesome news here! less work less bugs always good.

Of course for some of the more advanced stuff I'll have to reverse engineer our old compiled binaries but that shouldn't be a huge issue at all.

Just thought I'd let you guys know there is some movement on this,
I've also managed to obtain a Beta of the Xbox Version so I'll be using that for reference to certain engine functions and stuff while reverse engineering.
Oh man, this is all great news! Thank you for keeping us up to date, PermaNull. :)

That's pretty awesome that you got hold of a beta Xbox version as well. I am sure many fans would love to see some footage of it if is playable!
Title: Re: PC Version Multiplayer - Online Modification
Post by: Rok on December 29, 2015, 09:52:49 AM
Well keep it up guys I would love to play this still. Cheers to hopes and dreams :)
Title: Re: PC Version Multiplayer - Online Modification
Post by: The_EyeofTurok on February 12, 2016, 04:01:43 PM
Anything new dudes?
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on February 20, 2016, 10:54:48 PM
Anything new dudes?
I managed to get a hold of some of my old code, but for the past two months I had been in the process of moving and starting a new job so I'm not going to be able to put as much time into this as I would've liked but I will be working on it very slowly.

There's still the depth buffer issues I hope to fix and they're game breaking and I'm not sure if I'll be able to pull it off myself,
Sadly the old code from the previous time we did the modification pre-dates the fixes to that issue.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on March 27, 2016, 09:14:18 AM

This is an old video that i never uploaded until now.
Original creation date was 2015-12-14.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 20, 2016, 09:17:04 AM
I apologize for not providing much info on this,

I've had a lot happen personally that made things kind of go on pause for awhile between being sick, having some infection issues, family issues and other things...

I hope you guys haven't lost interest and know that this is still coming and it will take some time,
I've also been working on my other project for Halo 2 Vista recently so that has been consuming a lot of my time but just tonight I've decided to look at Turok again and I think I've found some very interesting things that will help me in my travels I'll provide more info shortly.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 21, 2016, 09:22:54 AM
I've made minor progress recently...

I reverse engineered the engine object spawning system I still haven't gotten it spawning objects yet though I did get it to spawn them to memory (just not place them on the map) trying to figure that part out.

Though the good news is now that I've found the area that I have after some reversing, time and patience I should be able to effectively disable the second player which I'm hoping will also remove the 2nd screen and in doing so will remove the rendering issues due to there being no overlay.

After that I would simply spawn the players manually for additional players joining the game.

With reversing the object spawns I also managed to find the weapon errors, pickups, and etc rendering function so I was able to produce custom text rendering straight to the screen which I'm sure will be useful once I want to display "Player joined", "Player killed X" or etc.

I leave you with a demo of text rendering:
(https://i.gyazo.com/b144c9f8e7d1dc630db53a4751b7d73e.gif)
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on April 21, 2016, 10:39:34 PM
Hope things clear up personally for you with family and health. Of course, I would still be interested in this. Nice to hear some updates on it thanks for sharing that. I do like seeing Hello World!- Turok Forums written in the game though haha :P Anyways, I could see myself having this game as one of the games I play regularly in MP with. Its better then most of the games out there in mp also. Keep up the great work.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Rok on April 22, 2016, 01:58:53 PM
I leave you with a demo of text rendering:
(https://i.gyazo.com/b144c9f8e7d1dc630db53a4751b7d73e.gif)
Awesome! Love the sight of progress.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 22, 2016, 02:20:00 PM
I leave you with a demo of text rendering:
(https://i.gyazo.com/b144c9f8e7d1dc630db53a4751b7d73e.gif)
Awesome! Love the sight of progress.
I've actually been able to make slightly more progress then this now, Dinomite should be posting a video shortly sadly it's not exactly what I was aiming for but it's getting close.


UPDATE:

Disabling the second player!
(https://i.gyazo.com/1b22528989d2522521820e12f9ec2e55.gif)
^ That is major progress, and I'm researching the depth buffering issues right now.

Hopefully by tomorrow I'm able to spawn additional players which well I won't spoil the surprise, hopefully dinomite posts a video soon of the spawning of object fun he was having.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on April 22, 2016, 06:11:04 PM
Edit: The video is uploaded. Enjoy!

Q & A:
Q: Are the Kronosaurus, Mammoth etc. in the game?
A: Yes but we havent found a way to spawn them without crashing the game yet.
Q: Is this the definitive way to spawn?
A: No, its for development only.
Q: Will there be a video showcasing non-beta things being spawned too?
A: Probably. I'll get around to making it in a while.
Q: When will the multiplayer be released?
A: Noone knows to be honest. Theres still alot to do before its in top working order.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Froglegs on April 23, 2016, 09:23:34 PM
The time for news about the progress of this modification to be announced was definitely worth the wait. Keep at it! :D
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on April 23, 2016, 09:48:50 PM
Holy shit was not expecting this but great to see permanull im definetly still interested in this and the video is bad ass Dino. Wow! Really Lost Land or bust dude.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 23, 2016, 11:07:21 PM
I bring you some of the most important progress of all...

I've completely disabled the 2nd player via an actual DLL now.
And... I've overcome the biggest hurdle which would've held me back with this project....

I FIXED THE RENDERING ISSUE!
Title: Re: PC Version Multiplayer - Online Modification
Post by: Stinkee2 on April 25, 2016, 07:23:22 PM
It warms my heart to see T:E multiplayer on a PC. I'm excited to be able to play with you all in the future, if possible. Thank you Permanull and Dinomite for all of your work.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 26, 2016, 06:56:43 AM
It warms my heart to see T:E multiplayer on a PC. I'm excited to be able to play with you all in the future, if possible. Thank you Permanull for all of your work.
You'll laugh at me if I tell you what the rendering issue is but I don't do d3d stuff much.

So I wasn't aware Clear() could affect the depth buffer and the game has a sub routine to render the weapon when it does this in MP it seems to clear the depth buffer before drawing the weapon well when you switch weapons the rendering loop draws the player then draws the weapon causing the player's depth data to be wiped.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Stinkee2 on April 26, 2016, 09:17:18 AM
I don't have much experience with d3d either, but in opengl I use glClear, and with 3D games usually graphics programmers set it to also clear the depth buffer and stencil buffer. Sometimes those two buffers are even combined. I doubt this game does anything with the stencil buffer though.

This is the kind of thing I've missed in the past, even when I've written it myself. Then worn myself out for a week trying to figure out why something isn't rendering properly. It's kind of interesting to me that that's a problem that exists in the PC version at all. That's the kind of thing I'd think they'd notice and fix early on in the development of the multiplayer.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 26, 2016, 09:25:54 AM
I don't have much experience with d3d either, but in opengl I use glClear, and with 3D games usually graphics programmers set it to also clear the depth buffer and stencil buffer. Sometimes those two buffers are even combined. I doubt this game does anything with the stencil buffer though.

This is the kind of thing I've missed in the past, even when I've written it myself. Then worn myself out for a week trying to figure out why something isn't rendering properly. It's kind of interesting to me that that's a problem that exists in the PC version at all. That's the kind of thing I'd think they'd notice and fix early on in the development of the multiplayer.

To clarify I don't have experience with OpenGL or d3d I've never really done 3D programming I know enough to rip functions and hook areas to do basic rendering of text and menus which other people wrote handlers for but not enough to write my own stuff from scratch.

Well I'm thinking that it got screwed up some how when they were porting to PC because the entire rendering loop for the multiplayer mode is different from the single player,
Multiplayer was never even intended to be functional on PC in-fact there's literally no way to bind controls to the 2nd player.

In theory I could make it happen and add split-screen support by basically updating the memory of the player but that's besides what we're talking about..

So yeah, I had to use PIX to find it and I watched the depth buffer get cleared out here's an example

(https://i.gyazo.com/057a6932754422ee1d5a5153158c89ce.png) - depth buffer before clear.
(https://i.gyazo.com/7f52de6e824867babf675cebeff4fbd4.png) - depth buffer after clear.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 26, 2016, 04:32:22 PM
(https://i.gyazo.com/63dbeb04f56e5a275830ceb2b1ff144f.gif)

Just some really ghetto syncing with me and Dinomite in-game together, basically I just update xyz cords from both sides as well as some minor input for re-spawn and weapon switch.

Obviously not the way the final version would be done but just wanted to screw around.

Also note worth is I haven't been able to spawn a second player without the game doing it itself my friend handled that back in 07 and he had it working I've also completely lost contact with him,
I can't seem to figure it out going to keep trying but we may end up beginning this project with 4 player split-screen matches sadly... Screen looking over the internet anyone? lol.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on April 27, 2016, 07:14:29 PM
That is good progress indeed. I actually wouldn't even care if it has split screen at least till the solution came up for it which I hope would eventually come. But I wouldn't mind it personally. If the co op mode worked 2 player split screen co op would be bad ass though. That is awesome there can the players hurt each other already to? xD
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 27, 2016, 09:06:47 PM
That is good progress indeed. I actually wouldn't even care if it has split screen at least till the solution came up for it which I hope would eventually come. But I wouldn't mind it personally. If the co op mode worked 2 player split screen co op would be bad ass though. That is awesome there can the players hurt each other already to? xD

Yeah players could hurt each other and stuff, but the way I was syncing things was super ghetto just to mess around.

A real implementation would be to hook the areas where it updates positions and such and then use those as events to send data over the network, except the idea is that you want your packets to be as small as possible so you only send deltas rather then full data in every packet....

I need to consider how I'm going to do it..
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on April 28, 2016, 02:54:08 AM
Well it would be funny if you or Iggy smacked each other with the Warclub. I just keep feeling like it was going to happen in the video there lol. So who is who I mean who is top and bottom in that? But of course you want to send the least amount of data. So your saying that creating the way to actually send/render it correctly is the specific issue? I do wish I could help there but I don't think I will be much help on that myself. Its been interesting seeing this much so far though even know we took a trip to the ghetto it was fun hehe :P
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 28, 2016, 09:50:53 AM
Well it would be funny if you or Iggy smacked each other with the Warclub. I just keep feeling like it was going to happen in the video there lol. So who is who I mean who is top and bottom in that? But of course you want to send the least amount of data. So your saying that creating the way to actually send/render it correctly is the specific issue? I do wish I could help there but I don't think I will be much help on that myself. Its been interesting seeing this much so far though even know we took a trip to the ghetto it was fun hehe :P
The issue has nothing to do with the method I will use to sync the data between players...

But to explain the way that it works is he's controlling the 2nd player on my screen where I am controlling the second on his.

It's not really mapping my local input to player 2 and controlling player 2 on him or anything like that.

On our local screens we are both player 1, and remotely we are both player 2.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on April 28, 2016, 12:33:57 PM
Well it would be funny if you or Iggy smacked each other with the Warclub. I just keep feeling like it was going to happen in the video there lol. So who is who I mean who is top and bottom in that? But of course you want to send the least amount of data. So your saying that creating the way to actually send/render it correctly is the specific issue? I do wish I could help there but I don't think I will be much help on that myself. Its been interesting seeing this much so far though even know we took a trip to the ghetto it was fun hehe :P
Video of the "Ghetto match" should be up soon.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on April 29, 2016, 01:53:52 AM
The issue has nothing to do with the method I will use to sync the data between players...

But to explain the way that it works is he's controlling the 2nd player on my screen where I am controlling the second on his.

It's not really mapping my local input to player 2 and controlling player 2 on him or anything like that.

On our local screens we are both player 1, and remotely we are both player 2.

Ahh I see that's got to be pretty confusing there dealing with that I hope you can figure it out though sounds crazy. I imagine that is ghetto :))

Video of the "Ghetto match" should be up soon.

I gotta see this hehe :) Turok ghetto wars.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 29, 2016, 05:43:24 PM
The issue has nothing to do with the method I will use to sync the data between players...

But to explain the way that it works is he's controlling the 2nd player on my screen where I am controlling the second on his.

It's not really mapping my local input to player 2 and controlling player 2 on him or anything like that.

On our local screens we are both player 1, and remotely we are both player 2.

Ahh I see that's got to be pretty confusing there dealing with that I hope you can figure it out though sounds crazy. I imagine that is ghetto :))

Video of the "Ghetto match" should be up soon.

I gotta see this hehe :) Turok ghetto wars.

It's not too confusing to be honest, but it shouldn't reflect the actual project at all in terms of how things will actually work once it's completed.

Though after I synchronized View angles I'm thinking of releasing the current progress so anyone here who is able to port forward can play with a friend of theirs just to screw around while I work to actually sync things properly.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Rok on April 29, 2016, 09:53:46 PM
(https://i.gyazo.com/63dbeb04f56e5a275830ceb2b1ff144f.gif)
That is simply awesome. Would love to see the ghetto turok :)
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on May 02, 2016, 11:47:29 AM
Just wanted to let you guys know for now on I'll be committing my code that makes this happen to GitHub,
https://github.com/PermaNulled/T4MP

One of my next moves will be integrating Google Protocol buffers in order to handle the data exchanges...
With that I should be able to create deltas of the information per player and handle everything in much smaller packets reducing latency overall and increasing the ability to play even if it's in a 'ghetto' state of syncing at the moment.

After implementing protocol buffers is when I'll start looking into event handlers to sync player actions, movements, weapon pickups and etc.

In theory I could have most of the data I need synced in a matter of days but I am currently taking a break from this project as I was pretty upset/disappointed with myself when I couldn't spawn another player without producing their screen I'm hoping that when I come back to this I have more of a drive to look at that again and figure out what I was doing wrong, in the mean time this will kinda just hang out for a while and I'll work on other projects and deal with real life until I find the time and motivation to come back to it.

If anyone else would like to experiment with it the source is there for now, and I'll try updating things at minimum to state where we can sync two players in a PoC (Proof of Concept) fashion via the split-screen mode that's currently in-tact.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on May 02, 2016, 04:26:02 PM
Hopefully things get clear for you again really looking forward to this here and I got the source now thanks very much for that.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on May 03, 2016, 04:36:51 PM
I wouldn't mind split screen either. Awesome work so far hope that you will return in work for this soon :) Anothrr thing I want to say is it was really cool to see some of the beta things and creatures come to life. Seriously thats really cool and im surprised not many commented to it. To bad Adon is not around and im just struggling lately :/
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on May 06, 2016, 08:02:20 PM
...
One of my next moves will be integrating Google Protocol buffers in order to handle the data exchanges...
With that I should be able to create deltas of the information per player and handle everything in much smaller packets reducing latency overall and increasing the ability to play even if it's in a 'ghetto' state of syncing at the moment

...

Hey, sorry to just pop in unannounced! I have been amassing a lot of curiosity and knowledge toward multiplayer game networking, even going so far as to reverse engineering some client/server games to create my own servers for education. Unfortunately I DON'T have a lot of knowledge reverse-engineering binary files or generally trying to figure out what the game is doing. However, if I could get in contact with you to explain things to me about how the dll works and modifies the game's behavior, I could probably help / contribute to this project in some way, if you're open to that.

Personally I don't see how protocol buffers would give you much benefit, especially not for a first person action game like turok. Protocol buffers might be a little too much luggage for something like this, I feel like a well built udp protocol with standardized read/write serialization through bitpacking seems like it would serve you better, but I don't have much experience with protobuf and you're probably more experienced than I am in this area.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on May 07, 2016, 06:31:55 PM
...
One of my next moves will be integrating Google Protocol buffers in order to handle the data exchanges...
With that I should be able to create deltas of the information per player and handle everything in much smaller packets reducing latency overall and increasing the ability to play even if it's in a 'ghetto' state of syncing at the moment

...

Hey, sorry to just pop in unannounced! I have been amassing a lot of curiosity and knowledge toward multiplayer game networking, even going so far as to reverse engineering some client/server games to create my own servers for education. Unfortunately I DON'T have a lot of knowledge reverse-engineering binary files or generally trying to figure out what the game is doing. However, if I could get in contact with you to explain things to me about how the dll works and modifies the game's behavior, I could probably help / contribute to this project in some way, if you're open to that.

Personally I don't see how protocol buffers would give you much benefit, especially not for a first person action game like turok. Protocol buffers might be a little too much luggage for something like this, I feel like a well built udp protocol with standardized read/write serialization through bitpacking seems like it would serve you better, but I don't have much experience with protobuf and you're probably more experienced than I am in this area.

Thanks for the input,
I probably don't have much more experience then you do with multiplayer networking and I feel as if protobuf would just make things easier in terms of transferring data I use it in another of my projects and from what I've read on gamedev.net it's actually kind of preferred as its fast and you can store data how ever you'd like.

The other project I'm working on (halo2) does use bitpacking and it's own custom read/write serialization, I've just never gotten too deeply into processing data like that in C/C++.

I've got stinkee on Skype feel free to add me, tddeadlydata

-----------------

In other news regarding this project specifically I've got some good news about the player spawning I managed to get ahold of my old friend who was working on this project with me and while he was missing the source to the side of the project which would've handled most of the hooks and stuff since he had wrote it in MASM back then.... (I have the C side but it's not really relevant with that version as it just calls the MASM dll).

He still had the DLL is what I'm getting at so, this is awesome because I can reverse engineer this and figure out how the players were spawned in our previous attempt and add it into my new project so I'll actually start making major progress on this again I feel.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on May 07, 2016, 10:04:46 PM
Thanks for the input,
I probably don't have much more experience then you do with multiplayer networking and I feel as if protobuf would just make things easier in terms of transferring data I use it in another of my projects and from what I've read on gamedev.net it's actually kind of preferred as its fast and you can store data how ever you'd like.

The other project I'm working on (halo2) does use bitpacking and it's own custom read/write serialization, I've just never gotten too deeply into processing data like that in C/C++.

I've got stinkee on Skype feel free to add me, tddeadlydata
...

Yes, protocol buffers are fast, but I don't feel like they're quite fast enough for an action based game like a FPS. I'm not sure if the networking protocol is already defined for Turok or if you're just rolling your own in the mod, but if you're rolling your own you probably want to send player inputs at no less than 40 times a second to the server and state updates at least 30 times a second. Protocol buffers work pretty well toward serialization of data for use in things such as a small scale rpg MMO where state updates are less frequent but latency doesn't matter so much. Even at 30 state updates a second you're probably going to ultimately have at least 100ms latency for a client to see other player actions just from state interpolation(extrapolation is different but also not a good idea for an fps game) buffering before you even add in player ping.

I know of some great articles for network data serialization, you don't even have to create separate read/write serialization functions just a single "Serialize" function that reads or writes data from/to a bitpacker depending on an IsReading flag, that eliminates hard to track unaligned serialization function bugs, and it doesn't take much time to get running. I can provide you some easy to use classes to use if you like, that way you don't have to spend time setting up protocol buffers or learning a new library.

With this method your data layouts and definition would be represented via a regular ol' struct in your code, no crazy file generation or huge library to deal with.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on May 09, 2016, 03:22:08 AM
Thanks for the input,
I probably don't have much more experience then you do with multiplayer networking and I feel as if protobuf would just make things easier in terms of transferring data I use it in another of my projects and from what I've read on gamedev.net it's actually kind of preferred as its fast and you can store data how ever you'd like.

The other project I'm working on (halo2) does use bitpacking and it's own custom read/write serialization, I've just never gotten too deeply into processing data like that in C/C++.

I've got stinkee on Skype feel free to add me, tddeadlydata
...

Yes, protocol buffers are fast, but I don't feel like they're quite fast enough for an action based game like a FPS. I'm not sure if the networking protocol is already defined for Turok or if you're just rolling your own in the mod, but if you're rolling your own you probably want to send player inputs at no less than 40 times a second to the server and state updates at least 30 times a second. Protocol buffers work pretty well toward serialization of data for use in things such as a small scale rpg MMO where state updates are less frequent but latency doesn't matter so much. Even at 30 state updates a second you're probably going to ultimately have at least 100ms latency for a client to see other player actions just from state interpolation(extrapolation is different but also not a good idea for an fps game) buffering before you even add in player ping.

I know of some great articles for network data serialization, you don't even have to create separate read/write serialization functions just a single "Serialize" function that reads or writes data from/to a bitpacker depending on an IsReading flag, that eliminates hard to track unaligned serialization function bugs, and it doesn't take much time to get running. I can provide you some easy to use classes to use if you like, that way you don't have to spend time setting up protocol buffers or learning a new library.

With this method your data layouts and definition would be represented via a regular ol' struct in your code, no crazy file generation or huge library to deal with.

Google protobuf isn't very hard to implement but I do understand what you're saying,
From the research I've done there's two goals whether it be FPS or MMO.

1) Deliver the data as fast as possible.
2) Deliver as small of chunks of data as possible.

That being said the idea is to calculate only the values which may have changed since the last send before sending the next packet in order to make sure the size of the packet is as small as possible which is why I agree with you on the bit packing, I'm not sure how efficient protobuf is in terms of 'compression' of the data, I just figured it'd be a decent choice considering I'm already familiar with it.

And I'd have to argue that even MMOs tend to send a shit ton of data, sometimes even more then action fps games do.


Also,
Turok itself does not have any networking capabilities this is being done completely from scratch based on data gathered about the players the obvious solution would be finding places in code where events are triggered (animation update, movement update, view angle changes) then build an event handler around those storing the data and sending it periodically based on available data if it's different from the last send.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on May 09, 2016, 02:48:17 PM
Google protobuf isn't very hard to implement but I do understand what you're saying,
From the research I've done there's two goals whether it be FPS or MMO.

1) Deliver the data as fast as possible.
2) Deliver as small of chunks of data as possible.

That being said the idea is to calculate only the values which may have changed since the last send before sending the next packet in order to make sure the size of the packet is as small as possible which is why I agree with you on the bit packing, I'm not sure how efficient protobuf is in terms of 'compression' of the data, I just figured it'd be a decent choice considering I'm already familiar with it.

And I'd have to argue that even MMOs tend to send a shit ton of data, sometimes even more then action fps games do.
...

Yes, exactly, if you want to send very frequent small packets bit packing is your best bet, protocol buffers seem to be better for slightly larger less frequent packets, I don't know if it supports bit packing but I feel like it would just send byte values, which is a waste of bandwidth when you're sending things a lot. However, I know most MMO games don't bitpack at all due to the cpu overhead per client and that's why I said Protocol Buffers would be more suited toward an MMO type game, especially since they tend to send larger state updates less frequently.

What you're talking about is known as delta state updates, it's very common all the way back to the quake multiplayer source. It's the obvious choice for any action game to keep the packet sizes small, bandwidth usage must remain low especially on a p2p network setup. It's a bit of a challenge to make it work with the udp protocol though since if a delta state gets lost you have to send it again before processing the newer delta states to keep things in sync. With a game like turok using a client/server setup it's possible to send full entire states compressed with common compression methods and bit packing and still stay on very low bandwidth usage, avoiding the complexity overhead of delta states.

MMOs do send a lot more data, less frequently (normally only 20 times a second or even less). They also typically use the TCP protocol. In these types of games latency isn't as huge of a deal since most actions are target based and they do sometimes trust the client too much to hide it and avoid cpu costs on the server. It's okay though, they are very good at hiding this latency since it's not critical and they have a LOT of player and ai states to send around to all the clients, that's a lot of data.

With bitpacking on a udp protocol you could achieve a reliable delivery system of bitpacked full(not even delta) state updates for 16 players at 60 times a second and still remain under 256kbps per client easy(I'm way over estimating too), which is more than feasible for ANY modern or even most outdated network connections. If that somehow DID cause congestion you just crank it back to 30 times a second or so for that client until the way is clear again. If you plan on a p2p setup rather than hosted servers, things get MUCH more complicated since the upload bandwidth becomes EXTREMELY constrained and you have to fit client updates into WAY smaller packets than you otherwise would have to.

The average consumer internet connection might have high download speeds these days, but uploads are constrained a lot, typically you have less than 750kbps to work with on upload. This is bad because if you have to update 16 other players they each only get about 46kbps of data... that's terrible and you can't always expect even 750kbps since clients might have someone doing something else on their network using upload bandwidth, or have even worse upload speeds than that. The only solution here would be to lower the player count, I suspect Turok would only have 4 player multiplayer anyway, so probably not too much of a problem? Even if you wanted 16 players, it's easy in Turok's case to fit player states into 46kbps at 60 packets a second(800 bytes a packet, very easy).

My point here is that you probably want packets as small as possible, especially if it's going to be peer-to-peer games, protocol buffers might not bit pack or compress data, but if you do write your own bit packing and compressing(not as hard as it sounds) you can easily fit within the constraints.

I'll try to start communicating with you on skype to avoid clogging up this thread with technical jargon, honestly I don't think this project even requires as much thought into networking as I'm putting in to it.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Rok on May 10, 2016, 11:44:22 PM
Can't speak for everyone but I certainly don't mind the tech talk. Maybe I will learn something :p So action games normally send data packets differently then other games? Interesting... man I am a noob at this I thought it was pretty much all the same thing.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on May 10, 2016, 11:48:16 PM
Can't speak for everyone but I certainly don't mind the tech talk. Maybe I will learn something :p So action games normally send data packets differently then other games? Interesting... man I am a noob at this I thought it was pretty much all the same thing.

Pretty much every game handles networking differently depending on the genre and needs of the game, I'd go into more detail but it would end up being an entire book.

The basics is that action games are typically reaction based, if you and your enemy are shooting each other the server needs to send proper reactions fast enough for players not to notice any latency (which there is a bunch, no matter what). The server must send data much more often in order to give an FPS shooter game enjoyable game play.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on May 11, 2016, 04:46:42 AM
Can't speak for everyone but I certainly don't mind the tech talk. Maybe I will learn something :p So action games normally send data packets differently then other games? Interesting... man I am a noob at this I thought it was pretty much all the same thing.

Pretty much every game handles networking differently depending on the genre and needs of the game, I'd go into more detail but it would end up being an entire book.

The basics is that action games are typically reaction based, if you and your enemy are shooting each other the server needs to send proper reactions fast enough for players not to notice any latency (which there is a bunch, no matter what). The server must send data much more often in order to give an FPS shooter game enjoyable game play.

Keeping in mind some MMOs also offer PvP play which latency will heavily impact as well and the fact that the mobs are generally server sided in the typical implementation.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on May 11, 2016, 12:36:28 PM
Pretty much every game handles networking differently depending on the genre and needs of the game, I'd go into more detail but it would end up being an entire book.

The basics is that action games are typically reaction based, if you and your enemy are shooting each other the server needs to send proper reactions fast enough for players not to notice any latency (which there is a bunch, no matter what). The server must send data much more often in order to give an FPS shooter game enjoyable game play.

Keeping in mind some MMOs also offer PvP play which latency will heavily impact as well and the fact that the mobs are generally server sided in the typical implementation.

When I talk about latency I'm not talking about ping; I call that lag. I'm talking about the inevitable overhead time a certain network architecture adds for one player to see the actions of another player. In our case imagine all players had good ping of less than a hundred, they would still have a few hundred MS before they see the results of another player. This inevitable overhead time is usually mitigated by higher state update rates, using extrapolation, or both. Extrapolation is normally a fickle mistress and is hard to get right.

Even in pvp for most MMOs latency overhead is easily hidden and does not matter. In the types of MMOs I'm talking about, the only way to damage another player or npc is by using a skill(even regular attacking is a skill with a tick interval), and all skills are target based or AOE based. It's not like you're shooting a projectile that needs precise timing to collide with the enemy player. RNG determines if your skill hit or not and your client just makes the "projectile" follow them and hit them or not depending on the result, even if they teleport from lag. MMOs can have a lot of lag since latency is hidden from the players much better and much more easily. You can tell WoW doesn't bother with extrapolation, as if you lag out or DC players will stop moving rather than continue running along the same path until the server corrects them(but the running animation still plays, so it extrapolates that much). This signifies they use interpolation instead, which means they add at least 50ms-100ms of latency overhead (I don't really know the estimate). So they don't even care about a few hundred ms overhead (both player's ping + overhead from network implementation) and indeed it isn't a problem for most players until they get more than 150ms ping to the server and their skills start taking a recognizable amount of time to register.

The reason you don't see very many FPS MMOs is because a M(assive)MO game is very hard to network as is. Using these slower update rates under a more robust low cost infrastructure gives them the ability to have such a massive player base since there isn't near as much processing happening per player. At that point UDP becomes somewhat unnecessary as well(Although I think they should still use it, but meh), and that's why you see games like WoW using TCP.

Anyway, this is getting pretty off topic!  :P
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on May 15, 2016, 02:24:59 AM
Its actually not much off topic as it has to do with mp in general and that is what is trying to be set up.  I have learned some info just from reading also. The online stuff always drove me crazy like I can understand how a game works and its modding or levels but setting up a online "thing" is not the same. Glad to have this intelligence involved in Turok though.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Revenant32 on August 09, 2016, 03:45:11 PM
Hope this is still a thing would be very cool to play the mp again one day.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on August 12, 2016, 06:47:15 PM
hahah funny as heck ;D but damn what a good video wish I can play it!
Title: Re: PC Version Multiplayer - Online Modification
Post by: Froglegs on August 12, 2016, 11:47:24 PM
That scrunched up Tal'Set at the beginning gave me a good chuckle. Thanks for sharing with us, Dinomite!
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on August 13, 2016, 05:04:14 AM
Glad you like it!
Title: Re: PC Version Multiplayer - Online Modification
Post by: Revenant32 on August 16, 2016, 03:06:58 PM
Yeah the scrunched Tal'Set was funny as hell. But has anyone done any work on this since this video or? I'm under the impression this video was made like a month or two ago and only published now right? I hope someone is still working in it :)
Title: Re: PC Version Multiplayer - Online Modification
Post by: Deathsphere on January 20, 2017, 01:26:17 PM
Mp in this would be very fun.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on April 15, 2017, 04:19:32 PM
As far as i know, no work has been done since Perma and i lost contact. If you'd read the post / description, you would know that it is indeed a vid from months ago. If anybody at all can help me contact permanull, it would be appreciated and maybe even rewarded.

I contacted PermaNull to see if the code in the repository is fully up to date as I may dive in and look at the code myself. He says when he left off with the mod he was attempting to fix a crash relating to spawning players due to the fact that the game is a 4 player maximum (Because of split screen multiplayer).

What happened is he had another mod for Halo 2 which restored multiplayer to the game over the internet since the official server got shut down. He didn't expect it but that mod took off majorly in popularity. He's been very busy working on that mod, which I completely understand and relate to given my current situation.

Is there anything specifically you wanted to discuss with him? I can ask him if he wouldn't mind me sharing how to contact him but I'd say by the looks of it, this mod might be on hiatus for the moment.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on April 19, 2017, 11:10:33 AM
Well I really hope someone will get this thing going :/
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on April 19, 2017, 02:38:20 PM
Well I really hope someone will get this thing going :/

After I got in contact with Perma, it seems to have given him a push toward this project. I'm not making any promises toward the state of the project or anything but we have been chatting regularly about the ins and outs of the project and discussing certain goals that need to be set and achieved for the project to make any significant progress.

Again, I'm not making any promises for any time soon but I figured I'd at least keep you all updated after the huge amount of radio silence from us programmers :D .
Title: Re: PC Version Multiplayer - Online Modification
Post by: Gazer on April 20, 2017, 01:00:03 AM
Well you know Dinomite, we have the tools for co-operative mode in place already with T2 mP. All we need to do is get someone to write the script for "Friendly Fire" no damage to teammates. Then create co-op levels using kexstudio. The levels would have to be mean and nasty of course so that it would take 2 or more players to handle the carnage that might ensue. If we could get Behemoth interested, he seems to like major amounts of carnage, and animal ferocity.

So I don't know about these programmer guys you got here... hmmmmm  ???  lmao Hi djdduty, and I've never met the other guy Perma. I think dj has helped me out a couple times, thanks dj.

gl -hf -Gazer
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on April 20, 2017, 12:13:44 PM
Well you know Dinomite, we have the tools for co-operative mode in place already with T2 mP. All we need to do is get someone to write the script for "Friendly Fire" no damage to teammates. Then create co-op levels using kexstudio. The levels would have to be mean and nasty of course so that it would take 2 or more players to handle the carnage that might ensue. If we could get Behemoth interested, he seems to like major amounts of carnage, and animal ferocity.

So I don't know about these programmer guys you got here... hmmmmm  ???  lmao Hi djdduty, and I've never met the other guy Perma. I think dj has helped me out a couple times, thanks dj.

gl -hf -Gazer

Hmm Idk I think its harder than that there would probably have to be some serious code to allow co op in Turok 2. A friendly fire would be easy to script... But making enemies spawn in a mp mode will crash the game. Some serious code is needed for that in the engine to allow it properly. I'm under the impression the mp mode doesn't know how to respond to enemies placed in maps neither do certain actors or platforms these things don't know how to register in mp. We will need Kaiser at the end of the day.

After I got in contact with Perma, it seems to have given him a push toward this project. I'm not making any promises toward the state of the project or anything but we have been chatting regularly about the ins and outs of the project and discussing certain goals that need to be set and achieved for the project to make any significant progress.

Again, I'm not making any promises for any time soon but I figured I'd at least keep you all updated after the huge amount of radio silence from us programmers :D .

Don't worry about it I think one day all you guys will have this mp going maybe with an editor too... No pressure just saying it would be cool. I would really like to play Turok Evolution in mp. Seriously its a good game for mp Co op would be cool in it also but that may be really tough and involve cutting flying levels out I don't really know how co op flying would go...Maybe its possible...But all we really need is Rok Match Evolution. I never really got to play much besides when I was younger.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on April 20, 2017, 02:30:36 PM
Well I really hope someone will get this thing going :/

After I got in contact with Perma, it seems to have given him a push toward this project. I'm not making any promises toward the state of the project or anything but we have been chatting regularly about the ins and outs of the project and discussing certain goals that need to be set and achieved for the project to make any significant progress.

Again, I'm not making any promises for any time soon but I figured I'd at least keep you all updated after the huge amount of radio silence from us programmers :D .

Gj looking forward to any updates and just like the guys said here no rush no pressure. Keep up the good work guys whatever projects you may be working on. Feel free to share other games projects in general user content or anything else boards. I'm sure some ppl here would support the projects even if its not Turok related. Enjoy!
Title: Re: PC Version Multiplayer - Online Modification
Post by: The GFPes on August 07, 2017, 11:19:59 PM
Still waiting. But considering the way things are going Turok Evolution will be remade by the time this will finish.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on September 25, 2017, 03:41:36 AM
Figure I should probably update this thread since it's been some time since I've made any progress here.


So the last I was working on this I hit a wall attempting to spawn additional players, I managed to solve that and ran into an issue where when spawning the additional player there was hud elements and camera mash between the two players.

(https://i.gyazo.com/b4096b0a432a8cdb07f5f6e4915d839a.jpg)

If you notice there's two of the little walk-way as well as other things...

I also ended up having some fun with talset throwing a tantrum...
https://gyazo.com/cb2e68619eeab773f8f90b1c8d525a8f


Here's another example of the camera issues:
(https://i.gyazo.com/038545c4a331502452ee36b10562400b.jpg)

And I'm happy to say I've managed to find a way to solve this, while it's not solved yet.... I am able to make only the spawned player's camera appear.

(https://i.gyazo.com/172a91a88e57eaceb5eb5b0a4a80741d.jpg)

Within the same sub routine I've also been able to identify effects (Water overlay, pickups, damage - red screen when taking damage) and how to disable them for specific players meaning I've actually fully accomplished this feat and can now start to synchronize the data between dynamically spawned players.

After a long break I've made some serious progress and I'm pretty happy with myself as of right now.

The next steps I'm going to have to take...

* I need to disable the input from player 1 going into player 2, I haven't determined what's causing that yet but I should be able to figure it out.
* Sounds still play for the spawned player picking things up but this is probably a wont-fix at this time.
* There is no sync or multiplayer functionality currently.
* I cannot force the game into a level yet on startup which I'd like to do so that we can have an external lobby system similar to znandroum or zdaemon.
* I have no way to *destroy* players upon a person leaving currently, we could simply kill them and never re-spawn them but this presents other problems which hopefully I'll be able to overcome.

In the mean time things are progressing quite nicely with this roadblock finally out of the way.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on September 25, 2017, 05:29:42 AM
* I have no way to *destroy* players upon a person leaving currently, we could simply kill them and never re-spawn them but this presents other problems which hopefully I'll be able to overcome.
Nobody's complaining when it comes to a free frag. xD
Title: Re: PC Version Multiplayer - Online Modification
Post by: Rok on September 25, 2017, 12:52:03 PM
Wow looks like a lot of good progress. Nice job dude!
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on September 26, 2017, 02:40:46 AM
Some additional progress to report, I've managed to get the 1st player to hold the camera and was successful and disabling some HUD elements for the second player.

The method I had thought would work to disable all HUD elements seems to not have worked. Sadly.

I'll have to find another way to overcome this obstacle.
In the mean time here's a gif in action
https://gyazo.com/e4005ec75bfd52b6c82c2ea1e9990601

To be clear the only hud element really left is the 100 health, and the text that shows up when pickups are done I'll probably leave it this way for now and come back to it and start dealing with the controls.

Things like going in the water or taking damage will have no effect on player 1's screen.

Example:
https://gyazo.com/f5c7efb9aec68a1e580a99cc70228745

Example 2:
Player 1 in the water
https://gyazo.com/a0d8d504c8bf686122da94bd95697125
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on September 27, 2017, 02:53:46 AM
Progress for tonight:

I was able to confirm I'm able to spawn more than 3 players ( meaning we can play more than 4 man games ).
I was able to disable control to other players and only control my player specifically, meaning we're right on track.

(https://i.gyazo.com/b9aa0e5b22d433aac99abdb900dfe478.jpg)
Title: Re: PC Version Multiplayer - Online Modification
Post by: Duke64 on September 28, 2017, 01:27:12 AM
Nice job really good progress!
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on September 28, 2017, 05:54:42 AM
More progress...
I've reverse engineered a majority of the player classes/structures in order to find ways to use the animations, force the player to fire, move (actually walk not slide like seen in previous videos).

And I'm happy to say it's all working out quite nicely...

Enemy I first gave a flame thrower, then forced their weapon switch entire from code.
(https://i.gyazo.com/4276bca59d7c2d1c4027ba437dd992f0.jpg)

I've also actually generated headers for the C side of things so I can no control players in a pretty simple manner,

Here's an example of giving the enemy a flame thrower and making him walk forward/then stopping him.

Code: [Select]

if (count == 3)
{
DMPlayer* pPlayer2 = TurokEngine->pT4Game->pEngineObjects->pCameraArray[1]->pActor->pDMPlayer;
pPlayer2->pWeaponWheel->FlameThrowerAmmo = 500;
pPlayer2->pWeaponWheel->bFlameThrower1 = 1;
pPlayer2->pWeaponWheel->bFlameThrower2 = 1;
pPlayer2->pWeaponWheel->bFlameThrow3 = 1;

//pPlayer1->pos.y = 30;

pPlayer2->WeaponSwitch = -1;
pPlayer2->TimeTillSwitch = 0.1f;
}

if (count == 4)
{
DMPlayer* pPlayer2 = TurokEngine->pT4Game->pEngineObjects->pCameraArray[1]->pActor->pDMPlayer;
pPlayer2->WalkForward = 1.0f;
}

if (count == 5)
{
DMPlayer* pPlayer2 = TurokEngine->pT4Game->pEngineObjects->pCameraArray[1]->pActor->pDMPlayer;
pPlayer2->WalkForward = 0.0f;
}

I should start syncing things over network in no time.

Things left to do outside of just syncing to the network/over the network.

[**] With this one I don't know if the frag count will actually update after my fixes so I may have to write something custom to handle the frag counts.



All of the above being said I'm hoping to take care of a small portion of this by this weekend, and I will be going with Google Protobuf in order to serialize data for sending, and I'll probably write a hook inside one of the main game loops in order to handle the network traffic.


Edit:

Some short gifs demonstrating spawning, weapon switching and player walking...
https://gyazo.com/28b68ff2e24228d4cb322f053d1da0d5
https://gyazo.com/a0d188e044c72031d9ee2f9a0158c42d
https://gyazo.com/00035ba9fc739111a62b563a5e3599fb
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on September 29, 2017, 10:04:36 AM
I see you're making good progress pretty quickly nice job. And cool that Edward helped you in some understanding too.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on September 30, 2017, 05:44:32 AM
 :you're kidding, right:

Progress is starting to slow down but still making my way through it.

I've managed to fix crashes related to damaging the other player or the other player dying/the other player damaging me.

https://gyazo.com/5f49f51effe24e340895de706c4ec659
https://gyazo.com/ca7195ef6809065998b222acabc617c8

I'm able to make the other player fire/shoot as seen above via code with any weapon this was what a majority of the work today went into as well as finding a way to make the player uncrouch after crouching, and I can successfully make the player respawn.

So we're getting close to having everything we need to start synchronizing the data over the network and doing some testing with people online playing vs just controlling the player via local code.

There are still minor issues I want to fix before getting to that point such as:



Now working towards integrating networking and coming back to the rest of the bugs over time.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on October 01, 2017, 03:33:48 AM
It's alive! Awesome that you're making some progress on this! I'll have to check things out again soon.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on October 01, 2017, 04:31:10 AM
It's alive! Awesome that you're making some progress on this! I'll have to check things out again soon.
Holy crap you're alive, you disappeared on Skype lol, as I'm sure you've seen I've made humongous amounts of progress lol.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on October 01, 2017, 05:10:33 PM
Holy crap you're alive, you disappeared on Skype lol, as I'm sure you've seen I've made humongous amounts of progress lol.

Have you been messaging me there? I still get online on skype but I haven't seen any missed messages.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on October 01, 2017, 05:37:13 PM
You havent responded to me in ages either. Lol

Well now I feel bad, there was a period where I didn't have skype installed, but I've been using it again for a while now and haven't had any missed messages. I'm easier to contact on discord since I use it for other things probably.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on October 01, 2017, 06:15:30 PM
Are you on the Turok discord?,
I'm always on Discord lol.


I've started working with the networking side of things and have very basic data going back and fourth currently.
Title: Re: PC Version Multiplayer - Online Modification
Post by: djdduty on October 01, 2017, 08:52:18 PM
I'm not in the turok discord, is there a link somewhere with the discord invite so that I may join?
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on October 02, 2017, 05:33:45 AM
I've implemented very simplistic networking and committed the latest code to the github.

Currently I do not have any content or updates to provide sadly a lot of my time will now be spent solving these issues:
https://github.com/PermaNulled/T4MP/issues
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on October 02, 2017, 11:07:20 PM
Well I started testing out the current network code:


Things work fine on the host end, the host is able to see the player move everything is pretty real-time.

When the client sees the host move however it doesn't quite workout in real time it seems very delayed.

An example of that can be seen here:


UPDATE:
Thanks to edward and djduty I figured out what the issue was there and fixed it should be pretty smooth sailing and optimization from here out....
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on October 07, 2017, 08:49:43 PM
I've got most of the networking working while it's not perfect it's out of sync currently, there's still a lot of crashes, and there's a few things I'd still like to fix...

There's still a lot to do in terms of forcing the engine to load levels directly, have lobbies, player join messages, chat, some kind of way to identify each player, the ability to choose who you want to be... Among other things.


Title: Re: PC Version Multiplayer - Online Modification
Post by: Rok on October 08, 2017, 06:33:31 PM
Really good to see that good progress there. Looks like its going pretty well to.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on October 09, 2017, 11:10:42 AM
Awesome work dudes!
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on October 14, 2017, 05:06:55 AM
Title: Re: PC Version Multiplayer - Online Modification
Post by: Stinkee2 on October 14, 2017, 07:54:56 AM

The monkey was a nice touch
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on October 14, 2017, 08:47:33 AM

The monkey was a nice touch
Absolutely necessary!  :o ;D
Title: Re: PC Version Multiplayer - Online Modification
Post by: The GFPes on November 04, 2017, 11:40:47 PM
This will the the "shite" when it's finished. I can safely say that you guys are my hero's now. I cannot wait for the finished product! :want: :want: Although now I'm curious, what if we could use the map editor and create our own custom maps? Wouldn't that be awesome!?  :yuush: :yuush:
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on November 05, 2017, 03:11:15 AM
This will the the "shite" when it's finished. I can safely say that you guys are my hero's now. I cannot wait for the finished product! :want: :want: Although now I'm curious, what if we could use the map editor and create our own custom maps? Wouldn't that be awesome!?  :yuush: :yuush:
That is the plan. The editor is far in development, while MP deathmatch is in playable state, but most features still are broken. Check my channel for updates on it if you havent already. Ive made vidros of it, but still have loads to upload.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on November 18, 2017, 04:25:36 AM

A multiplayer match hosted on my own server. Everyone played a bit worse in terms of aim due to lag.
Players in the video: Dinomite, Pnill, djdduty.
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on November 04, 2018, 03:48:07 PM
For those of you not on the discord,
I started working on a server browser for this and it's coming along slowly:

(https://media.discordapp.net/attachments/364499772112896001/508733602599796743/e52a1fdd4d0f5e530190064e51354818.png)
Title: Re: PC Version Multiplayer - Online Modification
Post by: Jay Doomed on November 06, 2018, 11:05:39 AM
Great job! how's it going so far in testing?

 :campaigner:
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on April 20, 2019, 02:05:04 AM
There's now an pre-alpha version of the browser/launcher for the game which can be used to host/join multiplayer games and will automatically install the mod for you;
https://cdn.discordapp.com/attachments/364499772112896001/569032869729533978/SPOILER_T4Browser_-_Pre-Alpha_0.4.rar

This has not be tested much and you will encounter plenty of bugs.

If you have an issue while playing in the game itself report it on this github:
https://github.com/pnill/T4MP/issues

If you have an issue with the launcher/browser report it on this github:
https://github.com/pnill/T4Browser

Thanks and I hope everyone enjoys this, hopefully we can improve this and make things just like the other classics.
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on April 20, 2019, 11:13:11 PM
Title: Re: PC Version Multiplayer - Online Modification
Post by: The GFPes on April 21, 2019, 01:05:31 AM
Pretty sure that’s Dino Depot. But anyways, “I WILL DESTROY THEM ALL!!”
Title: Re: PC Version Multiplayer - Online Modification
Post by: Dinomite on May 22, 2019, 04:09:43 PM
Title: Re: PC Version Multiplayer - Online Modification
Post by: PNill on March 17, 2021, 04:25:17 PM
I updated the main post to reflect current status of the project as well as a link to the "Pre-Alpha" release of the project,
If anyone has any questions, recommendations or would like to help out feel free to reach out here or on the discord or by email crich@thedefaced.org