Of cars and balls

Live link: Jet Propulsion Alliance · Meep


A little game I put together as a demonstration of meep’s capabilities.

A few things worth noting:


Physics

  • Each car runs a Raycast Vehicle model, with suspension modelling
  • We apply stability corrections to the vehicle to prevent flipping and assist with recovery via forces
  • The entire steering model is entirely physics base, both on the ground and in the air
  • Boost pickup items are modelled as RigidBody with IsSensor flag set. So we can detect collision, but not have any collision response from the engine. The goal is the same too.
  • The arena is just a bunch of arranged box colliders.

Particles

  • Car Exhaust
  • Boost effect
  • Tire sliding contacts
  • Ball impacts

Decals

  • Boost pickup items use decals
  • Scuff marks on the arena floor are decals
  • The central kickoff markings are decals

Clustered Lights

  • Boost pickup items have a light source attached to each
  • During the boost each “boost” attachment on the vehicle activates a light source

Trails

  • Each car has N trail attachments that are speed-activated, when the car moves faster than X - they become visible
  • The ball is the mostly same, with a trail becoming visible when it moves fast enough

Mesh Outlines

  • To help with visiblity the opponent car and the ball get a faint outline when they are far-enough away

Audio

  • Engine sounds
  • Breaking / sliding
  • Collisions
  • Goal score sound effect

Behavior Trees

  • The opponent AI drives through the exact same controller as the player, and is driven through a behavior tree.

I put together a little tool to help configure the cars

It’s generic and barebones, but it gets the job done

7 Likes

Although i got heavily beaten by the AI, I like the way the camera adjusts to the direction the car is travelling, even during reversal of travel direction (forward<=>backward).

I’d like to see inpenetrable bounding walls, though. Currently, they seriously hamper your orientation during boundary interaction involving reversal of travel interaction.

1 Like

Yeah, Rocket League gets around this by keeping the entire cage of the arena transparent.

Forcing camera to not penetrate through the walls is a challenge, not so much because it’s hard to do, but because it’s hard to do well and in a way that doesn’t annoy the user.

Learned a lot while working on this, and learned to appreciate the enormous amount of effort and detail that the Rocket League developers have put into their game. Seems easy at a glance, but there’s a lot of detail hiding under that simplicity.

2 Likes

Very fun! A++

1 Like

Another option is local transparency - obstacles between you and the target get gradually transparent. Here is a demo of a TSL texture that “dissolves” too close objects (or too far objects)

https://x.com/PavelBoytchev/status/2027845647584383281

And in this discussion there is a non-TSL variant:

1 Like