Jump to content

Approach for a tennis game?


Darkiel
 Share

Recommended Posts

Hello there, I'm new around here and also newbie using Phaser. I have only coded turn-based games and I recently learnt how to make classic 2D platform games with Phaser (which is incredibly easier than I thought).

I'm interested on develop a tennis game. Watching some old NES tennis game, every tennis game use a vertical camera with some perspective which makes appear the closer half of the court bigger than the other one, does anyone knows how to approach that kind of camera/perspective?

Thank you!

Link to comment
Share on other sites

This is actually pretty easy to do. You can either create all your assets with that perspective in mind.. Or, you could skew your entire container. 

So as a state extends a group (formally a container), then you have access to a method called updateTransform. You can override this and warp the entire container, than thus every child of it. There have been a few discussions on this before, though I haven't seen any working code yet. 

 

Link to comment
Share on other sites

I remember someone once posted a great old-school racing game that mucked with transforms on containers, although in that case it was with DOM and a transform on the main container, which then also transformed all child elements using the same projection change, I'd imagine this is very similar conceptually to megmuts solution but with DOM rather than canvas elements.

Link to comment
Share on other sites

2 hours ago, mattstyles said:

I remember someone once posted a great old-school racing game that mucked with transforms on containers, although in that case it was with DOM and a transform on the main container, which then also transformed all child elements using the same projection change

http://codeincomplete.com/posts/javascript-racer/ ?
http://www.extentofthejam.com/pseudo/

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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