How do I re-create this effect?

I'm wondering how to re-create the (floor) effect in this video.


I think that it would really add something to my HTML5 game "Synergy" but I'm not even sure how to define it - much less program it.

Screenshot_2019-10-16 Synergy Fiat Games.png

If someone could point me in the right direction I'd really appreciate some help.
 
Last edited:

TailBit

Member
that is pretty much just green lines going up:

create:
Code:
line_move = 0;
draw:
Code:
line_move += .2;
if line_move > 1 line_move--;

var i,yy;
yy = room_height / 2 + line_move * room_height / 8; // start in the middle

draw_set_color(c_lime)

while(yy<room_height){
    draw_line(0,yy,room_width,yy);
    yy+=room_height/8; // move 1/8 part down for each line drawn
}
draw_set_color(c_black)
UNLESS .. you want a code to how those other lines are drawn, instead of using an image.
 

TailBit

Member
The other lines are pretty much drawn from the center and out, you could so something similar to give an illusion of movement

Code:
var xx,yy,angle,lines;
xx = room_width / 2;
yy = room_height / 2;
lines = 18;
angle = 180 + 180 / lines * (obj_player.x / room_width) // I do not know name of the object you move around, so you will have to adjust that

draw_set_color(c_lime);
while(angle < 360){
    draw_line(xx,yy,xx+lenghtdir_x(200,angle), yy+lenghtdir_y(200,angle));
    angle += 180 / lines;
}
draw_set_color(c_black);
oh, and ofc, could use the other draw functions to make the lines darker the further back

and if you do want them to appear much more distant like you currently got it, then one could use some more math to find out where they should start drawing from (but I'm out of time for now :p )
 
Top