ryanpcmcquen / basque

A top-down 2d game engine, written from scratch in under 1000 lines of C. Development of the game based on this engine is streamed on Twitch: https://www.twitch.tv/ryanpcmcquen
https://ryanpcmcquen.itch.io/basque
Mozilla Public License 2.0
443 stars 24 forks source link

Bug: Player easily falls out-of-bounds #19

Closed fontire closed 8 months ago

fontire commented 3 years ago

Moving vertically near the edge of a column of tiles allows the player to then move outside the bounds.

This should be solvable with standard bounding boxes.

ryanpcmcquen commented 3 years ago

Yep, this is already solved in the closed source version of the engine as seen on the Twitch streams, but fixing it here is tricky while staying under 1000 lines.

fontire commented 3 years ago

Is there a need to stay < 1000 lines? It's a nice number but having the engine more useful seems like a better goal.

ryanpcmcquen commented 3 years ago

I'd rather make a 'Basque+' or something similar when the game is done with a host of improvements. I think the 'under 1000 lines' rule keeps it mentally manageable for people who are just getting into C99 and whatnot.

fontire commented 3 years ago

Okay. Incidentally, I don't think that an UP/DOWN event combo in SDL2 has delay/repeat issues when storing the state (as in the changes in my fork).

The DOWN event triggers the state immediately and that is retained until the UP state (also immediate). Any delayed/repeated DOWN events have no effect on the state.

ryanpcmcquen commented 3 years ago

Would you be willing to test the WASM port with these changes? I remember touch controls being weird there before scancodes.

fontire commented 3 years ago

Perhaps. I don't think I'm set up for that, though.

ryanpcmcquen commented 3 years ago

I think I can temporarily deploy your branch using GitHub actions and test it here, won't have time for a few days though ...

ryanpcmcquen commented 2 years ago

@fontire will you make a PR here?

ryanpcmcquen commented 8 months ago

Closed due to inactivity.