FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.49k stars 339 forks source link

Black Screen #583

Closed meanbeanmachine closed 5 months ago

meanbeanmachine commented 5 months ago

When I run the game inside the editor, the game looks as expected.

When I run/build the game using cargo run --package executor --release, the game looks as expected.

When I run the game via the "executor" binary, the game is just a black screen. The terminal doesn't display any warnings or errors, just the usual wall of INFO text. Is the "executor" binary not the binary that is supposed to be shipped?

meanbeanmachine commented 5 months ago

Using Pop OS 22.04

mrDIMAS commented 5 months ago

Your executable must be at the root folder of your game folder, where the root Cargo.toml is located. When you cargo run --package executor --release, it uses the root folder as a working directory, but the actual executable is located in target/release/ folder (or similar).

mrDIMAS commented 5 months ago

I forgot to explain what's happening - your game can't find the assets because your executable is located elsewhere. The engine should warn about this, but it seems that this message got lost. I'll fix that.

meanbeanmachine commented 5 months ago

Ok. I just bundled the Data folder and binary together, and the game runs as expected. So yeah, this info should be in a warning and probably also in your book under a Publishing/Distributing/whatever section. Thanks.