spawn outside camera view in endless game
JayJayD
Member Posts: 48
hello,
i´m not sure how to spawn actors under the camera view in an endless top to down scrolling game.
camera posion will be always at the same position, because the enemy actors are moving TO
my main actor, which is always at the same y posion and only change its x position.
are the position attributes in each actor for the hole scene or for the camera view?
I´ve about 5 different actors and the scene is about 3000*640 long.
One of the actor is affected by gravity and falling from above.
should i work with tables at this point? I havent worked with tables so far.
Comments
Darren.
but is there an attribute which is only for the camera view?
or another possibility?
how to use the tables when x and y are always changing?
Justin
have your scene stay at 960x640
spawn all your actors at like 1000 and have them move left towards your hero who you could have at position 480 or something (middle of screen)
thats all you need to do
why if your camera is never moving do you have a 3000 long scene?
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
the camera dont move because the background and any other actor expect my main actor have a move behaviour for parallax scrolling. the actor only change its x (they are scrolling upward) position and camera won´t move.
i think i got it... if the camera isn't moving i can always use the same spawn point for the actors right?
i first thought that the coordinates are relative to the position of the background but they are for the whole scene when i'm right.
i'll do this with tables, because they shouldn't spawn so random.
Thanks, you helped me A LOT