Online Subsystem Steam(OSS)

How is it implemeted?

  1. Include two new modules; OnlineSubsystem and OnlineSubsystemSteam.

  2. Enable OSS plugin and add some of its settings in DefaultEngine.ini.

  3. Created an interface to communicate between a menu UI and my custom GameInstance script.

  4. In the GameInstance script, I created some methods such as creating, finding, joining sessions, and so on.

  5. Subscribe those methods to SessionInterface's delegates.

  6. Host and clients meet in a lobby and move altogether to the main level when the game is ready.

What to improve?

  • Many things should be implemented and improved. However, UI implementation is one of the most important tasks to improve such as session creating settings, filtering sessions, displaying session information, and so on.

Replication lag handle

How is it implemeted?

The cube moves using a time-based cosine curve.

I made a "ReplicatedTime" variable using the "ReplicatedUsing" property specifier. Then I set NetUpdateFrequency to 1 which means clients only get updates from the server once per second.

Then I simulate the movement in both client and server with a "ClientTime" variable but update the "ReplicatedTime" variable only in the server. 

I then override ClientTime with ReplicatedTime every time a client gets updated according to the NetUpdateFrequency.

What to improve?

  • I think there could be a collision issue within a second when the location is slightly different from the server. If I only move the mesh like how I did above and implement normal replicated collision, It might prevent future potential bugs. 

Client View

Server View

There are two cubes that take the server's position information. The left cube is the one I worked on.

The other one jitters when it moves in the client's view. (Hard to see through the video but it's very obvious in the game.)

Vehicle physics

How is it implemeted?

My reference game for the vehicle movement is "Kartrider" which I spent plenty of time playing when I was younger. I implemented its drifting and colliding system along with basic vehicle movement.

  • Collision

I implemented a two-dimensional collision(Wikipedia) and extended it with custom side friction to give extra resistance when a vehicle moves sideways after the collision.

  • Drift

Unlike a normal turn that rotates the vehicle's velocity instantly, a drift turns lerps the rotation of the velocity. Furthermore, the drift turn reduces the radius of the vehicle's turning circle.

What to improve?

  • It needs a lot of visual implementation such as the vehicle's body and wheels, drift trailing, screen feedback for speeding and colliding, etc. (although, I love my chair car...)

©2020 by Gwangyeong Yun(윤광영)