Skip to content

Commit 22802b3

Browse files
committed
[Readme] Updated startergame and demo game with examples
1 parent 3cbcd25 commit 22802b3

File tree

3 files changed

+52
-34
lines changed

3 files changed

+52
-34
lines changed

README.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,7 @@ If you run into any issues or have questions, please don’t hesitate to open an
147147

148148
---
149149

150-
## High-Level API Overview
151-
152-
The Untold Engine offers an intuitive API for game development. Here's a quick look:
153-
154-
```swift
155-
let stadium = createEntity()
156-
setEntityMesh(entityId: stadium, filename: "stadium", withExtension: "usdc")
157-
translateBy(entityId: stadium, position: simd_float3(0.0, 0.0, 0.0))
158150

159-
let player = createEntity()
160-
setEntityMesh(entityId: player, filename: "redplayer", withExtension: "usdc", flip: false)
161-
setEntityAnimations(entityId: player, filename: "running", withExtension: "usdc", name: "running")
162-
changeAnimation(entityId: player, name: "running") // Start animation
163-
setEntityKinetics(entityId: player) // Enable Physics System
164-
```
165-
---
166151

167152
# Untold Engine Architecture — Summary
168153

@@ -187,35 +172,50 @@ This separation of entities, components, and systems keeps the codebase modular,
187172

188173
---
189174

190-
## Using the Untold Engine
175+
## Using the Untold Engine
191176

192-
The Untold Engine is powered by modular systems that simplify game development. Click on the links to get started.
177+
The Untold Engine is powered by modular systems that simplify game development. Click on the links to get started.
193178

194-
### Editor & Workflow
179+
### Editor & Workflow
195180

196-
⚠️ **Important** The Editor is now the primary way to initialize and manage entities.
181+
**For your convenience**: The Untold Engine provides an Editor that makes it easy to import assets, set up entities, and manage scenes — all without writing code.
197182

198183
- [Editor Overview](docs/editoroverview.md): Walkthrough of Scene Graph, Inspector, Gizmos, Materials, Lighting, Post-Processing, Asset Browser, and Console.
199184
- [How to Import Assets](docs/importingassetseditor.md): Learn how to set asset paths and import models, materials, and animations.
200185

201-
### How-To Guides
202-
- [Adding a model using the Editor](docs/addModelUsingEditor.md): Learn how to add a model using the editor
203-
- [Adding an animation using the Editor](docs/addAnimationsUsingEditor.md): Learn how to link an animation to the model using the editor (Coming Soon)
186+
### How-To Guides
187+
- [Adding a model using the Editor](docs/addModelUsingEditor.md)
188+
- [Adding an animation using the Editor](docs/addAnimationsUsingEditor.md) (Coming Soon)
204189

205-
⚠️ **Important**: Entities should be created and configured in the Editor. Code is used for gameplay logic only.
190+
💡 **Note**: The Editor is optional. You can also load models, link animations, attach components, and configure entities directly in code. See the **Systems** section below for details.
206191

207-
### Systems
208-
- [Registration-ECS System](docs/UsingRegistrationSystem.md): Handles the creation of entities and components
209-
- [Rendering System](docs/UsingRenderingSystem.md): Render 3D models with support for PBR and custom shaders.
210-
- [Transform System](docs/UsingTransformSystem.md): Manage entity positions, rotations, and scales.
211-
- [Animation System](docs/UsingAnimationSystem.md): Add life to your models with skeletal animations.
212-
- [Physics System](docs/UsingPhysicsSystem.md): Simulate gravity, forces, and movement.
213-
- [Input System](docs/UsingInputSystem.md): Capture keyboard and mouse interactions.
214-
- [Steering System](docs/UsingSteeringSystem.md): Implement intelligent behaviors like path-following.
215-
- [Scenegraph](docs/UsingScenegraph.md): Enables parent-child relationships between entities
216-
- [Shaders](docs/shaders.md): Add or modify shaders to fit your game's stye.
192+
### Systems
193+
- [Registration-ECS System](docs/UsingRegistrationSystem.md): Handles the creation of entities and components.
194+
- [Rendering System](docs/UsingRenderingSystem.md): Render 3D models with support for PBR and custom shaders.
195+
- [Transform System](docs/UsingTransformSystem.md): Manage entity positions, rotations, and scales.
196+
- [Animation System](docs/UsingAnimationSystem.md): Add life to your models with skeletal animations.
197+
- [Physics System](docs/UsingPhysicsSystem.md): Simulate gravity, forces, and movement.
198+
- [Input System](docs/UsingInputSystem.md): Capture keyboard and mouse interactions.
199+
- [Steering System](docs/UsingSteeringSystem.md): Implement intelligent behaviors like path-following.
200+
- [Scenegraph](docs/UsingScenegraph.md): Enables parent-child relationships between entities.
201+
- [Shaders](docs/shaders.md): Add or modify shaders to fit your game’s style.
202+
- [Importing Assets](docs/ImportingAssetFiles.md): Importing assets into your game project.
217203

218-
- [Importing Assets](docs/ImportingAssetFiles.md): Importing assets into your game project
204+
## High-Level API Overview
205+
206+
The Untold Engine offers an intuitive API for game development. Here's a quick look:
207+
208+
```swift
209+
let stadium = createEntity()
210+
setEntityMesh(entityId: stadium, filename: "stadium", withExtension: "usdc")
211+
translateBy(entityId: stadium, position: simd_float3(0.0, 0.0, 0.0))
212+
213+
let player = createEntity()
214+
setEntityMesh(entityId: player, filename: "redplayer", withExtension: "usdc", flip: false)
215+
setEntityAnimations(entityId: player, filename: "running", withExtension: "usdc", name: "running")
216+
changeAnimation(entityId: player, name: "running") // Start animation
217+
setEntityKinetics(entityId: player) // Enable Physics System
218+
```
219219
---
220220

221221
## Visuals

Sources/DemoGame/main.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class GameScene {
1313
if let desktopURL = FileManager.default.urls(for: .desktopDirectory, in: .userDomainMask).first {
1414
assetBasePath = desktopURL.appendingPathComponent("DemoGameAssets")
1515
}
16+
17+
//Take a look at the DribblingSystem and BallSystem (inside `Sources/DemoGame`) to see how the game is structured and get familiar with the Untold Engine API.
1618

1719
// The Untold Engine uses an ECS (Entity–Component–System) architecture.
1820
// This means you can extend the engine by adding your own custom

Sources/StarterGame/main.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ class GameScene {
1313
assetBasePath = desktopURL.appendingPathComponent("DemoGameAssets")
1414
}
1515

16+
// Note: You’re not limited to the editor for setting up entities.
17+
// The editor provides a visual workflow, but you can also create and
18+
// configure everything directly in code if that’s your preference.
19+
// Here is an example. For more details, see:
20+
// https://github.com/untoldengine/UntoldEngine?tab=readme-ov-file#systems
21+
22+
let stadium = createEntity()
23+
setEntityMesh(entityId: stadium, filename: "stadium", withExtension: "usdc")
24+
translateBy(entityId: stadium, position: simd_float3(0.0, 0.0, 0.0))
25+
26+
let player = createEntity()
27+
setEntityMesh(entityId: player, filename: "redplayer", withExtension: "usdc", flip: false)
28+
rotateTo(entityId: player, angle: 0, axis: simd_float3(0.0,1.0,0.0))
29+
setEntityAnimations(entityId: player, filename: "running", withExtension: "usdc", name: "running")
30+
changeAnimation(entityId: player, name: "running") // Start animation
31+
1632
}
1733

1834
func update(deltaTime _: Float) {

0 commit comments

Comments
 (0)