The simplest multiplayer using WebSockets and pure WebGL 1.0 with animation from Resident Evil

Published May 29, 2023
Advertisement

I implemented the simplest multiplayer using WebSockets (package ws - npm) and Node.js. I send keyboard input to the server, which relays it to other clients. Used by WebGL 1.0, glMatrix and OimoPhysics. Extracted original models, textures and animations using RE1MV. Created a non-skinned skeletal animation using the Blender Python API. Skinning is expensive in terms of resources and is not needed for the models in this game, in which all parts of the animation models are separate objects.

All extracted animations for Jill and Barry. Rotate the camera with the mouse wheel pressed. Moving the camera with the right mouse button:

2 likes 4 comments

Comments

8Observer8

I extracted the original skeletal animations from RE1MV and wrote a plugin in the Blender Python API to load animations into Blender:

May 30, 2023 05:11 PM
8Observer8

My multiplayer above is not working properly. The idea was to have the same physics world on the clients and apply the same keyboard event (to apply the same pulses) without the physics world on the server for smooth movements. The server simply forwards the array of keys pressed to other clients. But after a while, the physical worlds on the clients are no longer the same. I should have an authoritarian server, that is, a physical world on the server to synchronize the positions and rotation angles of the clients.

June 02, 2023 08:05 AM
8Observer8

I completed the first version of the demo with an authoritarian server, where you can navigate in cooperative and single player modes from the first and third person. Made to show models, animations made in Blender and interactive interactions on WebGL. Demo in browser: https://8observer8.github.io/webgl10-js/room-webgl-js/

June 06, 2023 12:27 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement