Trajectory!
Place the fewest blocks the quickest to get the ball past lasers and teleporters—a new challenge awaits you every day. Bored of the daily puzzle? Create your own chaotic custom levels to challenge the community. This sleek 2D game can be played on desktop, tablet, or on a phone, all without leaving Reddit!
Inspiration
Inspired by games such as The Incredible Machine and its more modern successors, Trajectory aims to bring a competitive edge to this genre through a scoring system dependent on how efficiently a player can guide the ball from start to end.
What It Does
- Unleash Your Inner Strategist: Negotiate tricky gaps with your puzzle-solving skills by placing blocks, bars, and wedges to guide the ball safely from start to finish. Getting from Point A to Point B has never been this challenging!
- Compete for Ultimate High Scores: Compete with other Redditors for the lowest block count and fastest setup time on global daily leaderboards. Compare your efficiency and climb the ranks!
- Daily Challenges: A fresh global challenge is automatically created every single day. Work together with fellow Redditors and try to complete the puzzle!
- User-Generated Content: Design and publish your own custom levels directly to the subreddit as a brand new post for the community to try, complete with their own custom leaderboards.
- The Ultimate Anti-Grief Rule: To prevent impossible level spam, all creators MUST successfully complete their own level to publish it. If it is on the feed, it is already proven to be solvable.
- Play Anywhere: Take this physics puzzle with you on the go. You can solve puzzles on any device ranging from mobile phones to PCs.
How I Built It
Built using Reddit Devvit Web, Phaser 4 & Matter.js, deterministic physics, Devvit Redis Data Storage, a whole lot of coffee, and meticulous touch tuning.
Challenges I Ran Into
The biggest challenge was generating a unique, engaging, and (most importantly) solvable puzzle each day without creating mathematically impossible configurations. I resolved this by implementing a downward-bias reachability algorithm over a seeded grid, proving a valid solution exists before rendering the board.
Accomplishments That I'm Proud Of
Successfully using and tuning a Breadth-First Search (BFS) algorithm to correctly distribute various obstacles across the map while mathematically ensuring that the puzzle remains solvable and reaches a specific difficulty threshold.
What I Learned
The balance of algorithmic game design. I learned to bridge rigid graph theory and algorithms (like BFS and reachability analysis) with procedural generation to control difficulty dynamically and create engaging maps for users on a daily basis.
What's Next for Trajectory
While the core game mechanics are solid, the UI requires polishing in certain areas. Future updates will also introduce a wider variety of obstacles and block types to add depth to user-generated and daily levels.
Built With
- devvit
- game-development
- math
- mobile-friendly
- phaser.js
- physics
- procedural-generation
- puzzle
- redis
- sandbox
- typescript
Log in or sign up for Devpost to join the conversation.