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

Overview

"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

Comments
  • Missing credits module

    Missing credits module

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

    commit 98c966b073ff44a98e5c7b64069be0e3b34556e7

    $ 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.
    
    opened by woelfman 1
  • Fix looping leaderboard request

    Fix looping leaderboard request

    • When winning a game, the leaderboard record would create requests repeatedly
    • Copied the leaderboard.lua file into the docker/modules directory. I'm not sure how to run the docker instance so that the lua modules in the root directory are used
    opened by marot 0
  • error: failed to run custom build command for `openssl-sys v0.9.72`

    error: failed to run custom build command for `openssl-sys v0.9.72`

    Basically I can’t build or run the game but somehow I can run it on the web, plz help me I’ve tried to fix it for an entire day and I can’t fix it, I even tried to reinstall all the OpenSSL stuff! Plz help me.

    opened by TuNiman1 0
  • quick game with wasm build stuck on connecting screen

    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?

    opened by georgeoma 2
  • How to change networking to server-authoritative

    How to change networking to server-authoritative

    Hello,

    I would like to change the networking from master-client-authoritative to server-authoritative.

    I would appreciate any advice on how to go about this, thank you.

    opened by infcodey 1
  • Wasm modding

    Wasm modding

    Original spec

    This implements a modding system that is adequate to handle the existing weapons (along with similar things) and which should be reasonably easy to extend to more exotic weapons and items and potentially even things like AI agents.

    The mods are written in WASM and hosted using https://crates.io/crates/wasm_plugin_host

    This PR includes an implementation of the existing weapons in core_plugin as a rust project. It should be possible to write plugins in other examples though I haven't included any here. There is a generic example of a wasm_plugin compatible plugin written in assemblyscript that could be a starting point for a non-rust Fish Game mod: https://github.com/alec-deason/wasm_plugin/tree/main/example/example_assemblyscript_host/assemblyscript_plugin

    Limitations:

    This currently does not compile to the wasm target. Some additional work is needed in wasm_plugin to support WASM hosts (https://github.com/alec-deason/wasm_plugin/issues/3). Because of that I'm marking this PR as draft. I'm not currently sure what's the quickest route to getting a working WASM version of Fish Game using these changes. I'll need to look more closely at how much work getting WASM host support in wasm_plugin is, it may end up being pretty easy.

    These changes are currently blocked by https://github.com/not-fl3/macroquad/pull/217 for audio support.

    opened by alec-deason 2
  • quick game can't connect

    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.

    opened by omac777 1
Owner
Heroic Labs
Social infrastructure for games and apps.
Heroic Labs
Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.

Planetoid is a toy project to demonstrate and learn several technologies. The goal is to create a little multiplayer asteriod game clone.

René Ribaud 8 Aug 23, 2022
A work-in-progress, open-source, multi-player city simulation game.

Citybound is a city building game with a focus on realism, collaborative planning and simulation of microscopic details. It is independently developed

Citybound 7.2k Jan 3, 2023
4fun open-source Cave Story reimplementation written in Rust

doukutsu-rs Download latest Nightly builds (Requires being logged in to GitHub) A re-implementation of Cave Story (Doukutsu Monogatari) engine written

null 564 Jan 1, 2023
Extensible open world rogue like game with pixel art. Players can explore the wilderness and ruins.

Rusted Ruins Extensible open world rogue like game with pixel art. Players can explore the wilderness and ruins. This game is written in Rust. Screens

T. Okubo 427 Dec 13, 2022
Data-oriented and data-driven game engine written in Rust

What is Amethyst? Amethyst is a data-driven and data-oriented game engine aiming to be fast and as configurable as possible. Principles These principl

Amethyst Engine 7.9k Dec 31, 2022
A refreshingly simple data-driven game engine built in Rust

What is Bevy? Bevy is a refreshingly simple data-driven game engine built in Rust. It is free and open-source forever! WARNING Bevy is still in the ve

Bevy Engine 21.1k Jan 3, 2023
Octo3D - A 3D Game Engine for the Web!

Octo3D is a WebGPU based 3D Game Development Engine for the web. It provides various functions and utilities to improve the game development experience on the web while leveraging technologies such as TypeScript and WASM (via Rust!).

null 8 Mar 6, 2022
The classic tetris game written in Rust using ncurses

tetris.rs This is the classic tetris game I wrote to have a bit of fun with Rust. Installation and playing cargo install --

null 71 Jul 25, 2022
1.19.1 high-performance Minecraft server

Graphite 1.19.1 Minecraft Server TODO Complete protocol with all 1.19.1 Minecraft packets Command dispatch system Viewable objects (entities) Allow mu

null 135 Dec 31, 2022
1.19.1 high-performance Minecraft server

Graphite -- CURRENTLY ON HIATUS 1.19.1 Minecraft Server TODO Complete protocol with all 1.19.1 Minecraft packets Command dispatch system Viewable obje

null 140 Jul 12, 2023
The video game for Fonts of Power. A tabletop roleplaying game made in Rust with Bevy!

The code and rules for Fonts of Power, a tactical TTRPG / video game about exploring magical places. You can follow its development in our Discord ser

null 25 Dec 23, 2022
UnravelSports repository to display Football/Soccer tracking data in 3D using Rust & Bevy

Introduction This project is a proof-of-concept by UnravelSports to show football/soccer data in 3D using the Rust programming language and the Bevy g

null 10 Apr 9, 2023
Red Light, Green Light is a traditional Korean children's game, popularised by the Squid Game TV series.

Red Light, Green Light Red Light, Green Light is a traditional Korean children's game, popularised by the Squid Game TV series. This project is the di

Cedric Chee 1 Jan 10, 2022
A game inspired by the classic atari game: demon attack

rusty_demon_attack A game inspired by the classic atari game: demon attack You can play the game in the web!

null 58 Jan 4, 2023
Minesweeper game developed with Rust, WebAssembly (Wasm), and Canvas

?? click here to play the game ?? Minesweeper game Revealing all the cells without hitting the mines is the task. Each number in the cell denotes how

Karthik Nedunchezhiyan 23 Dec 28, 2022
A block game made in Rust and SFML

septadrop A block game made in Rust and SFML. For packaging instructions, see the build folder. Game Controls ??/?? arrow keys: horizontal movement ??

Elnu 1 Dec 19, 2022
A space shooter game made with Amethyst and Rust.

Theta Wave Project Introduction This game was made with the Amethyst engine. It is inspired by games like Raiden and The Binding of Isaac. Game Introd

Theta Wave 192 Oct 7, 2022
A minesweeper game with a terminal and graphical interface

Mine A minesweeper game with a terminal and graphical interface created by Koen Westendorp. Installation Go ahead and try out for yourself! :) git clo

Koen Westendorp 3 Dec 22, 2022
A roguelike game in Rust

A fantasy deathcrawl in Rust Work in progress. To run, with Rust compiler and Cargo package manager installed: cargo run --release When building on W

Risto Saarelma 347 Nov 21, 2022