Change Scene Sized based on Screen Height/Width
TheGabfather
Member Posts: 633
I was trying this out earlier today, but it wasn't working the way I wanted it to. I'll be back home later to try it out again but while I'm out, I figure I'd ask around the forums
I have a default scene size of 2048 x 2048
and a movable Actor that controls the Camera and moves around freely
I'm trying to make it so that at Scene Start it detects the Screen Size and resizes the Scene size to 1024 x 1024 when you're using Legacy. Unfortunately it wasn't working.
To check, I did 2 Display Texts.
- 1 to display the Scene Width and Scene Height (which shows proper values whenever you change the Screen Size)
- 1 to display the X and Y Coordinates of the moving Actor (which shows that even on Legacy, I can unfortunately still reach X:2048 Y:2048)
I was only using Creator Preview but I reckon results would be the same on the Viewer/Ad Hoc.
Anyone tried resizing their Scenes this way?
Perhaps I'm overlooking something? Possibly, that you can't change the Scene Size once the Scene has started running?
It's a complete game and I'm just adding this new feature into it. I'll try to create a stripped down version later and see if I have an Actor with a bad Rule that's contradicting this one.
I have a default scene size of 2048 x 2048
and a movable Actor that controls the Camera and moves around freely
I'm trying to make it so that at Scene Start it detects the Screen Size and resizes the Scene size to 1024 x 1024 when you're using Legacy. Unfortunately it wasn't working.
To check, I did 2 Display Texts.
- 1 to display the Scene Width and Scene Height (which shows proper values whenever you change the Screen Size)
- 1 to display the X and Y Coordinates of the moving Actor (which shows that even on Legacy, I can unfortunately still reach X:2048 Y:2048)
I was only using Creator Preview but I reckon results would be the same on the Viewer/Ad Hoc.
Anyone tried resizing their Scenes this way?
Perhaps I'm overlooking something? Possibly, that you can't change the Scene Size once the Scene has started running?
It's a complete game and I'm just adding this new feature into it. I'll try to create a stripped down version later and see if I have an Actor with a bad Rule that's contradicting this one.
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Trying to see if it will have an effect on performance/RAM usage. The game is stuck at 27-32fps for an iPhone 4. Of course, it's not just the Scene Size that will change -- destroying Actors that would originally exist in the cutout areas would also happen.
And then some difficulty adjustments so iPhone 5 and Legacy users won't think that high scores are easier to get on either device.
I haven't worked with Camera attributes ever. Will I have to resize Actors if I resort to that? I suppose it's a good chance to get my feet wet with Camera controls tonight.
http://forums.gamesalad.com/discussion/53589/universal-build-tutorial-with-project-file/p1
Darren.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@FryingBaconStudios
I'm not convinced -- the code for this game is already heavily optimised with the least amount of Actors, Rules, and Global Attributes possible. I'm thinking it's the sheer amount of moving Actors and Particles. Limiting the number of Actors in the scene gives a whopping 10-15fps boost and disabling particles another 5-10fps.
Although everything turned on and running on a 4S/5, gives a crisp 58-60fps.
But I'll give it another run through, see if I can improve efficiency by even just a bit. Worst case would be a slight redesign of the game design *shudder*
And I'm pretty sure that's not a technical definition of fps but I get your drift
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS