Jump to content

Is it possible to do a game like this with Phaser?


toto88x
 Share

Recommended Posts

Seems possible to me too, you just have to simulate parallax behaviour on each sprite in the game.

 

For example, sprites on the bottom scroll faster that the player, who is at the center of the screen.

 

Also, you have to scale your sprites along the y value, taking the center of the camera a reference for scale = (1,1). 

 

I haven't tested it but this seems like the general behaviour I can think of seeing your gif.

 

 

About inputs and collisions, if you scale the bodies with the graphics, I don't see either why it shouldn't work, but I may be overlooking something here.

Link to comment
Share on other sites

The point Rich is making is that this would require a fair bit of modification to how Phaser works 'out of the box'. For instance, 2D collision would no longer be relevant if the sprites could go behind and in front of one another - you'd need to modify how that worked significantly so it had discreet 'planes' of collision (like Golden Axe, Streets of Rage etc) or even some kind of 3D collision in the case that objects had different 'depths'.

Link to comment
Share on other sites

I see your point, but still think it can be done by a good management of the bodies and shapes ( having a solid shape just for the feet for example, and a sensor for the rest of the body ) 

 

Now the best way to be sure would be to test it, but as Rich said it would take a lot of time, and I don't have it :)

Link to comment
Share on other sites

Actually that's a good point, I'd not really thought about collision working like that. I guess if you don't ever stand on top of objects, you can get away with just a flattened rectangle at their feet to represent the space they take up on the floor. 

Link to comment
Share on other sites

The problem with physics isn't so much the collision, it's the separation. Because unlike with a 2D view you'd want to rebound the player into, or out of, the screen - so his y coordinate may barely change at all but it's the scale that would need to adjust. And there's no way the physics system is spatially aware to handle that :)

 

Like I said, a lot of custom code needed. Probably too much imho.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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