amethyst / grumpy_visitors Goto Github PK
View Code? Open in Web Editor NEW🧙♂️🧙♀️ A prototype of a top-down EvilInvasion-like 2D arcade/action (with co-op!)
Home Page: https://mvlabat.github.io/
License: MIT License
🧙♂️🧙♀️ A prototype of a top-down EvilInvasion-like 2D arcade/action (with co-op!)
Home Page: https://mvlabat.github.io/
License: MIT License
Once Amethyst's transition to it is finished
amethyst/amethyst#2278
I've compiled gv_client
with and without --release
and the screen is always blank.
On the cmdline, the following happens if I blindly click around to presumably hit the "Single player" as defined in main_menu.ron
:
[INFO][gv_game::states::loading_state] LoadingState started
[INFO][gv_game::states::menu_state] MenuState started
[INFO][gv_game::states::playing_state] PlayingState started
There is no sound. An F11 doesn't toggle fullscreen.
Any idea why this might be happening? I've checked out older commits to see if they worked, but the very earliest have different issues, and from roughly commit 0782772
it compiles but there's still a blank screen. All other showcase games work for me: evoli, pong, space-menace, space_shooter_rs.
bindings_config.ron
(set /
by default)Right now the game checks only the working directory for resources
folder. It might be counter-intuitive for people running the release on Linux or MacOS from console.
All 3 scenarios should be considered:
resources
folder has the same subpath as the running binary, but working directory is differentcargo run
for instance), while being in any directory of the project. Working directory might not be the root directory, but bins/client
for example, so we probably should check for CARGO_MANIFEST_DIR
env variable and traverse back to the rootThe fix should be implemented with std::env::set_current_dir
, as there are a lot of path references in .ron files. Otherwise we'd have to modify the values of every loaded path from .ron files during runtime
There are some systems that are good candidates for introducing a separate SystemData
struct for them: such systems require a lot of resources and pass them around their helper functions (making those functions' argument list really huge).
Some examples of bad systems:
bins/client/src/ecs/systems/input.rs
bins/client/src/ecs/systems/client_network.rs
Some examples of good systems:
libs/game/src/ecs/systems/monster/spawner.rs
Note that you shouldn't refactor all the systems in one pull request. As it's a "good first issue", just look through the systems and pick the one which you think will be feasible for you to tackle. But nothing stops you to make more than one PR, of course. :)
Right now gv_server
's main initializes the logger itself. That was needed to setup a custom formatter in order to put "[SERVER]" tag into all the server log messages. Luckily the new Amethyst update got us covered and introduced a new constructor for Logger
: from_config_formatter
.
This should fix the bug when the game is started without some of recently connected players spawned
Playing for even a minute generates an insanely large trace file that is impossible to process later
bindings_config.ron
(set RCTRL+RSHIT+P
by default)ActionSystem should be played more than once if "frames behind" counter is > 10. Replays should be limited in order not to cause fps drops
It's easy to notice that in multiplayer we have 1 monster spawned next to the player, but in single player we get two. That shouldn't be happening, as we clearly add only 1 spawn action in the beginning.
See:
https://github.com/mvlabat/grumpy_visitors/blob/d6690fcf7f9ef9df92e91b02b424884cae0e99c7/libs/game/src/ecs/systems/level.rs#L65-L72
and
libs/game/src/ecs/systems/monster/spawner.rs
Implement error/warning modal windows for the following cases (Is blocked by #31):
Implement the following features:
Fixing bugs:
I've compiled gv for my first time, but when I run the client, it complains with the following errors:
Here's the debug output:
[ERROR][amethyst_assets::storage] "Mesh": Asset "resources/assets/atlas.png" (handle id: Handle { id: 9 }) could not be loaded: Failed to load asset with name "resources/assets/atlas.png"
[ERROR][amethyst_assets::progress] Error loading handle 9, Mesh, with name resources/assets/atlas.png: Failed to load asset with name "resources/assets/atlas.png"
caused by: Failed to load asset with name "resources/assets/atlas.png"
Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Compat { error: UnsupportedError("Unsupported image format") } } }), backtrace: None, error: Format("IMAGE") } }), backtrace: None, error: Asset("resources/assets/atlas.png") } }
caused by: Format "IMAGE" could not load asset
Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Compat { error: UnsupportedError("Unsupported image format") } } }), backtrace: None, error: Format("IMAGE") } }
caused by: The Decoder does not support the image format `Unsupported image format`
Error { inner: Inner { source: None, backtrace: None, error: Compat { error: UnsupportedError("Unsupported image format") } } }
[ERROR][amethyst_assets::prefab::system] Failed loading sub asset: [AssetErrorMeta { error: Error { inner: Inner { source: Some(Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: Compat { error: UnsupportedError("Unsupported image format") } } }), backtrace: None, error: Format("IMAGE") } }), backtrace: None, error: Asset("resources/assets/atlas.png") } }, handle_id: 9, asset_type_name: "Mesh", asset_name: "resources/assets/atlas.png" }]
[ERROR][amethyst_assets::storage] "PREFAB": Asset "resources/prefabs/dummy.ron" (handle id: Handle { id: 0 }) could not be loaded: Failed to load asset with name "resources/prefabs/dummy.ron"
[ERROR][amethyst_assets::progress] Error loading handle 0, PREFAB, with name resources/prefabs/dummy.ron: Failed to load asset with name "resources/prefabs/dummy.ron"
caused by: Failed to load asset with name "resources/prefabs/dummy.ron"
Error { inner: Inner { source: Some(Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }), backtrace: None, error: Asset("resources/prefabs/dummy.ron") } }
caused by: Failed loading sub asset
Error { inner: Inner { source: None, backtrace: None, error: StringError("Failed loading sub asset") } }
Am I missing a library that would lend support to loading the PNG image format?
I wanted to give this project a try, but the client throws errors in the build. It seems like I need to install some libraries, would be nice if you could provide a full list of dependencies.
$ cargo build -p gv_server
Finished dev [unoptimized + debuginfo] target(s) in 1.02s
$ cargo -Z features=itarget build -p gv_client
Compiling shaderc-sys v0.5.1
Compiling gfx-backend-vulkan v0.3.3
Compiling imgui-winit-support v0.2.1
error: could not find native static library `SPIRV-Tools-opt`, perhaps an -L flag is missing?
Compiling shaderc v0.5.1
error: aborting due to previous error
The following warnings were emitted during compilation:
warning: Checking for system installed libraries. Use --features = build-from-source to disable this behavior
warning: Found SPIRV. Linking libSPIRV & libglslang
error: could not compile `shaderc-sys`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
↪ git lfs pull
Git LFS: (0 of 243 files) 0 B / 35.58 MB
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
error: failed to fetch some objects from 'https://github.com/amethyst/grumpy_visitors.git/info/lfs'
The second command in the Building section is:
cargo -Z features=itarget build -p gb_client
The last parameter should be gv_client
. I attempted to build the project for the first time and got an error that was alleviated by fixing this typo.
P.S. Awesome project! I intend to contribute as I gain more experience with Rust and Amethyst.
This function should pick a random position on a specified Side
to spawn. For instance, if we have a side Side::Left
defined as two points A(0, 0) and B(0, 2000), this function should return a random point on the line (-100, 0),(-100, 2000). Currently monsters are sometimes spawned quite far away (I noticed homing missiles reaching a map border faster than a first spawned monster).
player
player
parameter is present, return top 10 of all players ordered by score, 4 players before the best player scoreplayer
parameter is absent, return top 20 of all players ordered by scoreExample:
[
{
"player": "Player 1",
"score": 100,
},
// ... 13 other results
{
"player": "You",
"score": 12,
},
// ... 4 other results
]
player
score
player
isn't present in the DB, create a new recordplayer
is already present in the DB and the submitted score is higher, update the scoreOK 200
Could be fixed by TimonPost/laminar#266 and TimonPost/laminar#264, but it would still be worth it ignoring duplicates on our side to protect ourselves from any other possible sources of bugs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.