Loading...
134
Game
Project; Desolate (Undertale Fangame)
2 years ago

Movement of player v2.0 based on changeable max speed(N and M), on run (Shift) and on slowdown (C)


Create:

xsp = 1

ysp = 1

var_speed_p = 2

var_speed_p_add = 1

debug = 0

var_Shift_n_C = 0

var_beg_c_count = 0

var_beg_shift_count = 0

var_n_n = 5

Step:

var_beg_c = keyboard_check_pressed(ord("C"))

var_beg_shift = keyboard_check_pressed(vk_shift)

var_c_pr = keyboard_check(ord("C"))

var_shift_pr = keyboard_check(vk_shift)

var_right = keyboard_check(vk_right)

var_left = keyboard_check(vk_left)

var_up = keyboard_check(vk_up)

var_down = keyboard_check(vk_down)

var_n = keyboard_check_pressed(ord("N"))

var_m = keyboard_check_pressed(ord("M"))

//for debug

debug = 1

if debug = 1

{

xsp_d = "X speed " + string(xsp)

ysp_d = "Y speed " + string(ysp)

sp_add = "Added speed " + string(var_speed_p_add)

c_d = "C " + string(var_beg_c)

shift_d = "Shift " + string(var_beg_shift)

S_n_C = "Speed changing" + string(var_Shift_n_C)

}

//speed

if var_beg_c = 1 and var_beg_c_count = 0

{var_Shift_n_C = -0.001

var_beg_c_count = 1

var_beg_shift_count = 0}

if var_beg_c = 1 and var_beg_c_count = 1 and var_Shift_n_C >= -0.05 and var_Shift_n_C <= 0.05

{var_Shift_n_C += -0.01

var_beg_shift_count = 0}

if var_beg_shift = 1 and var_beg_shift_count = 0

{var_Shift_n_C = 0.001

var_beg_shift_count = 1

var_beg_c_count = 0}

if var_beg_shift = 1 and var_beg_shift_count = 1 and var_Shift_n_C >= -0.05 and var_Shift_n_C <= 0.05

{var_Shift_n_C += 0.01

var_beg_c_count = 0}

if var_c_pr = 1

{if var_shift_pr = 1

{var_beg_c_count = 2

var_beg_shift_count = 2}}

if alarm [0] = -1 and (var_beg_c_count = 2 or var_beg_shift_count = 2)

{alarm[0] = room_speed/10}

if var_m = 1 and var_n_n >= 0 and var_n_n < 10

var_n_n += 1

if var_n = 1 and var_n_n > 1 and var_n_n <= 10

var_n_n -= 1

var_speed_p_add = clamp(var_speed_p_add + var_Shift_n_C, 0.1, var_n_n)

//Movement

xsp = (var_right - var_left) * (var_speed_p * var_speed_p_add)

ysp = (var_down - var_up) * (var_speed_p * var_speed_p_add)

x += xsp

y += ysp

Alarm 0:

var_Shift_n_C = 0

var_speed_p_add = 1

var_beg_c_count = 0

var_beg_shift_count = 0

Draw:

draw_set_colour(c_white);

draw_set_halign(fa_center)

draw_set_valign(fa_middle)

draw_set_font(fnt);

draw_self()

if debug = 1

{

draw_text(x- 50, y + 5, xsp_d);

draw_text(x -50, y + 25, ysp_d);

draw_text(x-50, y - 15, sp_add);

draw_text(x-50, y - 35, c_d);

draw_text(x-50, y - 55, shift_d);

draw_text(x-50, y - 75, S_n_C);

draw_text(x-50, y -95, var_n_n)

}



0 comments

Loading...

Next up

Meet The Head of the Imperial Army (description of character in article)

T̷̪͔̻̭͛̏̓͠ẖ̶̭͉̱̏̀̕͠e̷̛͍͔͇̥͖͆̃̌̔̈̄̕ ̴̮̺̙̞͖͚͔̫̓̽Ť̴̡̢̫̮͋̓͆͊͛͋́̉͜͜r̸̢̠̘̳͙͈̖͑̓͐̎̋̑̒̈́u̶̡̞̰̫̭͉̾̍̓̽̌ě̷̳̺̙̲́̇̓̚ ̴̘̲̦̩̙̈a̶͓̹͔̯̍͗͂̌ͅṅ̶̖͉̯͍̱͎͔̯̏̀̏̔͑̌͐̚d̷̼̭̆̉̂̎͜͝ ̵̫̲͔̣̋̍̄̉̊̿͋̋͝Ô̵̭̩̞̼̎ǹ̷̖͉͙̪̏̊͊̾̊͑̆l̷̝̙̃͊̆̊̋̈́͠y̸̧̦͌ ̸̰̤̺̈́̃̿͑̈͒̂̕͝G̶̰͔͈͂̈́̕͜õ̵͌̀̿́͜ͅd̸̫͕̩̩̬̫̆̎̑̽͋̈́̚̚͝

Yay! Finally! It took me 6 years! And I beat Undyne The Undying! It took only 3 attempts in this game session!

Our 2024 Advent Calendar has opened! Day 18: @Otis_Le_PoOtis is the Creator of Bondee’s Barnyard and posts updates about their dev journey and their work on the sequel!) Accept the quest and give them a follow to get Coins and a seasonal sticker!

Aster's armor

Dev Update - December 2024

Movement of player

It took a long time, but I was finally able to make the letters appear depending on the text, set speed and priorities.

(P.S. Text and visuals are a WIP)

Our 2024 Advent Calendar has opened! Day 24: @NickPerson is a great Creator who makes Five Nights at Freddy's fan games! Accept the quest and give them a follow to get Coins and a seasonal sticker!

Some intro in GMS2