0% found this document useful (0 votes)
30 views3 pages

Credits For A Font or Song

The document discusses visuals created using particles and vis.js by creators caseif and Incept, and includes code for basic player movement and animation in a side-scrolling game using keyboard controls.

Uploaded by

Aanchal Rathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views3 pages

Credits For A Font or Song

The document discusses visuals created using particles and vis.js by creators caseif and Incept, and includes code for basic player movement and animation in a side-scrolling game using keyboard controls.

Uploaded by

Aanchal Rathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Visuals made using https://musicvid.

org and by creators:

caseif - Particles & vis.js

https://caseif.net/
Incept - Particles & vis.js

https://incept.online/

frwd = keyboard_check(vk_right);
bkwd = keyboard_check(vk_left);
jump = keyboard_check(vk_up);

var move = frwd - bkwd;

hsp = move * wsp;

vsp += grv;

if (place_meeting(x,y+1,oWall)) && (jump)


{
vsp = -10;
}

if (place_meeting(x+hsp,y,oWall))
{

hsp = 0;
}

x += hsp;

if (place_meeting(x,y+vsp,oWall))
{

vsp = 0;
}

y = y + vsp;

//Animation

if (frwd)
{

sprite_index = sPlayerRun;
image_speed = 1;
x += 3;
if (place_meeting(x+hsp,y,oWall))
{

x += 0
}

x += hsp;
}
else if (bkwd)
{

sprite_index = sPlayerRun_flp;
image_speed = 1;
x -= 3;
}

else if (!place_meeting(x,y+1,oWall))
{

sprite_index = SPlayerJump
image_speed = 0;
if (sign(vsp) > 0) image_index = 1; else image_index = 0;
}

else
{

sprite_index = sPlayer;
image_speed = 1;
}

frwd = keyboard_check(vk_right);
bkwd = keyboard_check(vk_left);
jump = keyboard_check(vk_up);

var move = frwd - bkwd;

hsp = move * wsp;

vsp += grv;

if (place_meeting(x,y+1,oWall)) && (jump)


{
vsp = -10;
}

if (place_meeting(x+hsp,y,oWall))
{

hsp = 0;
}
x += hsp;

if (place_meeting(x,y+vsp,oWall))
{

vsp = 0;
}

y += vsp;

//Animation

if (!place_meeting(x,y+1,oWall))
{

sprite_index = SPlayerJump;
image_speed = 0;

if (sign(vsp) > 0)
{

image_index = 1;
}
else {

image_index = 0;
}
}

else
{

image_speed = 1;

if (hsp == 0)
{

sprite_index = sPlayer;
}
else
{

sprite_index = sPlayerRun;
}
}

You might also like