Jump to content

How to do hitboxes?


Emesis
 Share

Recommended Posts

We are building a multiplayer top-down shooter deathmatch app. My team's idea is to upload all hits at a given time as x,y coordinates to an array (which is then passed to the server) and then check on each update loop to see if any enemy players were at those same coordinates.

We were considering doing the traditional way (with collisions) but we're concerned about latency issues. Any insight about how to handle this? Any resources?

Link to comment
Share on other sites

  • 4 weeks later...

In my game I use client side phaser to load the location of all the players and if one player shoots and the bullet sprite overlaps with a player (client side) I send that info back to the server and distribute it that way. Prob not the most secure or fastest way to do it, but it works for the minimal pvp i have on my game. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...