endless running game help

Nexo55Nexo55 Member Posts: 48
hello friends

I'm doing an endless running game.
problem is, I'm one of the background.
add this code to the background
code inserted:
move: 180 degrees, 300 speed
rule: position.x = or <the
spawn actor: self-x: 480 y: 0

over and over again in the form of a self-build

but is formed by a space between each object

accelerate the further you play

I'd appreciate if you help

Comments

  • grimtoothgrimtooth Member Posts: 69
    I THINK I know what your asking...and I THINK I know why, but I've never made an endless runner so it's speculation.

    The black line may appear because there is a very tiny amount of time for the CPU to determine that your actor reached position -X and then a very tiny amount of time for the CPU to process the rule, resulting in just enough delay to make a line 1-2 pixels wide between the graphics. Either that or your background has a line on it hehe.

    First, you don't need a rule to make it move, just set actor properties "Linear Velocity X to -300.

    Second, it's probably easier on the CPU to make 3 copies of the background and just move them back to x= 480 or whatever after they go off the screen.

    Finally, to get rid of that black line you should be able to just edit your rules a tiny bit, such as:
    IF actor x<= -476
    Change actor x = 476
    This will give a small overlap get rid of the line... I hope :)

    Grim


  • Nexo55Nexo55 Member Posts: 48
    but an ever-accelerated background
    background consists of accelerating gap again.
Sign In or Register to comment.