Search the Community
Showing results for tags 'admit hit'.
-
Hello, I cant find any good solution how admit hit between two players in nodejs (with socketio) with phaser. There is some solution, with problems. 1. Player A create bullet and send to server X,Y,rotation (speed will be constant), server send create event to other clients and create ghost bullet. When will hit this bullet to same player, player get damage (its local event, because bullet is created in his game, and collision detect call damage to player) This solution is very good, but there is very big problem. When target player minimalize game, or switch tab, socketio, and mainly javascript thread will be paused and this player/client cant admin, get hit, becuase. Server send create bullet event, but this client is "paused" and not create bullet and not get hit. How I can solve this ? Because, it will be easy cheat for god mode. 2. Hit solve on attacker side (player who will fire), just when his bullet hit someone, it send to everybody. I hit player XXX, and every client will recieve this hit and localy get this ghost player/dummy damage, after will be zero, just destroy/hide it. This solution will not be depenes on paused javascript thread. This solution is hard to create and mainly, create some cheat will be very easy (just send concrete socket with target player) So I want to use first solution, but how I can avoid puase to main thread (also in mobile phone, user just close browser, but game will run on background - yes I can use some kind of hearbeat and kick this user) But when player just switch to messenger reply friends, go back to game, and will be kicked ? Thanks for every good solution
- 4 replies
-
- multiplayer
- admit hit
-
(and 2 more)
Tagged with: