Saturday, June 27, 2020

RPG: Multiplayer Items & Effects

Items and effects are now communicating over the network!


The server or the client can pickup or drop an item and that change is reflected across the network. Anything on the ground is managed by the server. Anything held by a player is managed by that game's client.

Next I command the lower right game client to pick up the sword and the upper left game server to pickup the healing potion.

Changes reflect on both games! Lots of cleanup to do in the code, but it's working great.


Effects are not purely visual (drawing of flames on the ground), they also include abilities such as healing or damaging.

Screenshot of the client putting down a flame wall...

I let my server player get injured...

Then my client player heals him...

A visual effect is drawn on the player receiving the heal on both games and the target player's health increases.