Description
The out-of-box experience with Amethyst tools is suboptimal due to the generated application not working properly. I was following the steps from the book and failed to get the Hello World example to work. I then tried to make a new project without changing the contents of src/main.rs which yielded the results produced in this report.
Steps to reproduce
- Create a new project:
$ amethyst new hello_world
- Move into that project and attempt to run:
$ cd hello_world
$ amethyst run
Expected result
I'd expect to see the result of having run the program. I've never used amethyst before, But I suspect the output should look something like this:
$ amethyst run
Game started!
Hello from Amethyst!
Game stopped!
Actual Result
error[E0432]: unresolved import `amethyst::engine::Application`
--> src/main.rs:3:24
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^^^^^^^ no `Application` in `engine`
error[E0432]: unresolved import `amethyst::engine::Duration`
--> src/main.rs:3:37
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^^^^ no `Duration` in `engine`
error[E0432]: unresolved import `amethyst::engine::State`
--> src/main.rs:3:47
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^ no `State` in `engine`. Did you mean to use `state`?
error[E0432]: unresolved import `amethyst::engine::Trans`
--> src/main.rs:3:54
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^ no `Trans` in `engine`
error: module `engine` is private
--> src/main.rs:3:24
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^^^^^^^
error: module `engine` is private
--> src/main.rs:3:37
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^^^^
error: module `engine` is private
--> src/main.rs:3:47
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^
error: module `engine` is private
--> src/main.rs:3:54
|
3 | use amethyst::engine::{Application, Duration, State, Trans};
| ^^^^^
error: cannot continue compilation due to previous error
error: Could not compile `hello_world`.
To learn more, run the command again with --verbose.
Error: Cargo task failed!
System information
$ rustc --version
rustc 1.17.0
$ amethyst --version
amethyst_cli 0.4.0
$ cargo --version
cargo 0.18.0 (fe7b0cdc 2017-04-24)
$ uname -a
Linux vapor 4.10.11-1-ARCH #1 SMP PREEMPT Tue Apr 18 08:39:42 CEST 2017 x86_64 GNU/Linux
Here is the contents of the src/main.rs file that the new command generated:
extern crate amethyst;
use amethyst::engine::{Application, Duration, State, Trans};
struct HelloWorld;
impl State for HelloWorld {
fn on_start(&mut self) {
println!("Game started!");
}
fn update(&mut self, _delta: Duration) -> Trans {
println!("Hello from Amethyst!");
Trans::Quit
}
fn on_stop(&mut self) {
println!("Game stopped!");
}
}
fn main() {
let mut game = Application::new(HelloWorld);
game.run();
}
Note that it's different than what the tutorial asks me to input. I was getting a different (though similar) set of errors, so wanted to do the minimal amount of work for a reproducible case.
Description
The out-of-box experience with Amethyst tools is suboptimal due to the generated application not working properly. I was following the steps from the book and failed to get the Hello World example to work. I then tried to make a new project without changing the contents of
src/main.rswhich yielded the results produced in this report.Steps to reproduce
Expected result
I'd expect to see the result of having run the program. I've never used amethyst before, But I suspect the output should look something like this:
Actual Result
System information
Here is the contents of the
src/main.rsfile that thenewcommand generated:Note that it's different than what the tutorial asks me to input. I was getting a different (though similar) set of errors, so wanted to do the minimal amount of work for a reproducible case.