Time

Has it really been three years? Between being a father and my day job, there hasn’t been much time for game dev. Super Gravity Pong is shelved for now. But I have a few other things cooking that I can hopefully push out in 2019-2020. Stay tuned!

Super Gravity Pong: Physics Test 1a

In my previous post, I said…

Next week I will start iterating on the design of Super Gravity Pong, beginning with some experimentation putting different shapes into my pong physics world.

Well, a bit late, but here it is! The video below shows the first set of experiments, putting progressively more complex objects into the Gravity Pong world.  I’m using Sprite Kit’s (iOS) physics engine, which is a wrapper around Box2d.

Projectiles

The hardest object to get right was the weighted stick. Sprite Kit approximates air friction with rotational damping, but this effect doesn’t consider any aerodynamics.  Consequently, arrow-like projectiles spin as if they were in a vacuum, shown in the first GIF below.

Weighted Stick
Weighted Stick without custom projectile physics.

Instead, we want the projectile’s head to roughly point in the direction of travel, with the tail following, while still allowing natural physical interactions with walls and other objects. To achieve this effect, I added some custom physics computations. The next GIF below shows the end result.

Weighted Stick
Weighted Stick with custom projectile physics.

I’ll try to do a complete write-up and share some code in a future post, but briefly, there are two computations required to get a realistic projectile. These computations are applied as a post-process after each physics time-step. First, I adjust the projectile’s orientation so the head is pointing closer to the direction of movement. The amount of adjustment at each time-step is correlated to the projectile’s linear velocity: faster linear velocity yields faster spin. Second, I decrease the projectile’s angular velocity as its head gets closer to the correct direction. This has a smoothing effect and stops the projectile from spinning too far.

Springs

The springy diamond object looks a bit weird at first. What’s the deal with those lines pointing outward from each small circle? The answer comes from the fact that Sprite Kit’s spring joints are non-compressive. Their physics is based on being stretched, not compressed. Luckily, we can fake a compressive spring by taking a stretch-based spring and flipping it around. This gives us an odd-looking physics body, but the forces are all correct. And in the actual game, you won’t see these lines anyway!

Springy Diamond
Springy Diamond uses inverted stretch-based spring joints to simulate compressible springs.

Next Steps

One can only go so far looking at raw physics bodies. The next step is to add graphics to these objects to get a real sense of how they look and move. At the moment, I’m not quite sure what graphic style I want to use. I’m thinking either a cartoon style, a la Egg Brain, or a minimalist style, a la Umbrella’s Loop Mania. I also like the idea of something a bit surrealistic. Some of the more complex objects (clacker, cat’s cradle) could be rendered as creepy insectoids in a surreal landscape.

If you have any thoughts or suggestions, be sure to post comments below! Meanwhile, I’ll post more physics and graphics demos as soon as they are ready.

Announcing new project under development: Super Gravity Pong!

Hi folks! In the coming months, I hope to regularly post to this blog (maybe once a week?!). I’ll have a few posts about my recent release Egg Brain: Concentration, as I work on monthly updates and marketing. But mainly I’ll be doing a detailed step-by-step of my new project, Super Gravity Pong, launching in November for iPhone and iPad.

Impossible Pong and Egg Brain’s Gravity

The Gravity Pong concept predates Egg Brain. It came from a wonderful little game called Impossible Pong by Appnoxious. In Impossible Pong, you have a tiny paddle at the bottom of a minimalist arena, a white orb drops from above, the paddle always moves, and you tap the screen to change the paddle’s direction in order to keep the ball in the air.

Impossible Pong
Impossible Pong by Appnoxious

Impossible Pong is blindingly hard, but I love the feel of the gameplay once you get into a good flow.  It is reminiscent of Circle Pong and its copycats, but somehow more compelling, because instead of dealing with a linear movement of the ball across a circle, in Impossible Pong, you deal with the non-linear, gravity-affected movement of a ball in a physics environment.  There is just something quite compelling about tracking the ball’s movement on its parabolic arc, and timing the movement of your paddle so that they intersect.  A bit like that catching a frisbee in a moving speedboat.

Because I was so taken by the idea, I decided to incorporate it into Egg Brain: Concentration as a mini-game called “Gravity”.  In Gravity, the white orb is replaced by a colorful, cartoon-faced egg.  The paddle is made much wider, for easier, more mellow gameplay.  And the controls are subtly different, as I talk about below.

Gravity
“Gravity” from Egg Brain: Concentration

Two lessons from Egg Brain’s Gravity

I learned two important lessons from developing and play-testing Egg Brain’s Gravity game. The first concerns the controls. My original design mimicked Impossible Pong’s one-touch controls, tap anywhere to change the direction of the paddle. But when I thrust a prototype onto my patient wife, she immediately reverted to a two-touch mode, tap left to make the paddle go left, tap right to make the paddle go right. And she was frustrated when this intuitive control scheme conflicted with the one-touch controls I had implemented.

Incidentally, this echoes some feedback I was given on my 2014 game Shmoober, which also had a single button that switched the little toaster’s direction.  The feedback was: make it two separate buttons, left and right!  In hindsight, I think Shmoober, Impossible Pong, and Egg Brain’s Gravity all fell into the trap of trying to simplify user interface, while actually making it more complicated. While reducing the left-right action to a single button seems like a simplification from the developer’s perspective, from the player’s perspective, it actually makes a more complicated, less-intuitive interface. In contrast, a two-button left-right scheme just feels right, and doesn’t require any learning on the player’s part. Despite multiplying the number of inputs, it actually reduces the complexity of the controls.

With that feedback on my Gravity prototype, I quickly saw the light! The released version of Egg Brain’s Gravity uses two-button controls, and the game is better for it. Super Gravity Pong will have two-button controls as well.

The second lesson I learned from making Egg Brain’s Gravity game is that odd shapes are oddly fun! Egg Brain’s Gravity trades the plain white circle for an egg shape. The choice was not deliberate: I used an egg shape in Gravity only because the rest of the game features eggs to fit a loose Easter theme (for a Spring release).  In a physics context, the egg is interesting for two reasons.  One, it has an irregular perimeter, meaning it’s interaction with the paddle (and walls) will vary depending on which part of the egg makes contact. Two, it has an irregular center of mass due to its larger bottom and smaller top. This leads to interesting emergent equilibria, such as a pogo-stick-like pattern where the egg remains upside-down, bouncing on its tip for several hits.

Super Gravity Pong: Main Idea

In Super Gravity Pong, I will take these lessons from Egg Brain’s Gravity and incorporate them into a full game focusing on the gravity pong concept. The main idea is to follow this notion of “odd shapes are fun” wherever it leads me. If we can have eggs, then certainly we can have beach balls, bananas, bats (with wings!), fish (that flop), and more.

And once we open up the possibilities for the object we are hitting, we also expand to possibilities for the objectives of gameplay. How many hits can you get without dropping? How long can you keep the ball in the air? How many can you juggle at once? Can you aim the beach ball to collect coins and tokens, or trigger buttons which affect other objects in the physics world? Can you aim the fish to land in a bucket? And so on.

Next week I will start iterating on the design of Super Gravity Pong, beginning with some experimentation putting different shapes into my pong physics world. Look forward to a full report next week! (Update: the next post is here). In the meantime, I leave you with a little audio soundbite of (a first draft) of Super Gravity Pong’s theme song (apologies for Leila chirping in the background!).