So I'm having some trouble making a game

I’m working on this multiplayer game based on something I used to do with a friend in Battlefront 2.
Here’s the idea

  • One player plays as a slow monster with a ton of health and abilites, but only has one life
  • The other(s) play as soldiers sent to kill the monster, and then can respawn a limited amount of time

I’ve got the movement and team selection working, but I’ve run into a problem,

When someone joins the game, the animation I have the character play depending on what team they’ve selected don’t play on any of the other remote players, but the players that were there when the new player joins can see the animtions on the new player

Here’s the link, help would be appreciated, I still haven’t figured all the multiplayer stuff out yet, thanks in advance.

The other problem I had has been solved

1 Like

I’m not exactly sure how the logic of your game works, but for your second problem about limiting the horror team to one I have some suggestions. You could have a number, or even a variable, that counts the number of players on the horror team. If the number is 0, then you can allow someone to join. Once the number is 1, don’t allow people to join.

1 Like

I tried doing something like that but when I try sharing the number so everyone gets it, it wouldn’t show up for the other players. I was probably just doing it wrong

1 Like

I just have one question, sorry for going off topic cause I literally don’t know much about Multiplayer physics, but @GrimProductionZ might be able to help you. But how did you make the shadow for your game, to looks so cool and I was needing something similar to that for my game.

Like I said, i’m terribly sorry for taking this off topic and asking you questions when you are the one needing help.

2 Likes

thats what the shared value thing is for im typing this during online school btw so I have to do this fast

1 Like

it shares value like if you play the run animation put a value into shared and make it if the shared value goes into the right filter it plays the run animation

1 Like

Oh no problem, I’m actually really proud of the shadows thing. Basically, every area where there are shadows is covered by an object. Then you have to send the player’s x and y position to the shadow (if you’re doing multiplayer you have to use the player check behavior to only allow the local posistion). Once you’ve done that, you’re going to need 2 behavior bundles that I think JR made, one that calculates the angles to a posistion, and the other that calculates the distance between 2 posisitions, you can find both of those in my Shadow object in my game under the names of AngleTo and Distance Between (note I didn’t make either, it’s a bunch of math that I don’t understand). You use the players position that you sent to the shadow and the angle to the players postion to point a raycast right at the player, make sure you tick the “stop at first object” box. Once you’re done that, set the shadows alpha to 0 if it’s close enough to the player, using a proximity check, and after that if the raycast hits. Then you also want to set the alpha back to 100 if the raycast misses, or if it’s too far away. Last step is to set the 0 that you used earlier to the distance from the player calculate earlier, divided by a number between 1.1 and like 3 or something (this determins how dark the area around the player is)

That’s about it, my explanation might not be the best and I had to omit a bunch of other little things. All I can really say is to just look at the Shadow object in my game and try and figure it out with this explanation :sweat_smile:

damn this really is a text wall

2 Likes

And yeah I know, I am sharing the value. I think I just wasn’t doing it right

1 Like

ahh (must be 20 characters)

1 Like

@Agent_Y okay, thanks. I will try my best to implement my own design into my game.

2 Likes

So i heard you need some help with multiplayer ehh.

Indeed I do, here’s my problem:
There are 2 teams in my game, the player doesn’t change with each team, it’s just going to play a different set of animations, I have both idle animations set up, and they work, mostly. I’m using the save behavior to save the team chosen by the player in the main menu, and then reading that number and playing the animation accordingly. The problem I have seems to come from the fact that I’m spawning the player from a spawnpoint object, because I wasn’t using that before and it was working (but not using a spawnpoint also made the objects attached to the player not show up for other people). So now basically when someone joins the game, they don’t see the animations anyone else is playing, but everyone else sees the animations they’re playing.

1 Like

His could very well be a bug maybe cause @grazer could have not included animations in multiplayer, he did say it is still in the works. As I said this could be the problem but likely it may not

Ok imma check it out. This also could have something to do with the animation behavior set or the settings of the player

I also might need you to play it with me to see the problem. Then ill look into the behaviors.

Ok i actually found the problem maybe. I believe its dew to a bug from you marketing the Spawner a player object, try changing this to no multiplayer and see if it works ok.

Alright, I’ll try it.

Doesn’t seem to spawn at all anymore now, I used the respawner from the grazer’s game apocalypse arena. Without making it a player object I can’t spawn players at all for some reason


Animatons work fine in multiplayer, as you can see by the blue and red players, but the screen on the right joined after the one on the left and he can’t see the right players animations. I have no idea why this is happening

I made a multiplayer example and the spawner works without being a player sprite so I don’t know i might have to look at mine some more

Umm, then i don’t know. Ok then ill look into it some more.