Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

first-person

The engine’s First Person template, playable as it comes with keyboard and mouse, gamepad or touch: its character with first person arms and camera, camera manager, game mode and player controller are Rust classes, and their Blueprint children keep the meshes, animations and input assets.

rusteal new MyGame --template first-person

From TP_FirstPerson, the engine template it is made of.

Playing it

Open the project and press Play: WASD / left stick move, mouse / right stick look, Space / A jump.

Its classes

The Rust classes are in Rust/<crate>/src/; their Blueprint children, under the engine template’s names, are in Content/.

ClassParentFile
FirstPersonCameraManagerPlayerCameraManagersrc/camera_manager.rs
FirstPersonCharacterCharactersrc/character.rs
FirstPersonGameModeGameModeBasesrc/game_mode.rs
FirstPersonPlayerControllerPlayerControllersrc/player_controller.rs

Variants

Each variant is a project of its own: the template plus the variant, opening on the variant’s level.

horror

A dark level explored with a flashlight, and a sprint that runs on stamina, its meter on screen.

rusteal new MyGame --template first-person --variant horror

It opens /Game/Variant_Horror/Lvl_Horror. To play: WASD / left stick move, mouse / right stick look, Space / A jump, hold Shift / LB sprint.

Its own classes, next to the template’s, in a module named after it:

ClassParentFile
HorrorCharacterFirstPersonCharactersrc/horror/character.rs
HorrorGameModeGameModeBasesrc/horror/game_mode.rs
HorrorPlayerControllerPlayerControllersrc/horror/player_controller.rs
HorrorUIUserWidgetsrc/horror/ui.rs

shooter

An arena shooter: weapon pickups described by a data table, projectiles and grenades, team scores, and NPCs run by a StateTree that sense their enemies, snipe and shoot.

rusteal new MyGame --template first-person --variant shooter

It opens /Game/Variant_Shooter/Lvl_Shooter. To play: WASD / left stick move, mouse / right stick look, Space / A jump, left click / RT shoot, Left Shift / Y switch weapons.

Its own classes, next to the template’s, in a module named after it:

ClassParentFile
ShooterAIControllerAIControllersrc/shooter/ai_controller.rs
ShooterCharacterFirstPersonCharactersrc/shooter/character.rs
EnvQueryContextTargetEnvQueryContext_BlueprintBasesrc/shooter/env_query.rs
ShooterGameModeGameModeBasesrc/shooter/game_mode.rs
ShooterNPCFirstPersonCharactersrc/shooter/npc.rs
ShooterNPCSpawnerActorsrc/shooter/npc_spawner.rs
ShooterPickupActorsrc/shooter/pickup.rs
WeaponTableRowa structsrc/shooter/pickup.rs
ShooterPlayerControllerPlayerControllersrc/shooter/player_controller.rs
ShooterProjectileActorsrc/shooter/projectile.rs
StateTreeLineOfSightToTargetConditionStateTreeConditionBlueprintBasesrc/shooter/state_tree.rs
StateTreeFaceActorTaskStateTreeTaskBlueprintBasesrc/shooter/state_tree.rs
StateTreeFaceLocationTaskStateTreeTaskBlueprintBasesrc/shooter/state_tree.rs
StateTreeSetRandomFloatTaskStateTreeTaskBlueprintBasesrc/shooter/state_tree.rs
StateTreeShootAtTargetTaskStateTreeTaskBlueprintBasesrc/shooter/state_tree.rs
StateTreeSenseEnemiesTaskStateTreeTaskBlueprintBasesrc/shooter/state_tree.rs
ShooterUIUserWidgetsrc/shooter/ui.rs
ShooterBulletCounterUIUserWidgetsrc/shooter/ui.rs
ShooterWeaponActorsrc/shooter/weapon.rs

Recipes taken from it: Character movement and input, Cameras, Projectiles and weapons.