Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(5 edits)

You're welcome. I like breaking things down and helping people understand it. I know I have to do that a lot for myself.

For vertical movement you can just extend the same concept to the values of 4 and 8, like this:

x+=b\2%2-b%2y+=b\8%2-b\4%2

It's the same pattern for every button, but you can simplify the expression for button 0. I initially used a slightly different method, with a swapped order of the floor divide and modulus operators, but that took an extra character or two.

As for waiting till next year, the tweettweet jams are roughly every 6 months, so you might still make it this year. =)

Deleted 269 days ago
(3 edits)

Honestly, those two operators are the foundation of much of the logic in my code these days. They basically allow various non-linear behaviors to arise from linear numeric inputs, so you can use them to replace a lot of cumbersome branching conditional logic.

I've only been coding on and off for a handful of years myself, and not very regularly until the last year and a half, but I enjoy the  problem solving and the freedom to approach things creatively. Guess it also helps that I'm very comfortable with math.

Deleted 269 days ago
(1 edit)

Looks good, though you could actually switch to a 60fps update function with equivalent movement speed for just 2 chars more, eg:

x=60y=60::_::cls()b=btn()

x+=b\2%2*2-b%2*2y+=b\8*6-b\4*2

circ(x,y)flip()goto _

vs.

x=60y=60function _update60()cls()b=btn()

x+=b\2%2-b%2y+=b\8%2-b\4%2

circ(x,y)end

I can relate to feeling a bit clunky sometimes, but there's one nice benefit to having a living brain rather than a hunk of silicon, you can actually rewire it a bit over time. ;)

Deleted 269 days ago