Double Dragon "the beginning of everything"

alemasper

Member
Hello friends. I have a problem with my game.
I wanted to make an animation of a bike, running through the street.
my idea is to put it between the background panel, and the panel bglayer1.
The order of the panels are as follows:
background
bglayer1
bglayer2
bglayer3
panel
frontpanel
It is possible to do this?
Or it could be from my utility, one of the panels bglayer can run independently of the others. So one of them, add the function bgspeed.
I hope your answers in order to continue my game. thank you very much, a hug and sorry for my English.  :)


Hola amigos .Tengo un problema con mi juego .
yo quisiera poner una animacion de un moto, circulando por la calle.
mi idea es ponerla entre el panel background, y el panel bglayer1.
El orden de los paneles son los siguientes:
background
bglayer1
bglayer2
bglayer3
panel
frontpanel
Es posible hacer esto?
o tambien podria ser de mi utilidad, que uno de los paneles bglayer pueda correr independiente a los otros. o sea que a uno de ellos,  agregarle la funcion bgspeed.
espero sus respuestas para poder continuar con mi juego . muchas gracias , un abrazo y perdon por mi ingles. :)

[attachment deleted by admin]
 
theres this commands works like bglayer

( layer )
layer    data/bgs/1lvl/back2.gif -300 0 0 0 320 0 0 -1 1 1 0 0 0 0 0 3

the -300 means it has a setlayer of -300
the 0 and 320 controls the x / y position the last nr 3 is the speed the layer scrolls...
somewhere in all those last zeros is the water mode and the wave speed and alpha
 
Is your bike animation defined as entity or as bglayer?
If the former, you need to set setlayer to make it appear behind panels. I'm not sure the exact value to put it behind bglayer but one thing for sure, the value must be negative.
 
i think i rebember...
once i was trying to put something behind a bglayer and i was using negative values so high that bglayer started cycling the monitor vertical like it was changing its (y) position
the only thing i manadge to put behind it was the bakground

with the layer comand is very simple i only have to set (z) position
i have a few levels with this...
the way to do it is instead of...
background
bglayer1
bglayer2
bglayer3
panel
frontpanel

use...
background
bglayer1
layer1 (z) -3000
layer2 (z) -2000
(animation/trap/npc)--->  type (.....) setlayer -1500
layer3 (z) -1000
panel
frontpanel
 
 
ok amigos , voy a probar y luego les comento como me funciono . gracias por su colaboracion ;D


ok friends, I'll try and then tell them how I worked. thanks for your help ;D
 
hello again. I tried to put a negative setLayer to animation and I can not put it behind the bglayer only gets behind the panel.
and then try to layer but not if I did well, I did not understand much.
I have it this way and it works fine, I just wish that one of the panels bglayer may face.
be kind enough to show me how I have to?
Thanks for your cooperation




background data/bgs/ddragon1/trainingj/back.gif
panel data/bgs/ddragon1/trainingj/n01.gif 
bglayer        data/bgs/ddragon1/trainingj/1.gif  0.4 5 0 0 0 0 1 1 1 0 0 0 0 0 12
bglayer        data/bgs/ddragon1/trainingj/2.gif  0.3 0 0 0 0 0 1 1 1 0 0 0 0 0 12
bglayer        data/bgs/ddragon1/trainingj/3.gif  0.2 0 0 0 0 0 1 1 1 0 0 0 0 0 12
frontpanel data/bgs/ddragon1/trainingj/n02.gif
 
Can you please tell us 1st how do you declare biker, is it as bglayer or as entity?

The solution for each is different so if we know which one, we can offer the correct one.

BTW the one posted above is for biker as entity.
 
the bike is an animation TYPE NONE.
We try to put a setLayer -3000 and gives no result, is located just behind the panel but not behind the bglayer.
as I can put it behind a bglayer?
Thanks friend for your cooperation. ;)
 
you cant, i tried, too bad cause sometimes i wanted animated stuff in bg and bglayers in front of them, i had to replace bglayers with decoration entities.
 
It is true you cannot animate bglayers, they are not made for that. Their purpose is to allow you to add multiple scrolling background layers for minimum CPU/RAM cost.

For animated background features and effects, look into panel type entities. They are a crossover between true panels (adjustable scrolling speed for layering) and entities (allow animation w/script). Obviously a bit more costly than bglayer, but no more than a normal entity and they are specifically made for this kind of task. They'll make your life much easier than trying to randomly plaster stuff all over the stage.

DC
 
Mmm. I understand. My intention was to make a bike go running behind the layers.
it also occurred to me is if I use one layer as if I put the bike and speed. but it is possible that one of the layers has speed independently to the other? bgspeed layers or take speed and give them all?  :o
 
Hmmm.... maybe you should try setting really huge value for setlayer something like -30001000.

As for independent speed, the answer is no BUT there's a trick for this. You set bgspeed to autoscroll background. The last parameter of bglayer command defines relative speed to bgspeed. Set this to 1 for bglayer with bike.
How to stop background from autoscrolling? you don't stop it but instead you define a clone of background with bglayer to cover default background.

With this trick, you can use bgspeed to control speed of one bglayer.
 
The best way to make this is by setting a set of walls on ground to lift the ground at certain height leaving that hole.

This will look as if there's a shallow hole while actually players and enemies play in higher ground.
 
hello friends. I wonder if the WALL function can be assigned a color to get a better reference, it would be easier to see the design parameters. is this possible? thanks
 
Back
Top Bottom