Help with multiplayer pvp
NoobDev
Member, PRO Posts: 42
Anyone familiar with a tutorial of how to code this? Its not live pvp, meaning the defending player will not be involved in the battle, just his character. The player will click on an enemy to fight and the battle will commence. It will be real time with 2d character sprites. Where i'm confused is how to express the damage with each others stats. like "player 1's attack-player 2's defense = damage".
also i'm new to game salad so don't be mean with your answers. thanks
Answers
Simple math will calculate the damage. If the player has a defense value of 25 and the enemy's attack is 10 then 25-10=15. Are you doing this across a server or all on a device? This is going to require quite a bit of advanced knowlege to code out a game like this. A large challenge for a beginner.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
It will be on a server. I just need a nudge in the right direction. & game salad is pretty straight forward. I just need to know if I can code it normally in an expression, like what i mentioned above & just designate in the scene that left combatant = "playersID" and right combatant is "enemyplayersID" or Does it have to be done via some network option since it will be an online game?
Well multiplayer data is tables based so you would need to pull the data from each players table and then write the results back and on end of turn the table is updated on the server and then the other player's device is updated with the new data. I know how to do all this with plays together but not the standard server option. You'll also need to build a login system and a game lobby where players join a match.
I have a complete series ready when Gamesalad releases their plays together multiplayer. I have a full working MP using those tools.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
see this video from GS on the basic Network Get and Network Send.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Looking forward to this!