Posted By
|
Message
|
Zephni My other cars a Balrog
Registered 17/10/2007
Points 4019
|
28th October, 2012 at 28/10/2012 16:51:06 -
I currently have it set up so it loads up about 36 different active picture objects (from external files) next to each other on the X and Y so they "wrap", but this seems crazy and isn't exactly "infinite" or efficient. Is there a way I could wrap the paralax backgrounds infinitely without just creating loads of them.
Bearing in mind that I'm pretty sure the layer "wrap" functions won't work because they consider the entire play area and my background objects aren't that massive.
Maybe Im missing something obvious..
Thanks for any replies!
Edited by Zephni
dont make me divide by zero...
|
Pan-tosser
Registered 24/10/2008
Points 520
|
28th October, 2012 at 28/10/2012 21:53:43 -
maybe you could wrap the position of the viewable screen instead of the objects.
I'm not sure if thats what you want, but it was just a thought.
https://www.facebook.com/nathon.brown.7
|
Zephni My other cars a Balrog
Registered 17/10/2007
Points 4019
|
29th October, 2012 at 29/10/2012 07:36:13 -
Thanks for your reply, what would you say the best way of doing that is?
dont make me divide by zero...
|
Zephni My other cars a Balrog
Registered 17/10/2007
Points 4019
|
29th October, 2012 at 29/10/2012 07:36:18 -
Thanks for your reply, what would you say the best way of doing that is?
dont make me divide by zero...
|
Alonso Martin
Registered 29/12/2010
Points 294
|
29th October, 2012 at 29/10/2012 13:58:26 -
I use an old method with the background system object, but it won't be infinite. There's a background images object that you can use, though. You can scroll an image's x/y, so you could do this 'infinitely'. Another method, though probably slower, would be to do the same with the surface object: blit from all your parallax layer images and blit them onto one single surface image at x/y (wherever they're supposed to be). If you really have a bunch of parallax layers, then this might be a better solution. Layers in MMF aren't exactly efficient.
www.hfalicia.com
www.alonsomartin.mx
|
Pan-tosser
Registered 24/10/2008
Points 520
|
29th October, 2012 at 29/10/2012 14:36:27 -
That sounds like it could work. If you weren't useing mmf. You would blit the portions of the background that got clipped by the screen. To the the other side.
I guess the surface object might be the only good way to clip images. They have that viewport object also. But its focus is resizing and flipping.
MMf is in need of more controll over backdrops. That way all the active objects could be used purely for sprites.
But if you get something working. I'd diffently be interested in hearing about it.
https://www.facebook.com/nathon.brown.7
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
29th October, 2012 at 29/10/2012 22:11:25 -
This is something I've been working on, but it's not finished yet, and the wrapping feature is a really quick hack (just for you), so it currently breaks the collision detection/movement: https://skydrive.live.com/redir?resid=B1E7EE094271BBDA!549
I don't have time to make it work now, and probably won't for the next few days (got a lot on at the moment). It only has one layer of tiles, but it should be quite trivial to add a second for parallax scrolling.
n/a
|
Pan-tosser
Registered 24/10/2008
Points 520
|
29th October, 2012 at 29/10/2012 22:42:27 -
I like how the space bar turns it off and on.
what would we all do without the for each object. I tried a couple other objects. like the fixed value list object.
but i always end up going back to the for each.
https://www.facebook.com/nathon.brown.7
|
Zephni My other cars a Balrog
Registered 17/10/2007
Points 4019
|
30th October, 2012 at 30/10/2012 07:44:06 -
Thats awesome Sketchy thanks for that. Gotta go to work this morning but I will try and implement something like this when I get back.
dont make me divide by zero...
|
|
|