STEP 17 OF 67 · YOU ARE THE GAMEPLAY PROGRAMMER
Build the gameplay structure
Keep the player, the game rules, the interface and saved data in separate pieces. One giant script is how projects become impossible to fix.
How to do it
- Player behavior in the Character.
- Input and camera in the PlayerController.
- Rules (win, lose, score) in the GameMode and GameState.
- Interface in widgets, saved data in a SaveGame.
How AI speeds this up
Ask Duke to write the Blueprint or C++ for any rule from your step 5 list. It explains every part, so you learn as you build.
Example from a sample game
Ashfall: BP_Kaia, PC_Ashfall, GM_Outpost, GS_Outpost, WBP_HUD, SG_Progress.
Before you move on
In Duke Forger, this step's gate checks:
- You confirm itCharacter, PlayerController, GameMode and GameState are separate
- You confirm itEach rule from step 5 lives in one clear place
Words to know
- Gameplay framework
- Unreal's set of building blocks (Character, PlayerController, GameMode, GameState) that keep a game organized.
- GameMode
- The Unreal piece that holds the rules of the game: how you win, lose and respawn.
- Character
- In Unreal, the Character class is the piece that holds a moving person: its body, movement and abilities.
Do step 17 on your own game
Start freeIncluded in Creator, Academy and Studio. Duke drafts it with you and checks it before step 18 opens.