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

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  12/6/2008
Points
  338

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
3rd July, 2012 at 7/3/2012 8:10:20 AM -

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...

The Cecilizer

You Done Got Cecilized

Registered
  3/19/2005
Points
  1602

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!Computer
3rd July, 2012 at 7/3/2012 9:46:21 AM -

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

 
Image

>> http://www.cecilectomy.com <<

-Liam-

Cake Addict

Registered
  12/6/2008
Points
  338

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

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
  12/1/2011
Points
  29
4th July, 2012 at 7/4/2012 1:54:53 PM -

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

The Cecilizer

You Done Got Cecilized

Registered
  3/19/2005
Points
  1602

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!Computer
4th July, 2012 at 7/4/2012 2:01:50 PM -


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.

 
Image

>> http://www.cecilectomy.com <<

Avantar1975



Registered
  12/1/2011
Points
  29
4th July, 2012 at 7/4/2012 2:07:15 PM -

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
  12/6/2008
Points
  338

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

Thanks guys.

 
Image

Tell 'em Babs is 'ere...

Windybeard Games



Registered
  4/14/2005
Points
  101

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

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.

 
SWEEZY GUNNER! Coming soon.
http://www.create-games.com/project.asp?id=2205

https://www.facebook.com/SweezyGunner

-Liam-

Cake Addict

Registered
  12/6/2008
Points
  338

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

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
  4/14/2005
Points
  101

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

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

 
SWEEZY GUNNER! Coming soon.
http://www.create-games.com/project.asp?id=2205

https://www.facebook.com/SweezyGunner
   

Post Reply



 



Advertisement

Worth A Click