Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SoftbearStudios/mk48
Mk48.io ship combat game
https://github.com/SoftbearStudios/mk48
boat browser-game combat game game-server multiplayer rust rust-lang ship web-game webassembly webgl webgl-game yew yew-framework
Last synced: 3 months ago
JSON representation
Mk48.io ship combat game
- Host: GitHub
- URL: https://github.com/SoftbearStudios/mk48
- Owner: SoftbearStudios
- License: agpl-3.0
- Created: 2021-05-08T22:51:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T17:15:52.000Z (6 months ago)
- Last Synced: 2024-11-08T14:14:23.469Z (3 months ago)
- Topics: boat, browser-game, combat, game, game-server, multiplayer, rust, rust-lang, ship, web-game, webassembly, webgl, webgl-game, yew, yew-framework
- Language: Rust
- Homepage: https://mk48.io
- Size: 295 MB
- Stars: 336
- Watchers: 8
- Forks: 58
- Open Issues: 86
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-rust - SoftbearStudios/mk48
- awesome-rust - SoftbearStudios/mk48 - Mk48.io is an online multiplayer naval combat game (Applications / Games)
- fucking-awesome-rust - SoftbearStudios/mk48 - Mk48.io is an online multiplayer naval combat game (Applications / Games)
- fucking-awesome-rust - SoftbearStudios/mk48 - Mk48.io is an online multiplayer naval combat game (Applications / Games)
- awesome-rust-cn - SoftbearStudios/mk48
README
# Mk48.io Game
[![Build](https://github.com/SoftbearStudios/mk48/actions/workflows/build.yml/badge.svg)](https://github.com/SoftbearStudios/mk48/actions/workflows/build.yml)
![Logo](/client/logo-712.png)
[Mk48.io](https://mk48.io) is an online multiplayer naval combat game, in which you take command of a ship and sail your way to victory. Watch out for torpedoes!
- [Ship Suggestions](https://github.com/SoftbearStudios/mk48/discussions/132)
## Building
### Tools
0. Install `rustup` ([see instructions here](https://rustup.rs/))
1. Install Rust Nightly (`rustup override set nightly-2022-08-14`)
2. Add WebAssembly target (`rustup target add wasm32-unknown-unknown`)
3. Install `trunk` (`cargo install --locked trunk`, install `gcc` first if it complains about missing `cc`)
4. Optionally, install the `make` commandYou may use any version of Rust that works, but only `nightly-2022-08-14` is known
to be compatible.### Client
0. Enter `/client`
1. `make` or, equivalently, `trunk build --release`
2. Deploy the server to host the client### Server
0. Enter `/server`
1. `make` to build and run a test server
2. Navigate to `localhost:8081` (or whatever port is printed in the console)## Developing
If you follow the *Building* steps, you have a fully functioning game (could be used to host a private server). If your goal
is to modify the game, you may want to read more :)### Entity data
Entities (ships, weapons, aircraft, collectibles, obstacles, decoys, etc.) are defined at the bottom of
`common/src/entity/_type.rs`.### Entity textures
Each entity type must be accompanied by a texture of the same name in the spritesheet, which comes with the
repository. If entity textures need to be changed, see instructions in the `sprite_sheet_packer` directory.### Engine
Both client and server rely on our custom game engine (which is present in the `engine` directory).
#### Admin interface (optional)
One notable feature of the engine is an (optional) admin interface. To build it:0. Install NodeJS 14 or higher ([here](https://nodejs.org/en/download/))
1. Enter `/engine/js`
2. `make`
3. Deploy the server to host the admin interface
4. Go to `localhost:8081/admin/`
5. Paste the contents of `engine/game_server/src/auth.txt`, generated randomly by a build script, into the alert dialog### Macros
Many macros are utilized by the codebase. Mk48-specific macros can be found in the `macros` directory,
and game engine macros can be found in the `engine/engine_macros` directory. A few notable macros are:
- Mk48 entity loader (generates `EntityData` for all entity types, used by both client and server)
- Game engine audio loader (generates `Audio` enum for client, with a variant per sound)
- Game engine settings (generates Javascript bindings for settings structs)
- Game engine renderer layer (for composable rendering layers)## Contributing
See [Contributing](https://github.com/SoftbearStudios/mk48/wiki/Contributing) Wiki page.## Trademark
Mk48.io is a trademark of Softbear, Inc.