Permalink
..
Failed to load latest commit information.
animation Fixed examples not building Jul 17, 2018
appendix_a Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
arc_ball_camera Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
asset_loading Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
assets Updated pong tutorial Jul 13, 2018
custom_game_data Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
fly_camera Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
gltf Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
hello_world Update examples and the book with new logger Jul 8, 2018
locale Update examples and the book with new logger Jul 8, 2018
material Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
pong Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
pong_tutorial_01 Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
pong_tutorial_02 Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
pong_tutorial_03 Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
prefab Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
renderable Fixed examples not building Jul 17, 2018
separate_sphere Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
sphere Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
sphere_multisample Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
sprites Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
ui Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
window Renamed is_key to is_key_down. Also fixed so that examples do somethi… Jul 17, 2018
README.md feat: Core support for prefab loading Jun 12, 2018

README.md

Examples

All these can be run with

cargo run --example name_of_an_example

Hello world

Shows the basics of the state machine in amethyst. This example just prints:

Begin!
Hello from Amethyst!
End!

Window

Open a window, and create a render context. Also shows basic raw input handling.

window example result

Sphere

Render a basic 3D scene, with a camera, lights and a 3D object, a sphere in this scenario. This example use a single vertex buffer with all attributes interleaved.

sphere example result

Separate sphere

Render a basic 3D scene, with a camera, lights and a 3D object, a sphere in this scenario. This example use vertex buffers per attribute.

sphere example result

Multisample sphere

Render a basic 3D scene, with a camera, lights and a 3D object, a sphere in this scenario. This example use vertex buffers per attribute. Only difference here is that multisampling is enabled in the options.

sphere example result

Renderable

Load graphics objects from disc using the asset loader. Also contains a custom system that move the camera and the scene.

renderable example result

Asset loading

Create a custom asset format, and use the asset loader to load assets using the format.

asset loading example result

Material

Render a sphere using a physically based material.

material example result

Animation

Animate a sphere using a custom built animation sampler sequence. Keybindings:

  • Space - start/pause/unpause the currentanimation(default is translational animation)
  • D - demonstrate deferred start, translate will run first, then rotate when translate ends, and last scale animation will start after rotation has run for 0.66s.
  • T - set translate to current animation
  • R - set rotate to current animation
  • S - set scale to current animation
  • H - run animation at half speed
  • F - run animation at full speed
  • V - run animation at no speed, use stepping keys for controlling the animation
  • Right - step to the next animation keyframe
  • Left - step to the previous animation keyframe

Gltf

Load a GLTF asset, attach it to an entity, and animate the asset. Press Space to start/pause the animation.

gltf example result

UI

Render a basic UI.

ui example result

Pong

Amethyst based Pong clone. In addition to using most of the features used by the other examples it also demonstrates:

  • Input handling using InputHandler
  • Background music and sound effects
  • A more interesting UI example
  • A bigger project with more than a single source file.

pong example result

Appendix A

From the book, it is a minor update to the Pong example that uses Config files instead of hardcoded constants.

example screenshot

Custom Game Data

Demonstrates how to use custom GameData, with three different states: Loading, Main, Paused.

game_data_example_result

Fly Camera

This example shows how to use the Fly Camera.

Arc ball Camera

This example shows how to use the Arc Ball Camera.

Sprites

Demonstrates how to use SpriteSheets.

example animation

Prefab

Shows how to load data using the Prefab system.