4ucai Posted September 16, 2013 Share Posted September 16, 2013 Hi guys, I'm a newb here. I was following 0.9.5 and made some prototype. I noticed there's no more from previous 1.0 and shown in it's test and now in 1.0.1game.add.camera The latest examples use only game.camera(tilemaps). I also took a look at the Camera.js core and there's no hide method(hiding sprites/objects from the camera/ like hideFromCamera in 0.9.5) and showBorder. Is it now included anymore, or I just need to wrap the camera somehow and draw a rectangle around it? Thanks, and I'm really not much in a hurry and looking forward to more examples/demos =). Congratulations on the 1.0 release btw. Link to comment Share on other sites More sharing options...
rich Posted September 16, 2013 Share Posted September 16, 2013 Sorry but I had to drop multiple camera support. It was a choice between either using Pixi for the rendering, thus getting WebGL support and lots of other cool things, or having Canvas only and keeping multiple cameras. As I hadn't seen anyone make a game using them I figured it would be safer to drop them and gain all the benefits of Pixi instead. To be honest I'm glad I did But it does mean all of those camera commands are gone for now. Link to comment Share on other sites More sharing options...
4ucai Posted September 16, 2013 Author Share Posted September 16, 2013 Hi rich, I understand and fully support your decision, I was making a minimap feature for the game with fog of war(much like the classic rts games eg. starcraft).Although, I was using around 3 camera's to get the desired effect. I still have a couple of ideas on how to implement it with the current version, and I'm currently strolling around the library and familiarizing myself. Any ideas that might come in handy? Btw, am I right that there is just 1 camera for the game now which is game.cameraand you can't create another instance of cameras? Appreciate the reply =) Link to comment Share on other sites More sharing options...
rich Posted September 16, 2013 Share Posted September 16, 2013 There is just 1 camera, which is actually a property of the World object, but I put in game.camera as a handy proxy for it to save on code length. You can create new cameras and swap world.camera for them but really there's no point right now. I have set-up the camera class so that it can drop into a multi camera system once there is a clean way of dealing with that in Pixi, but it's not a trivial thing to add. For a minimap I personally would use a RenderTexture and draw to that. Link to comment Share on other sites More sharing options...
4ucai Posted September 16, 2013 Author Share Posted September 16, 2013 Thanks rich, I'll take a look at it Link to comment Share on other sites More sharing options...
4ucai Posted September 16, 2013 Author Share Posted September 16, 2013 Hi rich, I looked at RenderTexture class, I think there's a typo at line 12 indetityMatrix. https://github.com/photonstorm/phaser/blob/master/src/gameobjects/RenderTexture.js Link to comment Share on other sites More sharing options...
rich Posted September 16, 2013 Share Posted September 16, 2013 There is but I can't fix it, because that's the property name that Pixi uses Link to comment Share on other sites More sharing options...
zuker Posted November 12, 2013 Share Posted November 12, 2013 Rich, could you please name me exactly release when multiple camera support have been dropped?I need nearly six cameras in my game and, it seems, Phaser is only JS engine that has (have had) multiple cameras, so I want to use latest release with multiple cameras. Link to comment Share on other sites More sharing options...
Mike Posted November 12, 2013 Share Posted November 12, 2013 If I remember correct and with fast check in github: 0.9.7 https://github.com/photonstorm/phaser/tree/0.9.7 In 1.0 Pixi was added and TS dropped. Link to comment Share on other sites More sharing options...
rich Posted November 12, 2013 Share Posted November 12, 2013 Yeah 0.97 is probably the best version to use for this. Or even the "original" 0.95 release. You may want to look at Kiwi.js (http://www.kiwijs.org/) as I *think* they support multiple cameras. At least it did when I last worked on it, and the API docs see to indicate it still does. Link to comment Share on other sites More sharing options...
zuker Posted November 13, 2013 Share Posted November 13, 2013 Thanks guys! Link to comment Share on other sites More sharing options...
Recommended Posts