Friday, December 1, 2017

Progress update #1 - Animations, fixed launcher crash (day 5)

Hello guys!

So first progress update on the blog - day #5 of the mod development. What I did today?

Code refactor and comments.

I needed to cleanup the project as the code was getting worst each day I work on it. Also as I still remember what all the stuff I wrote in the last 4 days is doing I commented it for easier development in future.

Fixed timeout handling.

There was one nasty bug in connection timeout handling. When you were player and host closed the game it's character disappeared but you were not kicked out of lobby. That is fixed.

Added walking and idle animation to network characters.

So yes, animations! The Hullu character I'm using to represent players has only two of them - idle and walking. I need to take a look if I can reuse some of the animations game has with their skeletons or I need to make custom ones for mp.

Temporary solution for per user configurable game path. (path.txt file next to the launcher)
As I'm starting to test the mod over real network - not lan - I need some way for users to select My Summer Car path so they can test it. For now it's just path.txt file next to the launcher - I will likely use registry for that purpose later.

Offset character so it does not fly.
As you may see on the gif above - the character is levitating. I moved it a bit down so it touches the ground properly.

Do not load game when player is already in game.
You can now safely join other player when hosting a game. It's still not the final solution - in the end it will be "restarting game world" so the world not be desync. But I needed it for quick testing.

Fixed timing related crash in injector.
There was one timing related crash in the injector. Injector is a DLL that is injected into game process which then hooks into the mono and loads multiplayer mod C# DLL. I was doing it "worst way possible". That means I started another thread and the injector was waiting for all the stuff to initialize by just checking values into while() loops - this solution was full of race conditions and it was just asking for trouble from the beginning.  I fixed it by hooking into proper place in unity player and then loading the mp mod DLL. Works like a charm 😁.

Thanks for reading!

No comments:

Post a Comment