Altarspawn Alpha 0.0.1 - Logan Bodenhamer - Devlog 1


I was responsible for the multiplayer code in this project. The first system I implemented was server hosting. Altarspawn uses the Advanced Sessions plugin to allow games to be hosted through steam. For testing purposes, I implemented a simple server hosting and joining system with only two buttons. The host button opens up a server to steam with the player count set to 5. The Join button searches for the first server available and then joins it. This works currently because there is only ever one game open for testing, but for future builds we will need to have a more sophisticated system.

Next, I worked on the Monster and Hider roles for the player. When the game is started, the player chosen to be the monster has their model changed to set them apart. The range in which they are able to see other players is also limited when the round starts. This was accomplished by changing the opacity of the other players depending on how close they are to the monster. The ability to change the opacity of a character is also used to make the dead players transparent to themselves and other dead players and invisible to the living players.

Once Ryan had finished prototyping the artifact system, I modified his code to work in multiplayer. I was then able to extend the core principles from the artifact system to create the generator and keys. Each of these systems detects when the player overlaps the object on the server side to make sure no client can be hacked to falsely tell the server that they have collected anything. This triggers a boolean on the player stating whether or not they are holding any of these objects. These booleans are used to test certain conditions later in the gameplay, such as whether a player is able to unlock a box or not. The players also store references to the object they touched to collect the item. When collected, the items are made invisible and their overlap detection logic is disabled instead of deleting the actor. This allows certain objects to be re-enabled if the player is killed by the monster while holding them so the game is always able to be finished.

There is one major bug left in the game that I have not been able to find a fix for yet. When the monster is chosen to be one of the clients instead of the host for the game, they are not made into the monster at the start of the round. In initially thought this was due to forgetting to make the event that switches the player blueprint into monster mode replicated, but applying that fix did not resolve the issue. For now, only the host is able to play as the monster, but I will continue to work toward a solution in future revisions.


Player Blueprint: https://blueprintue.com/blueprint/msejb_k4/

Artifact Blueprint: https://blueprintue.com/blueprint/1ukx4gw0/

Host/Join Widget Blueprint:

Files

Altarspawn_Alpha0.0.1.zip 477 MB
Sep 19, 2023

Get Altarspawn

Leave a comment

Log in with itch.io to leave a comment.