I’m a Unity Engine Developer trying to learn Unreal Engine. So I decided to make a VR Carnival comprised of your typical carnival games to learn the basics of Unreal Engine development.
***Note: I’m a Unity developer, so most of these terms are going to be in Unity vocabulary instead of Unreal. The entirety of this series will be like this as I’m targeting myself and other Unity developers.***
What I’m making
So to start off, I’ll give some clarity around what I’m doing; I talk about my “why I’m doing this” in-depth in a previous post. But in summary: I want to learn Unreal, and the best way for me to learn is to do. And, the best way for me to do is to solidify an idea for a game and execute it. The game idea is Carnival VR; I only realized weeks later that this game kinda already exists but who cares this is for me to learn.
Why choose VR and why a carnival game? Well, VR/AR, XR, whatever we call it next year, is the industry that I mainly work in. And since phone development is a pain and I don’t want to think about optimization until I have a solid foundation for development, I decided to tackle VR first. Now, I chose to build a carnival because carnival games have interesting interaction mechanics with straight forward designs. Throwing a ball, throwing a ring, hitting a lever with a mallet, aiming a device projectile at a target, all of these interactions will force me to learn how to manipulate objects in different ways and allow me to explore how interaction systems can be built in Unreal. Carnivals are also colorful and loud, giving me the opportunity to learn how materials in UE4 work as well as sound. Also, it seems fun!
So out of all the different carnival games, I could choose I decided to go with the Clown Teeth game… It sounds a bit weird and scary but I swear it’s fun, at least I think I remember having fun.
This game has a bunch of basic mechanics and foundational systems that I want to learn:
- General Lighting
- Creating Collidables and Collision Events
- Object to Object communication
- Physics Constraints
- Picking up and throwing objects
- Game Manager
This list can also be applied to any game in general and is scalable for developing the other carnival games.
Architecture and Design
So I’ll briefly discuss how I’m thinking about architecting this game. I feel like architecture and design are left out of a bunch of tutorials but I like having it in here since it will give you the answer of WHY am I deciding to make the thing in a specific way.
For this game I want the player to be able to “Throw” a set number of “balls” (let’s start with 3), at “Clown Teeth” (let’s start with 4) that will be a set distance from the player (let’s start with 3 meters). I also want the “score” to be displayed at all times for the user. End conditions for the game are either 1) All the balls have been thrown 2) All the teeth have fallen over or 3) The player leaves the game. When the game ends on a win condition a “particle” or “lighting” effect will trigger; when the game ends on a loose condition a different “particle” or “lighting” effect will trigger. The game restarts when the user hits the “restart/start button”.
Components / Requirements
Great now that we know what we want to make I’ll list out what we’ll need for this game:
- Paddle GameObject to act as the teeth – x4
- Ball GameObject to act as the ball – x3
- Reset/Start Game Button to reset the game
- A table to spawn the ball objects
- UI to display Score
- Particle/Lighting TBD – x2
Architecture is just defining how classes will be structured and what the relationship between scripts will be.
I’m not going to draw a UML, this is just a brief description:
Paddle, will be the generic logic for the Teeth. I want this to be generic because I know other carnival games have objects that act like these teeth paddles. In my mind, that means Paddle will be a base object that others can extend from OR will be made with an interface that other game’s paddles will use.
Ball, is very generic. Many games have balls, so whatever logic I use to make this object pick-up-able (sp?) and throwable must be reusable everywhere. I’m thinking of extending whatever generic pick up and throw functionality that might come in the VR starter pack. Ball’s will also have to be destroyed after a period of time or after going out of some boundary.
Both Ball and Paddle need to collide with each other. The paddle will own the collision event and tell its game manager that it has been hit. This means that paddle needs a reference to the game it’s a part of OR the GameManager needs to only listen to events from Paddles it owns. I’ll probably start with the first suggestion for ease of development but will need to change it in the future.
Game Manager, needs to handle score logic and reset logic. So when a paddle has been hit, if the manager cares, it will handle the logic of how that hit affects the score. It also needs to tell the UI to update with the new score value. When the user hits the reset button, the Game Manager needs to reset everything. Meaning it has a reference to the ball spawn points and the initial position and orientation of all the paddles. Because many games will have this similar logic I also would want to create an Interface for Game Managers.
Reset Button, needs to interact with the user’s hand. It also needs to tell the Game Manager that a reset has been requested. This will also be in many games so it will also need an interface.
And that’s where I’ll leave it for now.
So I’m making this game in Unreal Engine to learn Unreal Engine. It’s a game that is comprised of a bunch of mini-games. Cool.
I’m not sure how to sign off on these posts yet. But I’ll just say, thanks for reading.
You can watch the journey live on Twitch: https://www.twitch.tv/thenappingkat/
And you can follow on Twitter @KatVHarris
The Napping Kat