Jump to content

Is Phaser the right engine for me?


paquiquinho
 Share

Recommended Posts

Hey everyone,

I've been lurking around this forums for a while now, getting all kinds of helpful tips for using Phaser and whatnot. However, I am now quite stumped, which lead me to finally making an account to ask for your help!

 

Here's the deal:

I'm working on a very simple top down shooter (wasd to move, shoot with mouse) at the moment and since my target platform is the web, I went with Phaser. While I'm a decent coder and have worked with the likes of Unity or Game Maker before, I'd never coded a game with the web in mind. 

The thing is, the way I envisioned this working is you get a fixed sprite (with walk animation) as your player object and you rotate it to face the mouse so you can shoot in that direction. This is where my experience with Phaser started falling apart. I started with arcade physics, which I quickly found out wouldn't work properly since rotation is not an option there. So I changed to P2 and that's where all hell broke loose. You see, I can't make my player shoot at the pointer for the life of me! This should be fairly trivial and I had it implemented in a prototype I made with Game Maker so I don't think I should be wasting all this time with this. Which then leads us to the title: Is Phaser the right engine for me? I don't really need physics (I just need to move to the sides a fixed amount every time a key is held down plus the shooting) so P2 is super overkill I think at this stage. What would the more experienced of you out there recommend? 

-Stick to Phaser's P2, even though it's a lot more than what I really need?

-Change engine? If so, to what?

-Am I just looking at my problem wrong?

 

 

Link to comment
Share on other sites

12 minutes ago, rgk said:

Just so you know rotation works with arcade physics. https://phaser.io/examples/v2/sprites/sprite-rotation

The problem with this is that it doesn't rotate the hitbox as far as I can tell. So if I have a rectangular sprite, when I rotate it, it messes up hit detection. I was designing around this at first by only having square sprites but that's a compromise that I just can't make.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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