Skip to main content
Version: 4.2.0

Bouncing Ball

Leverage 3D physics to create a fun and interactive endless runner bouncing ball game!

demo

Open the Template

To use the template in your Effect House project:

  1. Go to Templates
  2. Click the Screen tab
  3. Select the Bouncing Ball template
demo

Hierarchy

There are three render groups in the Hierarchy panel:

  1. The General render group contains the major components of the bouncing ball game, like the platforms, power-ups, ball, and so on.
  2. The UI Effects render group contains the score background and text as well as the swipe prompt at the start of the game.
  3. The Power Up Post Effects render group applies a chromatic aberration effect when the ball comes in contact with the power up on the screen.
demo

Assets

The Assets panel contains the built-in assets for this template. Replace them with your own materials and textures to customize the game.

demo

Visual Scripting

The Bouncing Ball Controller subgraph contains the core logic of the game. You can adjust the settings in this subgraph to alter the functionality of the game.

demo

Each option works as follows:

  • Enable Camera Move: When checked, the camera moves with and follows the ball as it bounces on the platforms. When unchecked, the camera is kept in the same position.
  • Move Smoothness: How smooth the movement of the camera is as it tracks the bouncing ball
  • Enable Background: When unchecked, the camera input will be displayed as the background. When checked, the camera input will be removed and the background texture of the game, which can be found and replaced in the Assets panel, will be displayed.
  • Amount of Platforms: The amount of platforms the player can draw on the screen before they disappear and reset. This property has a minimum of 1 platform and a maximum of 4 platforms.
  • Scale: How large the drawn platform is
  • Length: How long the drawn platform is
  • Bounce Power: How strong the power applied to the ball is when it bounces on the platform
  • Spawn Random Time: A random time, between the set x and y values, that the power up will appear in the game. In this example, the first power up will appear between the first 5-10 seconds of the game. After the ball comes in contact with the first power up, the next one will appear within another 5-10 seconds of the game.
  • Force Power: How strong the power up's force is
  • Screen Effect Power: How strong the chromatic aberration post effect applied to the power up is. Set to 0 if you'd like to remove this effect.

Click into this subgraph to learn more about the game's settings. Modify the logic to fit your own game's requirements!

Customize the Ball

You can also adjust the settings of the bouncing ball to fine-tune its behavior and movement within the game.

  1. Go to the Hierarchy panel
  2. Select the Ball object
  3. Change the settings of the Rigid Body component, found in the Inspector panel
demo