Log In  

Hi, im learning Pico8 and i think its so coll, sorry for my poor english.

Im triying to make something like classic arcade game, the problem is i dont know how to make my char climb the 4 ladders.

im so happy and excited to learn more, i posted this because im stuck for 4 days trying a lot of things but didnt work for me.

Every little step is a big step for me.

thank you ^^

Cart #testarcd-0 | 2023-01-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#123818 2023-01-06 11:32 ( Edited 2023-01-07 10:15)

1

Hello!

The problem is not that the player cannot climb the latter.

The problem is that the floor does not hold the player.

You need first to fix the collision with the floor tiles.

Maybe you could look at the code of other 2d games for ideas?

P#123827 2023-01-06 13:40

Hello!

I tried to make the floor hold the character but i dont know how to make it with a big sprite like this, same problem happened to find the way to make the character move and animate with more than an 8x8 sprite.

Anyway i dont know why doesnt work if i put on the controls another "or ply.x==80 and btn(3)"

I will keep triying to learn how to make the collide for big sprites.

thank you ^^

P#123832 2023-01-06 16:02 ( Edited 2023-01-06 16:08)

Cart #nusiropaju-0 | 2023-01-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Collisions and the floor holding the player, solved, thanks to the collision map example from Astorek86 ^^

A little help with how to make the character climb or down the ladders?

And why the charactter climbs in the air?

thank you :)

P#123871 2023-01-07 08:45 ( Edited 2023-01-07 11:24)
2

To prevent the player from climbing where there isn't a ladder, you need to check whether or not they're on a ladder tile. The current code seems to allow the player to climb whenever up or down is pressed.

Also, it's usually good to "snap" the player to be perfectly aligned to the ladder when they start climbing. For example, if the player begins climbing when their left edge is four pixels to the left of the left edge of the ladder, move the player four pixels to the right so they're perfectly aligned to the ladder tiles. This way, they won't get stuck on a solid at the top of the ladder.

Also also, most games treat the tops of ladders as a floor tile; when the player walks on them, they act like a normal floor, but if the player presses down while on them, they begin to climb down the ladder. This is typically done by treating ladder tiles as floor tiles for collisions from above, but not for collisions from below.

P#123889 2023-01-07 15:32

Thanks, i understand but i dont know how to code that.

Im looking for some examples on the site, but its hard.

Thanks again

P#123891 2023-01-07 16:02
2

Hi @xeif.

If it makes it simpler, think of it as a topview game. The only way you can travel NORTH (or up if that makes better sense) is on a ladder.

Any empty space or pressing DOWN on a ladder, think of it as pushing down or South on the player.

That's it. If you do that you won't need to worry about gravity.

P#123904 2023-01-07 18:42 ( Edited 2023-01-07 18:43)

Hi @dw817

Im triying to make something with the command mget, but your idea can will be a solution.

The purpose of the game its make a classic arcade game like burger time or similars but with different mechanics.

thank you ^^

P#123929 2023-01-08 05:42 ( Edited 2023-01-08 05:44)

[Please log in to post a comment]