Inspiration

The inspiration for Turbo Truffle Pig came from the classic "jetpack" genre, but with a whimsical, animal-themed twist. I wanted to create a game that felt "juicy"—a term in game design for high visual and auditory feedback—while strictly adhering to the "Oink" jam theme. The idea of a pig using a high-tech jetpack to find truffles felt like the perfect blend of rural charm and arcade chaos.

What it does

Turbo Truffle Pig is a high-octane side-scroller where players control a jetpack-equipped pig. The goal is to collect truffles to increase your score while dodging dangerous spikes and flying butcher knives. The game features:

Combat System: Shoot corn kernels at enemies to clear a path.

Armor System: Collect mud puddles to gain a temporary shield.

Dynamic Difficulty: The game speed increases over time, culminating in a massive Boss Battle against "The Iron Butcher."

How we built it

The game was built using a pure web-standard stack to ensure it remains lightweight and requires no external downloads:HTML5 Canvas: Used for high-performance 2D rendering. Web Audio API: All sound effects (explosions, jetpack rumbles, and coin pings) are synthesized procedurally in real-time. Custom Particle Engine: Manages smoke, fire, and sparkles for a polished visual feel. Physics: Implemented a custom gravity and lift system where the pig's vertical position y is updated every frame based on velocity Vy and gravity g :- Ynew= Yold +Vy Vy = Vy +g

Challenges we ran into

The biggest technical hurdle was the Homing Missile AI used during the boss fight. To make the missiles follow the player without being impossible to dodge, I had to implement a specific tracking acceleration. Another challenge was managing collision detection for a large number of simultaneous objects (bullets, particles, and enemies) without dropping below 60 FPS. I solved this by implementing a rigorous "cleanup" loop that clears objects the moment they leave the screen boundaries.

Accomplishments that we're proud of

I am particularly proud of the Boss Battle transition. At a score of 500, the background dynamically shifts to a darker "danger" palette, the UI flashes a warning, and the Iron Butcher enters the screen. Creating this seamless transition between standard gameplay and a boss encounter using only vanilla JavaScript felt like a significant milestone.

What we learned

During this project, I deepened my understanding of the Finite State Machine (FSM) pattern to handle the different behaviors of the boss (entering, fighting, and exploding). I also learned how to use LaTeX to document the mathematical logic behind the game's mechanics and collision radii, specifically calculating the Euclidean distance d for hitboxes .

What's next for OINK JUMP (GAME)

Future updates will include a global leaderboard and more diverse power-ups, such as "Golden Corn" for rapid-fire shooting. I also plan to add a local multiplayer "Versus Mode" where two pigs can compete to see who can survive the butcher the longest!

Built With

Share this project:

Updates

Submission history