A two-player juggling extravaganza!
Left player: S / F to move; Left Shift to toss!
Right player: Arrow Keys to move; N to toss!
The first player to drop five balls loses!
Howdy, my name is bridgs and I make games! If you enjoyed this cart, please leave a comment, I really appreciate them. And ALSO...
... if you'd like to follow me, I'm always active on Twitter!
... if you wanna hang out and build games together, stop by my Twitch channel!
... if making a chill lil' spider web sounds appealing, check out 8 Legs to Love!
... if you'd like a challenging boss fight, throw yourself at Just One Boss!
... if you're curious about my other games, you can find them on my website!
... if you enjoyed yourself and are feeling generous, throw me a tip on Ko-fi!
And as always... thank you for playing
Gosh, this is really cute! The music makes me happy. :)
It would be nice if you added a pause menu item to return to the mode select. I can obviously reset the cart, but it'd be nice to get out of a mode I didn't mean to enter, using the controller/keyboard.
On the programming side...
I'm poking through your code, and I have a question. I'm curious, why do you use your custom
ternary() function rather than the direct
cond and v1 or v2 expression?
It looks like the token count is the same, and the contents of the function are actually the exact expression I'm referring to, so you obviously know how to do it inline. Thus, I'm guessing there's a (potentially-useful-to-me) reason why you made a function for it. Please, satisfy my curiosity. :)
@Felice Thanks! Like the idea of adding a Return to Title Screen option, I always forget about tacking on pause menu items.
There is a rare token benefit to using ternary: it's automatically enclosed within parenthesis. So if you were writing code that would normally have needed parenthesis, you do end up saving a token.
move_dir * (is_sprinting and 2 or 0.75) -- 8 tokens move_dir * ternary(is_sprinting, 2, 0.75) -- 7 tokens
But in my experience you're unlikely to make up the 12 tokens needed for the function definition. And there is the downside where a ternary function won't short-circuit the way an and-or expression will.
(player and player.speed or 0) -- evals to 0 if player is nil ternary(player, player.speed, 0) -- throws an error if player is nil
So really... I just do it for readability, because I find the and-or syntax a lil' misleading to my eyes ~shrug~
Curiosity sated? Maaaaybe?
Sated indeed. I hadn't considered the free parentheses. I actually use ternary expressions a lot in my own code, and yeah, sometimes the need for parens and their additional (and I think needless) token does upset me, so this is an idea I can probably use. :)
[Please log in to post a comment]