Giter Club home page Giter Club logo

fishgame-macroquad's Introduction

"Fish Game" for Macroquad

fishgame

"Fish Game" for Macroquad is an online multiplayer game, created as a demostration of Nakama, an open-source scalable game server, using Rust programming language and the Macroquad game engine.

Playing the game online

The latest web build for online play is available here.

Playing the game from source

Depedencies:

The main depdency: the rust compiler.
To get it, follow rustup.rs instructions.

On web, windows and mac os no other external depdendecies are required. On linux followed libs may be required:

apt install libx11-dev libxi-dev libgl1-mesa-dev libasound2-dev

Nakama server

To run the Fish game locally Nakama server is required.

The easiest way to setup a Nakama server locally for testing/learning purposes is via Docker, and in fact, there is a docker-compose.yml included in the source code of "Fish Game" (/docker/docker-compose.yml).

So, if you have Docker Compose installed on your system, all you need to do is navigate to "/docker" directory and run:

docker-compose up

This will automatically pull all Fish game .lua modules and will gives a ready to connect nakama server.

Running the game:

Native PC build:

cargo run --release

from this repo root.

Building HTML5 build:

cargo build --target wasm32-unknown-unknown --release
cp target/wasm32-unknown-unknown/release/fishgame.wasm web/fishgame.wasm
wasm-strip web/fishgame.wasm

To serve the web build some web server will be required. One of the options: devserver

cargo install devserver
cd web
devserver .

And than open http://localhost:8080

fishgame-macroquad's People

Contributors

marot avatar mofirouz avatar not-fl3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fishgame-macroquad's Issues

quick game with wasm build stuck on connecting screen

the pre-compiled web build that comes in the web folder works fine but when i generate my own HTML5 build and i click on "quick game" it doesnt connect

I followed all these steps
cargo build --target wasm32-unknown-unknown --release
cp target/wasm32-unknown-unknown/release/fishgame.wasm web/fishgame.wasm
wasm-strip web/fishgame.wasm

then i run devserver --path web

perhaps something with "build.rs" file? i'm on Linux

any clue about this problem?

quick game can't connect

I just tried:

cargo run --release

and

cargo build --release
./target/release/fishgame

Then clicked on "quick game" and it just sits there saying "connecting..."

Any suggestions.

Missing credits module

When trying to build with the provided instruction there is a build error about missing the credits module.

commit 98c966b

$ cargo build
...
error[E0583]: file not found for module `credits`
  --> src/gui.rs:12:1
   |
12 | mod credits;
   | ^^^^^^^^^^^^
   |
   = help: to create the module `credits`, create file "src/gui/credits.rs"

error[E0432]: unresolved import `credits::credits`
  --> src/gui.rs:19:9
   |
19 | pub use credits::credits;
   |         ^^^^^^^^^^^^^^^^ no `credits` in `gui::credits`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0432, E0583.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `fishgame`

To learn more, run the command again with --verbose.

macroquad-particles nanoserde deserialization of HIT_FX fail

any ideas?

thread 'main' panicked at 'called Result::unwrap() on an Err value: Json Deserialize error: Enum not defined Point, line:1 col:51', src\main.rs:140:62

let hit_fxses = EmittersCache::new(nanoserde::DeJson::deserialize_json(HIT_FX).unwrap());

under [dependencies] i have:
macroquad-particles = {version = "0.1.1", features = ["nanoserde"] }

macroqud-particles lib.rs it has:
#[derive(Copy, Clone, PartialEq, Debug)]
#[cfg_attr(feature = "nanoserde", derive(DeJson, SerJson))]
pub enum EmissionShape {
Point,
Rect { width: f32, height: f32 },
Sphere { radius: f32 },
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.