Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

olisolomons

6
Posts
A member registered Oct 26, 2023 · View creator page →

Creator of

Recent community posts

(1 edit)

Quil doesn't give you very much of this out-of-the-box, it's up to you to find a way to make your player move how you want them to move. For example, I made a player that moves quite jerkily here, with some "long key press" functionality similar to how you were looking for: http://www.quil.info/sketches/show/926b90ca28f03e9511165d337bb7ed6089f07381d1264.... I did this by adding a :last-move-time key into the state to prevent it from moving after it has just moved, so you don't need to mess around with frame rate. I also added the moving functionality into both update and key-press functions, just in case a key press was very very short and didn't get picked up by the update function.

Or you could look at my sliding puzzle code to get some ideas about how to animate the motion - I add a key into the :animations map in the state, then draw piece positions using lerp (linear interpolation) and the current time to get the current position. I remove finished animations in the update function.

(1 edit)

Hello, it's great to see I've inspired a game! I'm not super experienced with Quil, but I think I can help - I don't think Quil has the exact functionality you're looking for, but you can still make it work. For your use-case, I'd change the keypress function to modify the game state to record that the key is pressed, and add a key-released function to record that it is no longer pressed, and do the check-and-move code inside the game's update function using the info recorded in the game state. Does that make sense? Good luck with the game jam, and feel free to ask if you have any more questions!

Edit: actually if you only need the most recently pressed key, you could probably ignore the stuff I said about recording key presses in the state and just use q/key-pressed? and q/key-as-keyword inside the update function instead of inside the key-pressed function.

Very fun, and looks awesome - an online multiplayer mode could be fun!

Sorry about that, I accidentally deleted it 🤦. Thanks for looking!

There's a version hosted on my server at https://vmi1489186.contaboserver.net/static/sliding-puzzle/, I promise it's pretty much the same as the one that I submitted during the game jam! (I corrected a typo of "sucess", and added a transition I missed, for when you press the space bar when on the title screen)

Thank you!

Thanks for playing! That's an interesting thought - I feel like a non-brute-force algorithm is possible, and I have the outline of an aglorithm in my head (for the "get 1 of the 3 pieces into a given position" problem), but it has too many corner cases...

I like your map ideas, and I might take it further!