Inspiration

Saw the hackathon, wanted an excuse to actually use Phaser, and the cash prize was a nice bonus. That's it.

What it does

One shot a day. Drag the ball back, let go, try to hit the target. Same course for everyone each day so it's fair. You get a score and can check it against others.

How we built it

Started from Reddit's Phaser starter template, added Matter.js physics for the slingshot, Redis to save scores and stop double-playing.

Challenges we ran into

Spent way too long on a bug where the ball would vanish and the score came back NaN. Turned out making it a static body while aiming then switching it to physics on release broke Matter internally. Fixed it by only spawning the real physics ball at the moment you release.

Accomplishments that we're proud of

It actually works. Ball flies, physics feels decent, score saves.

What we learned

Matter.js physics has weird edge cases nobody documents. Also that adding console.logs and looking at real numbers beats guessing every time.

Built With

Share this project:

Updates

Submission history