State of the Game, #3

In this (late!) edition of State of the Game, we cover the improvements made to the Modular Vehicle Part System.

State of the Game, #3
A work-in-progress screenshot from Bus Game, prototype 9
📅
Week 29, 2024

Introduction

Time to bring back the weekly post streak, hopefully! Apologies for the lack of posts for the last two weeks, I was sick for a while which dampened my progress a lot - along with some of the extra work needed for the inventory system being complex and very annoying. On the bright side, with that work done, my hope is that I'll never have to re-invent the wheel of inventory management ever again. Hopefully. That seems to be the key word of the week.

Anyways, aside from finalizing the inventory system changes, much of the work since the last State of the Game was focused on integrating the vehicle part system with the updated inventory/item handling, finally allowing players to modify their vehicles using items that they find in the world. I've also modified the Modular Vehicle Part System to synchronize changes across the network, in a server-authoritative fashion to (hopefully!) prevent cheating.


Item-Driven Vehicle Part System

With the first implementation of the Part System, the only way to attach or detach parts to or from a vehicle was to use the arrow keys to navigate an invisible, poorly written debug menu. Now, all interactions between the player and the Part System are handled using items that you can find and pick-up in the world, leading to a much more user-friendly and immersive experience.

Preview of vehicle part changes - not representative of final product!

Obviously, much of what's going on in that preview GIF is not in its final state yet. The Part System will soon have tooltips, telling the player what exactly they're about to do with the tool they're holding - which should fuse well with the existing VFX previews to improve the user experience. I'm also planning on rebuilding the animation system in the near future, so that the player's hand isn't awkwardly floating there all the time.

Part System Networking

The last notable change since the last State of the Game was adding some initial support for synchronizing player's interactions with the Modular Part System over the network. This involves taking the preview of the change that the player is viewing, and sending to over the network to the server, where it's checked and applied if valid. Once the server applies the change, it tells all the connected clients to replicate that change on their end - meaning that everyone in the session should be looking at the same vehicle with the same parts at all times.

There are some other considerations to be made that haven't been yet - like race conditions, for example, when two players try to do a change each to a single mount at the same time - but I think the fundamental design of the system should be pretty resilient to many issues that could arise from networking. Hopefully. And if isn't, fixing it will make a future State of the Game more interesting.


Conclusion

Hopefully that was a relatively interesting read. Going forward, the plan is to work on fixing up the 'backend' of the game for a while. I'd like to be able to test recent feature additions in a more real-world situation, and that'll require some fixing up of the game's core networking and session management code.

On top of that, I'd love to implement a feature that'd make it easier to host sessions for the average player, without having to worry about stuff like port forwarding.

Thanks for reading,

-RB