pingpoli.de



GameDev 2019 Week 27: Multiplayer Lobby

Effects, Multiplayer Lobby, Moon Landing

22.07.2019 - 14:15
Monday 15.07

When I added items that can add effects to buildings a few weeks ago, there was no good way to save the effect blueprint for the effect from the building. At that point every tower blueprint stored the effect blueprints it had natively, but because tower blueprints are for all players and only one player may have an item that adds a new effect I couldn't just add an effect blueprint to the tower blueprint. That's why I reworked the effect system today and added an effect manager that stores all effect blueprints and the tower blueprints only have references to them. So when an item adds a new effect blueprint, it can be saved in the effect manager and added only the buildings of the player, that picked up the item.

Tuesday 16.07

Using the updated effect system from yesterday I fixed the items that added effects. I also added a proper effect for the target limitations, which simplifies the code a lot, because there is no longer the need for special cases everywhere the effects of a building need to be listed. In addition to that I created a new function for effect descriptions that is used everywhere, so there are no more multiple slightly different functions for the same thing. I also fixed the aura sources so they conform with the other effect types. And finally, I added effects to the web tool, and then I tried to continue to develop the web tool on linux and it doesn't work, because apparently the php sqlite package does not exists anymore, and all solutions on google just say to apt-get install the package, which doesn't exist... I really don't want to change it back to mysql again...

Wednesday 17.07

Today I started on the multiplayer lobby, which is quite a bit more complicated than the singleplayer lobby. In singleplayer there are only a few options for the game, like map selection and difficulty. In multiplayer however, there need to be a lot more things. First of all there has to be a list of all players in the lobby and some information about them. Then there should be some kind of chat and the game options also have to be there, but only changable by the host. I started by greyboxing all the different ui elements that should be there to get to a decent layout. Then I added some functionality to it. The chat was fairly easy, because there is already a chat in the game, so I only had to check whether the game is currently in the lobby state and if it is, add the messages to the lobby chat. The game options were a little bit more complicated, because I had broadcast the selections back to all clients. Finally, I added a start game button for the host, so multiplayer games can now be started from the client, instead of having to type a command in the dedicated server.

Thursday 18.07

Continuing with the multiplayer lobby, I worked on the player ready functionality. It turned out to be very complicated, because the clients don't really have a proper game slot to client ID lookup, so the ready state of players already in the lobby that are ready isn't synced to newly connected clients. However, it does work on the server side and the game can only start when all players are ready. This will definitly need more work, but I haven't thought of a good solution yet.

Saturday 20.07

Seeing all the content for the 50th anniversary of the moon landing inspired me to try to make a moon scene. ( Also nothing else this week produced any good looking images for the blogpost :D ). So I made 3 different moon rock / moon surface texture tiles and created an american flag and a lunar lander in Blender. I added them to the map editor and it can produce a decent looking moon scene:






by Christian - 22.07.2019 - 14:15


Comments

Social Media:  © pingpoli.de 2020 All rights reservedCookiesImpressum generated in 11 ms