Jump to content

Fast-paces shooter game's physics engine


ThaFog
 Share

Recommended Posts

Hi everyone! It's my first post on this forum, but I'm for a longer time just reding posts. Ok, finally I have to ask a few questions by myself.

 

If tl;dr, read just numbered questions (or one of them though)

 

Actually I'm creating a fast-paced 2d shooter (side-scrolled, like soldat - if You don't know this game, take a look at video in the end of post) and finally got few problems. Game is using PIXI.js and uhm.. Was using p2.js, but that library has been superseded by PhysicsJS. Now I still have few problems, that is:

 

1. I still wonder if PhysicsJS is a good physics library for fast-paced shooter and I'm still thinking about return p2.js or use another better engine. I have read and checked few other libraries (like matterjs - box2d and similar aren't an option because of not plain javascript code). Is there any better option?

 

2. I have a problem with shooting. I really don't know how to do this. Or maybe otherwise - I have done it, but not the way I want. In p2.js everything is excellent except shooting - If bullets were too fast, collision detection event didn't notice collision beetwen bullet and other stuff. That's a major reason why I changed library to PhysicsJS. Now there is a problem with gravity and shooting. If Bullets are fast, they appear on screen in groups of 4 bullets separated by few pixels. Otherwise they are landing on ground very quickly. How can I do better shooting ? Maybe just in PIXi.js with own collision detection (just for bullets) function ?

 

3. This game will be a multiplayer. Is PhysicsJS or p2.js a good library to run on node.js? And will sharing few servers (game rooms) on one node.js server (for ex. 4-5 servers for 20 players one) be a good option looking at performance and cpu?

 

Thanks a lot for reply :) !

 

As I said at beggining, I'm giving soldat gameplay:

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...