Darkiel Posted March 20, 2017 Share Posted March 20, 2017 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 More sharing options...
megmut Posted March 20, 2017 Share Posted March 20, 2017 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. Tilde 1 Link to comment Share on other sites More sharing options...
mattstyles Posted March 20, 2017 Share Posted March 20, 2017 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 More sharing options...
Milton Posted March 20, 2017 Share Posted March 20, 2017 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/ scheffgames 1 Link to comment Share on other sites More sharing options...
scheffgames Posted March 21, 2017 Share Posted March 21, 2017 9 hours ago, Milton said: http://codeincomplete.com/posts/javascript-racer/ ?http://www.extentofthejam.com/pseudo/ That's very interesting, thanks for the links. Link to comment Share on other sites More sharing options...
Recommended Posts