[🔥 Hot Topic] How do I build Singleplayer & Multiplayer Games?

Ask questions and share resources on this topic here!

Visit Build [SP] and [MP] logic in the Creator Portal for a quick overview of communication with Game Maker’s logic systems. Learn how Behaviors and Components applied to objects communicate with Objectives, Game Rules, and Player settings to make singleplayer and multiplayer games.

7 Likes

Question:
In GM 0.10.6, Multiplayer Games, we have that Rules sends messages and communicates with SP Logical Elements?
I did some tests and I only managed to have Rules send messages to MP, but not to SP.

Thank you

Flowchart:

Video Gameplay:
04263-ezgif.com-optimize

3 Likes

I’m wondering if it isn’t working for you due to a bug with VFX. It should work.

I successfully triggered SP and MP speaker component text with keypress rules just now, so it’s not a universal blocker.

Tested again to rule out the new Send Message rule. It worked fine, too.

Tested again to trigger a message from a SP message broadcaster to a Send Message rule to a SP and MP VFX and it worked! Not sure why this is different from your result given the same setup.

4 Likes

Oh, Its not related to VFX, others Logic Elements as well.

I can bring other examples for multiplayer game:

I want to create a simple SHOP so that players can spawn (only if the value is greater than 10) an asset based on their local variable and that the asset appears only for them.

The logic below works in Single Player Game, but not in Multiplayer Game. I’m wondering what I need to fix to make it work when switching to multiplayer.

FlowChart

Gameplay (Single Player and Multiplayer)
04264-ezgif.com-video-to-gif-converter

3 Likes

I might be wrong but this was the case even before 0.10. Local Variables doesn’t seem to interact with SP Behaviours/components but even with using MP B/C the local variables still works as it should and only affects the data of the player who is triggering the message. I haven’t explored 0.10 as much but I’m wondering if this is the issue you’re having.

3 Likes

Yes, it’s something along those lines, VieVoxx.
For Multplayer Games, it seems Local Variables can receive messages from SP B/C, but don’t send messages to SP B/C.

3 Likes

GM GM,

I was wondering if there is a way in a MP XP to use Rules to condition the spawn of a asset but only for 1 people, for a shop for example :thinking: , like that:

  • Player talk to an NPC (MP Asker) => send message to rules to check money
  • Rules check money = OK => message to Spawner asset on the land… but everyone can see this asset and “steal” it…

Regards,
MisterSeb

2 Likes

Basically, it depends on how much logic resource you want to create.
Technically, you can assign variables to the Players and “force collect” only for the correct player based in their variable, but it’s an overly complicated logic to solve a simple need. I would recommend waiting a bit to see if TSB brings a more refined and final solution for the SP and MP related to Rules.

If you want to dive deeper, so, the latest CyberDragon live stream brought some of this methodology. :point_down:
In this case, he identifies each player by ID in the experience and manages the responses from these IDs as variables.

In previous AMA Devs live streams, PO GamePlay Alma Alnoir said that a more robust matchmaking system would be presented in the future within the GameMaker architecture.

So now it’s up to you. :sweat_smile:

2 Likes