Page 1 of 2

Tower Climb

Posted: Tue Feb 12, 2019 10:04 am
by milkbomb11
I created this game for a game jam and I forgot to upload the game executable files to my game page and I can't fix my game page because you can't edit it until the game jam ends. So I'm completely doomed :(
So I decided to upload the game here.
It's a roguelike platformer where you must reach the top of the tower as fast as you can without losing your three precious hearts.
If you lose all of them, the tower's interior changes randomly, making memorizing the whole map impossible and giving you different experiences every time :D


Heres the .love file
Tower_Climb.love
(12.07 MiB) Downloaded 480 times
Heres a windows executable
Tower_Climb_win.zip
(15.29 MiB) Downloaded 368 times

Re: Tower Climb

Posted: Tue Feb 12, 2019 7:14 pm
by randomnovice
Thanks for uploading. Is there any other way to jump besides the up arrow? I was unable to reach any platform above me... can't make it off the very ground level!?

Re: Tower Climb

Posted: Wed Feb 13, 2019 2:32 am
by milkbomb11
randomnovice wrote: Tue Feb 12, 2019 7:14 pm Thanks for uploading. Is there any other way to jump besides the up arrow? I was unable to reach any platform above me... can't make it off the very ground level!?
So you weren't able to jump when you pressed the up arrow?
What version of the game were you playing (.love or windows standalone)?
Also, I tested out if the tower generator was making unreachable platforms, but it functioned correctly.
Sorry for the issue you are having right now, but the game seems to work properly on my computer :(

Re: Tower Climb

Posted: Wed Feb 13, 2019 7:13 am
by randomnovice
I downloaded the .love file above. It seems like the gravity is way too strong for me? I can jump, but my head reaches the top of the first block before I'm sucked back down to ground level.

Re: Tower Climb

Posted: Wed Feb 13, 2019 12:09 pm
by pgimeno
It seems that there's a miscalculation of gravity. Changing this in Objects/PlatformerPlayer.lua:

Code: Select all

function player.gravity(grv, dt)
  player.yv = player.yv + grv
end
to this:

Code: Select all

function player.gravity(grv, dt)
  player.yv = player.yv + grv*dt
end
and adjusting gravity to this value:

Code: Select all

  player.gravity(835, dt)
might fix it.

Re: Tower Climb

Posted: Thu Feb 14, 2019 12:24 am
by milkbomb11
pgimeno wrote: Wed Feb 13, 2019 12:09 pm It seems that there's a miscalculation of gravity. Changing this in Objects/PlatformerPlayer.lua:

Code: Select all

function player.gravity(grv, dt)
  player.yv = player.yv + grv
end
to this:

Code: Select all

function player.gravity(grv, dt)
  player.yv = player.yv + grv*dt
end
and adjusting gravity to this value:

Code: Select all

  player.gravity(835, dt)
might fix it.
I think the reason for the bug was because of delta-time not being calculated
P.S: Do I have to multiply dt every time some sort of variable that influences the player's movement somehow in any form increases?

Re: Tower Climb

Posted: Thu Feb 14, 2019 2:00 am
by pgimeno
milkbomb11 wrote: Thu Feb 14, 2019 12:24 am P.S: Do I have to multiply dt every time some sort of variable that influences the player's movement somehow in any form increases?
Not necessarily, but since you're implementing custom physics, the velocity changes at a rate that depends on the time step and the current acceleration, just as the position changes at a rate that depends on the time step and the current velocity. See for example
https://gafferongames.com/post/integration_basics/

Nice little game, by the way :)

Re: Tower Climb

Posted: Thu Feb 14, 2019 5:32 am
by randomnovice
Thanks, that did the trick. Fun stuff!

Re: Tower Climb

Posted: Thu Feb 14, 2019 8:58 am
by milkbomb11
randomnovice wrote: Thu Feb 14, 2019 5:32 am Thanks, that did the trick. Fun stuff!
Thanks for the compliment :D

Re: Tower Climb

Posted: Thu Feb 14, 2019 9:13 am
by milkbomb11
pgimeno wrote: Thu Feb 14, 2019 2:00 am See for example https://gafferongames.com/post/integration_basics/
I read the article and my simple premature brain wasn't able to understand most of it. But I think this will come in handy later when I have some knowledge of high school physics
pgimeno wrote: Thu Feb 14, 2019 2:00 am Nice little game, by the way :)
Thanks for the compliment! :D