The Daily Click ::. Forums ::. Klik Coding Help ::. Advice for optimizing performance
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
3rd July, 2012 at 03/07/2012 08:10:20 -

I've got some pretty large backgrounds in my game, 728x100 is one of the larger ones - it's made up of just two colours and have some transparents sections to it. I hear that if I was to chop this background up into smaller sections I might get some better performance for the game. (Which is important to me if I actually get around to releasing this on iOS).

Another problem is that the background is an active object. I've not used MMF2 for years so I'm a little rusty with it. Should I be using an active object of that size for a background object? I made it Active because I wanted parallax scrolling, but can I use regular backdrops for that? Also what is an "Active Backdrop Object"? (I think that was it's name).

Sorry for all my questions.

 
Image

Tell 'em Babs is 'ere...

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
3rd July, 2012 at 03/07/2012 09:46:21 -

For the parallaxing, you can do that with layers. You can set different layers to scroll at different speeds.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
4th July, 2012 at 04/07/2012 11:30:15 -

Ah right, so my parallax scrolling works by moving the layers, meaning it doesn't matter if they are backdrops?

 
Image

Tell 'em Babs is 'ere...

Avantar1975



Registered
  01/12/2011
Points
  39
4th July, 2012 at 04/07/2012 13:54:53 -

I hope I understand the question correctly...

For me, parallax scroling is about depth and speed. Each layer that you create have an x and y coefficiant for scrolling up and down or sideways. 1 is preferred for the "main frame" (normal speed - lower than 1 is slower) and going lower for the backgrounds. Having backdrops in a background layer still gives the effect of depth, but I am not sure that you will be able to move those - having some kind of actives in the different layers is what gives parralaxing such a cool effect.

So basically, for a space game, I will have a background object with some static planets and stars in the back. One layer up, I will have some active object stars that scroll and maybe some asteroids or whatever and my main frame will have my spaceship.

Here is an old tutorial:
http://www.docstoc.com/docs/2143610/Scrolling-Tutorial

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
4th July, 2012 at 04/07/2012 14:01:50 -


Originally Posted by -Liam-
Ah right, so my parallax scrolling works by moving the layers, meaning it doesn't matter if they are backdrops?



Correct. But i have no idea if using layers is more efficient. Every additional layer adds more overhead. Maybe someone with experience with layers could say how layers effect efficiency on different platforms.

 
n/a

Avantar1975



Registered
  01/12/2011
Points
  39
4th July, 2012 at 04/07/2012 14:07:15 -

Just an update...

Yes..the background objects do scroll - just adjust your virtual size to your play area and your window size smaller than that. Just tested it and read the tut. myself again..lol It has been a while...

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
12th July, 2012 at 12/07/2012 16:30:40 -

Thanks guys.

 
Image

Tell 'em Babs is 'ere...

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
18th July, 2012 at 18/07/2012 22:48:12 -

I have tried both methods, my current development is running around 12-15 layers all with parralax with no noticeable effect to memory usage so i would say go wild with layers. Plus these layers are holding loads of different actives and stuff so i think they are the way to go with this.

Plus its much easier to manager and change.

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
19th July, 2012 at 19/07/2012 12:27:01 -

Thanks Windybeard, it's nice to know I don't have to worry so much for PC exports! Do you happen to know what the effect of that might be on an iPhone? I imagine the iPhone struggling to run something like that, though I could be wrong..

 
Image

Tell 'em Babs is 'ere...

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
20th July, 2012 at 20/07/2012 03:07:17 -

Sorry mate, no idea on the i phone. I would go easy though as a rule if making for portable.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click