The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Paralex Scrolling Using Active Pictures
 

Post Reply  Post Oekaki 
 

Posted By Message

Søren Jensen



Registered
  10/11/2010
Points
  20
27th November, 2010 at 20:14:31 -

Hi. im trying to do paralex with active pictures, it runs smoothly without lag, but im using create and destroy and i got 3 layers moving dif speed, but i have problems with Layer Order, and gaps between the pictures.

Anyone ever done anything like this? Oh and i cant use the background system box method since all my sfx, gfx and mus has to be external.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
27th November, 2010 at 20:27:39 -

I use the active object method too with external objects. I have the active picture objects layer's sorted manually in the frame editor. I don't create and destroy anything, but If you want to use that the newer objects will always go to the very front of the object order. So create the bottom layer first.

 
.

Søren Jensen



Registered
  10/11/2010
Points
  20
28th November, 2010 at 17:35:34 -

what i have is 1024 wide playfield.
and everytime a 1024x32 image is leftmost of frame it will create a new one to follow up
and when th image is -1024 of leftmost of frame it will be destroyed
however MMF2 Dev create gaps between the images. it runs at upto 61 fps so it aint a graphical lag issue
do you have an example where i can place some images at start of game and reuse them?

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
28th November, 2010 at 18:47:40 -

http://andyuk.tengudev.com/Sources/Parallax_example.zip

Ok here is a way to avoid having to create new objects. All you will need to do differently is create images with a horizontal size of 1024 and it will work with your frame size.

 
.

Jenswa

Possibly Insane

Registered
  26/08/2002
Points
  2723
28th December, 2010 at 20:11:39 -

Can't you fix the gap by rewriting the code a little bit? (assuming it's the code and not mmf creating the gap)

If it's not mmf, then it's not a timing issue, but a position issue of some or several pixels. Perhaps you can try to create the new object relative to the object that is being destroyed? And then of course some pixels behind or ahead of that object. This should make mmf use the right coordinates from the destroyed object so your new object should be placed at the right spot without a gap.

Oh and instead of destroying and creating: can't you use one or two objects more and set their positions behind the previous one instead of creating a new one there? This might add two or three objects per scrolling object, but skips destroying an creating and keeps the right order of screen appearance.


 
Image jenswa.neocities.org
   

Post Reply



 



Advertisement

Worth A Click