Log In  
Follow
uncertifiedloaf

in school doing this for my assignment


Cart #bosenuduzi-0 | 2024-11-06 | Code ▽ | Embed ▽ | No License
5


A platformer made by me, for my school's multimedia assessment!

Took about a term and a half to learn how to code, code, and fix everything up.

guys we even got a speedrun.com page https://www.speedrun.com/Haste

Huge thanks to RealShadowCaster, Soupster, Zellente, shiftalow, kimiyoribaka, and everyone else who helped me with this, I owe you big time

And of course, creds to Maddy Thorson and Noel Berry for the Celeste music and the inspiration

5
4 comments



hey everyone! finally close to finishing this project of mine, just needed to fix one last thing - the coyote timing.

in page 3 just above the --jump control, i added a variable called falling_timer which goes up by 1 every frame until you touch the ground, in which it resets to 0. i then made it so that if the timer is less than or equal to 6, then the player can jump.

i thought this would act as coyote timing... but i guess not? am i missing something?

i added a number above the player position to show the falling_timer value in game.

Cart #habeheriwo-0 | 2024-11-04 | Code ▽ | Embed ▽ | No License

2 comments



Hey everyone! Probably my last post for a while. Just needed one thing sorted: how can i make my in game timer start only when the game in initialized? also, how can i make the timer stop once you reach the final level?

Cart #gagonzet-0 | 2024-11-03 | Code ▽ | Embed ▽ | No License

2 comments



Cart #borurisajo-0 | 2024-10-16 | Code ▽ | Embed ▽ | No License


not exactly sure how to layout the code, but so far i have these:
in the init_game, level=1
when the level 2/3/4 door is entered, the level is set to 2/3/4
but, im not exactly sure how to make the code work for the checkpoint. how can i fix this??

AND BEFORE I FORGET how can i make the level 4 camera work?

10 comments



Cart #sogahugasu-0 | 2024-10-09 | Code ▽ | Embed ▽ | No License


hey everyone, having some trouble.
im trying to make it so that when you collect the emerald a bit into the first level, it prints "gem get!" next to it.
however, when I collect it, nothing happens.
i would also like the text to disappear after a few seconds. how would I do that?

the emerald code is in tab 5 under function upickups2(). apologies if any of the code is difficult to read, I'm pretty new to this.

also, any further feedback for the game is much appreciated!

(please don't mind the door sprites at the beginning of the level, its just for debug purposes so that I can test level 2 quickly!)

11 comments





just a test for my multimedia game

1 comment



same as title, its trying to call player1 but isnt able to?
im relatively new to coding so idrk how to fix this

1
14 comments



the thing is, this error only happens when I attempt to make a climbable wall.
here's my setup:

my collisions page:

--collisions

function collide_map(obj,aim,flag)
--obj = table needs x,y,w,h
--aim = left,right,up,down

local x=obj.x
local y=obj.y
local w=obj.w
local h=obj.h

local x1=0 local y1=0
local x2=0 local y2=0

if aim=="left" then
x1=x-2 y1=y
x2=x-1 y2=y+h-1

elseif aim=="right" then
x1=x+w+2 y1=y
x2=x+w+1 y2=y+h-1

elseif aim=="up" then
x1=x+3 y1=y-1
x2=x+w-3 y2=y

elseif aim=="down" then
x1=x+2 y1=y+h
x2=x+w-3 y2=y+h
end

--player hitbox test
x1r=x1 y1r=y1
x2r=x2 y2r=y2

--pixels to tiles
x1/=8 y1/=8
x2/=8 y2/=8

if fget(mget(x1,y1), flag)
or fget(mget(x1,y2), flag)
or fget(mget(x2,y1), flag)
or fget(mget(x2,y2), flag) then
return true
else
return false
end

end

my player page:
--player
function player_update()
--physics
player.dy+=gravity
player.dx*=friction

--controls
if btn(⬅️) then
player.dx-=player.acc
player.running=true
player.flp=true
end
if btn(➡️) then
player.dx+=player.acc
player.running=true
player.flp=false
end

--slide
if player.running
and not btn(⬅️)
and not btn(➡️)
and not player.falling
and not player.jumping then
player.running=false
player.sliding=true
end

--jump
if btnp(❎)
and player.landed then
player.dy-=player.boost
player.landed=false
end

--check collision up and down
if player.dy>0 then
player.falling=true
player.landed=false
player.jumping=false

player.dy=limit_speed(player.dy,player.max_dy)

if collide_map(player,"down",0) then
  player.landed=true
  player.falling=false
  player.dy=0
  player.y-=((player.y+player.h+1)%8)-1
end

elseif player.dy<0 then
player.jumping=true
if collide_map(player,"up",1) then
player.dy=0
end
end

--check collision left and right
if player.dx<0 then

player.dx=limit_speed(player.dx,player.max_dx)

if collide_map(player,"left",1) then
  player.dx=0
end

elseif player.dx>0 then

player.dx=limit_speed(player.dx,player.max_dx)

if collide_map(player,"right",1) then
  player.dx=0
end

end

--stop sliding
if player.sliding then
if abs(player.dx)<.2
or player.running then
player.dx=0
player.sliding=false
end
end

player.x+=player.dx
player.y+=player.dy

--limit player to map
if player.x<map_start then
player.x=map_start
end
if player.x>map_end-player.w then
player.x=map_end-player.w
end
end

function player_animate()
if player.jumping then
player.sp=7
elseif player.falling then
player.sp=8
elseif player.sliding then
player.sp=9
elseif player.running then
if time()-player.anim>.07 then
player.anim=time()
player.sp+=1
if player.sp>6 then
player.sp=3
end
end
else --player idle
if time()-player.anim>.3 then
player.anim=time()
player.sp+=1
if player.sp>2 then
player.sp=1
end
end
end
end

function limit_speed(num,maximum)
return mid(-maximum,num,maximum)
end

--attempting to climb
function player_climbing()
if collide_map(player,"right",2)
and btn(❎) and btn(⬆️)
then player.y+=500
end
end

flag 2 is meant to be climbable walls.
should this not increase my vertical velocity by 5?

5 comments