Week 3: Things Fall Apart
Well, by this point things are mostly back together. But I am certainly justified in my fear of netcode.
- The Netcode -
In the last devlog I had a very vague sketch of how I wanted the netcode to work. My original plan was to have a host that would be the sole authority for the gameplay and would verify every message that came in against its own model of the game state. I quickly realized that any gains from this architecture would be far outweighed by how many issues it added for me to solve. Eventually I ended up having it mostly be peer-to-peer, except the proxy server is still necessary because of websockets not liking connecting to http instead of https connections.
The current netcode works by every player sends their message to the proxy server, which them gives that message a number and adds it to a list of messages that define the state of the game. Then the server broadcasts the message to every connected client and tells the client what message number it is. The client is then able to check if that message number is the next expected number, and if not it can request that the server send it the messages it missed.
Having a host would have had slight advantages in keeping the order canonical, as well as reducing any redundant messages from clients trying to report the same change, but the extra data it would take to send every message to the host first is just not worth it.
The first player to join the lobby does get special privileges like being able to start the game.
Either way the netcode *mostly* works
- Little Bit of a Spit Shine -
I intended to put the polishing off until like the last day or two but with the multiplayer *partially* working I had started to let a few people help me play test, which I quickly realized that there are a lot of things that need added. I originally designed the game to be as intuitive as possible so that people could pick it up quickly, but as soon as someone other than myself touched the game I learned that is not nearly as intuitive as I thought it was.
To help work people into the game more smoothly I added a *very* quick tutorial that tries to familiarize the player with the main interaction of the game. -- Throughout the design process I have been working off a "gamer level" model of player engagement, where level one has almost no game experience and can only barely click around and contribute by accident. -- Well that's who the tutorial is designed for. The funny thing is that I don't even know if my play tester even read the tutorial, despite the fact it has like maybe 15 words total, but the images will probably prime the player to try and interact with the files. I definitely need to add an in-depth tutorial that explains the more complicated mechanics but that can wait until later.
The other main bit of polish comes from some immediate game feedback in the form of little popup tool tips that appear when you interact with stuff. That gives some immediate feedback to the player that what they did actually did something, as well as letting them tell the difference between the impact of the value files and data files.
- Setting the Dressing -
As part of the playtest feedback I also found that the game is really jagged and its hard to get an idea of what the context of the game actually is. This primes players to be less intentional in their interactions and just click around randomly. By adding more animations and interactions it makes it easier for the player to grasp how they are supposed to be playing.
This started with an opening cutscene that shows the malware "infecting the system", but also includes addition like the thread extending and contracting as the file browsers get deeper.
- Time For The Final Stretch -
Next week is the last week, I think I will mostly be working on polish. I really want to add audio, but its always a little hard to justify since I usually play with audio out anyway, and games that start unmuted can be way too loud. I still need to have the files have actual names, which was originally going to have some sort of logic, but most likely will pull from a random list of file and folder names.
I have one more gameplay feature I think I can implement before the end. I really want to have the password protected folder and the clue systems in the game so that level 3 players have something to do, which would also involve getting the document system working.
Obviously I had waaay too lofty of goals at the start of this, but I always plan with the idea that most of the later ideas won't make the final cut.
- Ted
Distributed Destruction of System
Swarm the system!
More posts
- Multiplayer Share Link18 hours ago
- Game Jam End: Retrospective1 day ago
- Week 4: I Have Words4 days ago
- Week 2: Linked Together18 days ago
- Week 1: Strong Start25 days ago
- Week 0: Game Jam Start!32 days ago
