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.
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.
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.
- There's still ammo and health huds being rendered by the enemy players on the screen, this should be resolved. - Weapon pickup notifications or such are also displayed it seems.
- I have no way to detect, sync, or control crouching or jumping (yet).
- There are various crashes in relation to damaging the enemy, opening the pause menu while in-game, and picking up power-ups these all need to be resolved before this is remotely playable.
[**] 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.
- I have currently not found any information related to power-ups such as (speed increase, jump boots, or etc) meaning these do not properly sync over multiplayer (mostly just visual stuff would be missing as the players would still be able to perform the actions.)
- I currently have no idea how the joining of games will work and have no way to automatically force the game into a world/level in order to 'start' the game without going through the menus, that being said I know it should be entirely possible to do with some tweaking.
- Currently when I spawn players I do not use the traditional spawn points, I plan to look into this though.
- Fly modes absolutely will not work...
- No co-op (yet).
- AI does not sync on the tree house map.
- There may be issues with those turret guns on the d-day style map, as well as the nukes that get fired due to the fact I'm not currently planning on syncing their projectiles.
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/28b68ff2e24228d4cb322f053d1da0d5https://gyazo.com/a0d188e044c72031d9ee2f9a0158c42dhttps://gyazo.com/00035ba9fc739111a62b563a5e3599fb