SlideShare a Scribd company logo
1 of 24
Download to read offline
AMETHYST:
THE GEM IN THE RUST
RUST NYC OCTOBER MEETUP 2018
LUCIO FRANCO
INTRODUCTION
TOPICS
▸ What is a game engine?
▸ What is Amethyst?
▸ How does Rust help?
INTRODUCTION
WHAT IS A GAME ENGINE?
▸ Collection of libraries
▸ Provides support for windowing, rendering, input and more
▸ Large code base with many moving parts
▸ Engine components are often tightly coupled
▸ Hard to parallelize
INTRODUCTION
WHAT IS AMETHYST?
▸ Core engine that glues everything together
▸ Collection of crates (modules)
▸ Powered by an Entity Component System (ECS) model
▸ Data oriented/Data driven
▸ Parallelism at its core
▸ Focused on reusability and clean interfaces
WHAT IS AMETHYST?
DATA-ORIENTED
▸ Programming paradigm
▸ Exploits modern hardware
▸ Pipelining
▸ Modularity
▸ Parallelism
DATA-DRIVEN
‣ Software design style
‣ Easier hot reloading
‣ Easier prototyping
‣ Scales better
‣ Better organization of game logic
HISTORY
THE PAST
▸ Created by Eyal Kalderon (@ebkalderon) in early 2016
▸ Started growing rapidly in early-mid 2016
▸ Specs was born (Specs Parallel ECS)
▸ Shred was born shortly after (Shared Resource Dispatcher)
HISTORY
THE PRESENT
▸ Growing as the #1 Rust all-purpose modular game engine
▸ 33.7K Lines of Code
▸ 14 crates in the main repo, with many more externally
▸ A book! (still a work in progress)
▸ 22 Examples
▸ Supports Windows, MacOS and Linux
HISTORY
THE PRESENT
▸ Rendering powered by gfx pre-ll
▸ Controllers and gamepads
▸ glTF - “JPEG of the 3D world”
▸ Networking/Multiplayer
▸ UI
▸ 3D and 2D Animation
▸ Parallel ECS (Specs)
▸ Input abstractions
▸ Configuration loading through
RON
▸ Asset loading with hot-
reloading
▸ State manager
AND MORE!
HISTORY
THE FUTURE
▸ New renderer that is built off of Vulkan like APIs (gfx-hal and ash)
▸ More robust networking
▸ Editor
▸ Scripting
▸ WASM and WebGL
▸ iOS and Android support
▸ REPL
HOW DOES RUST HELP?
HOW DOES RUST HELP?
PARALLELIZATION
▸ Entity Component Systems
▸ Efficient usage of Vulkan and Metal
▸ Framegraphs
▸ More writing code, less tracing data races and segfaults
HOW DOES RUST HELP?
COMPILER
▸ Type and safety checking
▸ Trait composition
▸ Type inference
▸ Bugs
HOW DOES RUST HELP?
CARGO
▸ Build
▸ Run
▸ Test
▸ Benchmark
▸ Docs
▸ Dependency management
EXAMPLES
EXAMPLES
HELLO, WORLD! impl EmptyState for Example {
fn on_start(&mut self, _: StateData<()>) {
println!("Begin!");
}
fn on_stop(&mut self, _: StateData<()>) {
println!("End!");
}
fn update(&mut self, _: StateData<()>) -> EmptyTrans {
println!("Hello from Amethyst!");
Trans::Quit
}
}
EXAMPLES
RUST OBJECT NOTATION (RON) Scene( // class name is optional
materials: { // this is a map
"metal": (
reflectivity: 1.0,
),
"plastic": (
reflectivity: 0.5,
),
},
entities: [ // this is an array
(
name: "hero",
material: "metal",
),
(
name: "monster",
material: "plastic",
),
],
)
EXAMPLES
ECS: COMPONENTS
struct Vel(f32);
impl Component for Vel {
type Storage = VecStorage<Self>;
}
#[derive(Component, Debug)]
#[storage(DenseVecStorage)]
struct Pos(f32, f32, f32);
EXAMPLES
ECS: SYSTEMS struct TransformSystem;
impl<'a> System<'a> for TransformSystem {
type SystemData = (WriteStorage<'a, Pos>, ReadStorage<'a, Vel>);
fn run(&mut self, (mut pos, vel): Self::SystemData) {
// The `.join()` combines multiple components,
// so we only access those entities which have
// both of them.
for (pos, vel) in (&mut pos, &vel).join() {
pos.0 += vel.0;
}
}
}
EXAMPLES
EDITOR
EXAMPLES
ANIMATIONS
BENCHMARKS
BUNNYMARK
▸ cart/amethyst-bunnymark
▸ In can render 109,800 bunny sprites
▸ Godot3 max is 60,120
▸ This is not totally fair, but is promising
▸ A lot of room for improvement
BENCHMARKS
ECS BENCH
AND MORE!
COME JOIN US!
https://amethyst.rs
https://github.com/amethyst
https://discord.gg/GnP5Whs
QUESTIONS?

More Related Content

What's hot

Jan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkJan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript framework
Develcz
 

What's hot (20)

#OSATH Deploy OpenStack: DevStack
#OSATH Deploy OpenStack: DevStack#OSATH Deploy OpenStack: DevStack
#OSATH Deploy OpenStack: DevStack
 
クリーンな開発環境をDockerで作ろう
クリーンな開発環境をDockerで作ろうクリーンな開発環境をDockerで作ろう
クリーンな開発環境をDockerで作ろう
 
Ecs gitlab runners
Ecs gitlab runnersEcs gitlab runners
Ecs gitlab runners
 
Programatically getting stock data with R
Programatically getting stock data with RProgramatically getting stock data with R
Programatically getting stock data with R
 
Data storage in clouds
Data storage in cloudsData storage in clouds
Data storage in clouds
 
Jan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript frameworkJan Čurn: Meteor: the full-stack JavaScript framework
Jan Čurn: Meteor: the full-stack JavaScript framework
 
Swift and the BigData
Swift and the BigDataSwift and the BigData
Swift and the BigData
 
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
Making your elastic cluster perform - Jettro Coenradie - Codemotion Amsterdam...
 
Scalable Event Tracking
Scalable Event TrackingScalable Event Tracking
Scalable Event Tracking
 
To AWS with Ansible
To AWS with AnsibleTo AWS with Ansible
To AWS with Ansible
 
Lessons Learned at Wakoopa
Lessons Learned at WakoopaLessons Learned at Wakoopa
Lessons Learned at Wakoopa
 
Axemblr Provisionr 0.3.x Overview
Axemblr Provisionr 0.3.x OverviewAxemblr Provisionr 0.3.x Overview
Axemblr Provisionr 0.3.x Overview
 
Terraform
TerraformTerraform
Terraform
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karban
 
Niwa cloud
Niwa cloudNiwa cloud
Niwa cloud
 
Nodejs web,db,hosting
Nodejs web,db,hostingNodejs web,db,hosting
Nodejs web,db,hosting
 
Aurinko
AurinkoAurinko
Aurinko
 
Lab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQLLab Manual reModernize - Updating and Consolidating MySQL
Lab Manual reModernize - Updating and Consolidating MySQL
 
Dius ecs presentation
Dius ecs presentationDius ecs presentation
Dius ecs presentation
 
Cyansible
CyansibleCyansible
Cyansible
 

Similar to Amethyst: The Gem in the Rust

In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
Gianmario Spacagna
 
Introduction to apache_cassandra_for_developers-lhg
Introduction to apache_cassandra_for_developers-lhgIntroduction to apache_cassandra_for_developers-lhg
Introduction to apache_cassandra_for_developers-lhg
zznate
 

Similar to Amethyst: The Gem in the Rust (20)

In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
In-Memory Logical Data Warehouse for accelerating Machine Learning Pipelines ...
 
LAMP Stack (Reloaded) - Infrastructure as Code with Terraform & Packer
LAMP Stack (Reloaded) - Infrastructure as Code with Terraform & PackerLAMP Stack (Reloaded) - Infrastructure as Code with Terraform & Packer
LAMP Stack (Reloaded) - Infrastructure as Code with Terraform & Packer
 
Introduction to apache_cassandra_for_developers-lhg
Introduction to apache_cassandra_for_developers-lhgIntroduction to apache_cassandra_for_developers-lhg
Introduction to apache_cassandra_for_developers-lhg
 
Edge performance with in memory nosql
Edge performance with in memory nosqlEdge performance with in memory nosql
Edge performance with in memory nosql
 
Amethyst: Past, Present, Future
Amethyst: Past, Present, FutureAmethyst: Past, Present, Future
Amethyst: Past, Present, Future
 
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
 
At the Crossroads of HPC and Cloud Computing with Openstack
At the Crossroads of HPC and Cloud Computing with OpenstackAt the Crossroads of HPC and Cloud Computing with Openstack
At the Crossroads of HPC and Cloud Computing with Openstack
 
Cluj.DevOps Meetup - Code your Infrastructure
Cluj.DevOps Meetup - Code your InfrastructureCluj.DevOps Meetup - Code your Infrastructure
Cluj.DevOps Meetup - Code your Infrastructure
 
Not only SQL
Not only SQL Not only SQL
Not only SQL
 
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
Ingesting Over Four Million Rows Per Second With QuestDB Timeseries Database ...
 
Ajug april 2011
Ajug april 2011Ajug april 2011
Ajug april 2011
 
Improving velocity through abstraction
Improving velocity through abstractionImproving velocity through abstraction
Improving velocity through abstraction
 
2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...
2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...
2019-09-25 Paris Time Series Meetup - Warp 10 - Advanced Time Series Technolo...
 
Clogeny Hadoop ecosystem - an overview
Clogeny Hadoop ecosystem - an overviewClogeny Hadoop ecosystem - an overview
Clogeny Hadoop ecosystem - an overview
 
Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?
 
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNEGenerating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
Generating Recommendations at Amazon Scale with Apache Spark and Amazon DSSTNE
 
php
phpphp
php
 
WebWorkersCamp 2010
WebWorkersCamp 2010WebWorkersCamp 2010
WebWorkersCamp 2010
 
Technical overview of Azure Cosmos DB
Technical overview of Azure Cosmos DBTechnical overview of Azure Cosmos DB
Technical overview of Azure Cosmos DB
 
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
Accelerating Machine Learning Pipelines with Alluxio at Alluxio Meetup 2016
 

Recently uploaded

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Recently uploaded (20)

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
CompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdfCompTIA Security+ (Study Notes) for cs.pdf
CompTIA Security+ (Study Notes) for cs.pdf
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 

Amethyst: The Gem in the Rust

  • 1. AMETHYST: THE GEM IN THE RUST RUST NYC OCTOBER MEETUP 2018 LUCIO FRANCO
  • 2. INTRODUCTION TOPICS ▸ What is a game engine? ▸ What is Amethyst? ▸ How does Rust help?
  • 3. INTRODUCTION WHAT IS A GAME ENGINE? ▸ Collection of libraries ▸ Provides support for windowing, rendering, input and more ▸ Large code base with many moving parts ▸ Engine components are often tightly coupled ▸ Hard to parallelize
  • 4. INTRODUCTION WHAT IS AMETHYST? ▸ Core engine that glues everything together ▸ Collection of crates (modules) ▸ Powered by an Entity Component System (ECS) model ▸ Data oriented/Data driven ▸ Parallelism at its core ▸ Focused on reusability and clean interfaces
  • 5. WHAT IS AMETHYST? DATA-ORIENTED ▸ Programming paradigm ▸ Exploits modern hardware ▸ Pipelining ▸ Modularity ▸ Parallelism DATA-DRIVEN ‣ Software design style ‣ Easier hot reloading ‣ Easier prototyping ‣ Scales better ‣ Better organization of game logic
  • 6. HISTORY THE PAST ▸ Created by Eyal Kalderon (@ebkalderon) in early 2016 ▸ Started growing rapidly in early-mid 2016 ▸ Specs was born (Specs Parallel ECS) ▸ Shred was born shortly after (Shared Resource Dispatcher)
  • 7. HISTORY THE PRESENT ▸ Growing as the #1 Rust all-purpose modular game engine ▸ 33.7K Lines of Code ▸ 14 crates in the main repo, with many more externally ▸ A book! (still a work in progress) ▸ 22 Examples ▸ Supports Windows, MacOS and Linux
  • 8. HISTORY THE PRESENT ▸ Rendering powered by gfx pre-ll ▸ Controllers and gamepads ▸ glTF - “JPEG of the 3D world” ▸ Networking/Multiplayer ▸ UI ▸ 3D and 2D Animation ▸ Parallel ECS (Specs) ▸ Input abstractions ▸ Configuration loading through RON ▸ Asset loading with hot- reloading ▸ State manager AND MORE!
  • 9. HISTORY THE FUTURE ▸ New renderer that is built off of Vulkan like APIs (gfx-hal and ash) ▸ More robust networking ▸ Editor ▸ Scripting ▸ WASM and WebGL ▸ iOS and Android support ▸ REPL
  • 10. HOW DOES RUST HELP?
  • 11. HOW DOES RUST HELP? PARALLELIZATION ▸ Entity Component Systems ▸ Efficient usage of Vulkan and Metal ▸ Framegraphs ▸ More writing code, less tracing data races and segfaults
  • 12. HOW DOES RUST HELP? COMPILER ▸ Type and safety checking ▸ Trait composition ▸ Type inference ▸ Bugs
  • 13. HOW DOES RUST HELP? CARGO ▸ Build ▸ Run ▸ Test ▸ Benchmark ▸ Docs ▸ Dependency management
  • 15. EXAMPLES HELLO, WORLD! impl EmptyState for Example { fn on_start(&mut self, _: StateData<()>) { println!("Begin!"); } fn on_stop(&mut self, _: StateData<()>) { println!("End!"); } fn update(&mut self, _: StateData<()>) -> EmptyTrans { println!("Hello from Amethyst!"); Trans::Quit } }
  • 16. EXAMPLES RUST OBJECT NOTATION (RON) Scene( // class name is optional materials: { // this is a map "metal": ( reflectivity: 1.0, ), "plastic": ( reflectivity: 0.5, ), }, entities: [ // this is an array ( name: "hero", material: "metal", ), ( name: "monster", material: "plastic", ), ], )
  • 17. EXAMPLES ECS: COMPONENTS struct Vel(f32); impl Component for Vel { type Storage = VecStorage<Self>; } #[derive(Component, Debug)] #[storage(DenseVecStorage)] struct Pos(f32, f32, f32);
  • 18. EXAMPLES ECS: SYSTEMS struct TransformSystem; impl<'a> System<'a> for TransformSystem { type SystemData = (WriteStorage<'a, Pos>, ReadStorage<'a, Vel>); fn run(&mut self, (mut pos, vel): Self::SystemData) { // The `.join()` combines multiple components, // so we only access those entities which have // both of them. for (pos, vel) in (&mut pos, &vel).join() { pos.0 += vel.0; } } }
  • 21. BENCHMARKS BUNNYMARK ▸ cart/amethyst-bunnymark ▸ In can render 109,800 bunny sprites ▸ Godot3 max is 60,120 ▸ This is not totally fair, but is promising ▸ A lot of room for improvement
  • 23. AND MORE! COME JOIN US! https://amethyst.rs https://github.com/amethyst https://discord.gg/GnP5Whs