Skip to content

Commit

Permalink
Open-source Kiomet πŸŽ‰
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Aug 17, 2023
1 parent 7ac9ec7 commit 326652c
Show file tree
Hide file tree
Showing 427 changed files with 80,908 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = "--cfg=web_sys_unstable_apis"
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-04-25
override: true
components: rust-src, rustfmt, clippy
- name: Install target
run: rustup target add wasm32-unknown-unknown
- uses: jetli/[email protected]
with:
version: 'v0.15.0'
- name: Build Client
working-directory: ./client
run: trunk build --release
- name: Build Server
working-directory: ./server
run: cargo build --release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
target/
661 changes: 661 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# kiomet
Kiomet.com real-time strategy game
# Kiomet.com

[![Build](https://github.com/SoftbearStudios/kiomet/actions/workflows/build.yml/badge.svg)](https://github.com/SoftbearStudios/kiomet/actions/workflows/build.yml)
<a href='https://discord.gg/YMheuFQWTX'>
<img src='https://img.shields.io/badge/Kiomet.com-%23announcements-blue.svg' alt='Kiomet.com Discord' />
</a>

![Logo](/assets/branding/512x340.jpg)

[Kiomet.com](https://kiomet.com) is an online multiplayer real-time strategy game. Command your forces wisely and prepare for intense battles!

## Build Instructions

0. Install `rustup` ([see instructions here](https://rustup.rs/))
1. Install Rust Nightly and the WebAssembly target

```console
rustup install nightly-2023-04-25
rustup default nightly-2023-04-25
rustup target add wasm32-unknown-unknown
```

2. Install `trunk` (`cargo install --locked trunk --version 0.15.0`, install `gcc` first if it complains about missing `cc`)
3. `trunk build --release` in `/client`
4. `cargo run --release` in `/server`

## HTTPS

If you build the server in `--release` mode, it will force HTTPS using a self-signed certificate.

Optionally, specify `--certificate-path` and `--private-key-path` to use a trusted CA certificate (e.g. acquired via [Let's Encrypt](https://letsencrypt.org/)). The server will periodically check for and load renewed certificates.

## Official Server(s)

To avoid potential visibility-cheating, you are prohibited from using the open-source
client to play on official Kiomet server(s).
12 changes: 12 additions & 0 deletions assets/audio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Sound Credits

Sounds are either licensed under CC0/public domain or via transfer of Copyright

**Warning: Sounds in this directory are unprocessed and potentially very loud!**

- [event](https://freesound.org/people/gerainsan/sounds/564474/) by gerainsan
- [loss](https://freesound.org/people/gerainsan/sounds/564474/) by gerainsan
- music by [Tim Beek](https://timbeek.com)
- [pain](https://freesound.org/people/gerainsan/sounds/564474/) by gerainsan
- [ping](https://freesound.org/people/gerainsan/sounds/564474/) by gerainsan
- [success](https://freesound.org/people/gerainsan/sounds/564474/) by gerainsan
Binary file not shown.
Binary file added assets/audio/timbeek.com/music.wav
Binary file not shown.
Binary file added assets/branding/1280x550.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/1280x550.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/1280x720.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/1280x720.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/512x340.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/512x340.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/512x384.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/512x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/512x512.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/712x400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/text_400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/text_500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/text_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/branding/text_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions assets/embed/gamedistribution/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html>
<body style="margin: 0px; overflow: hidden;">
<iframe
allowfullscreen
height="100%"
referrerpolicy="origin"
sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts"
src="https://kiomet.com/referrer/gamedistribution/"
title="Kiomet"
width="100%"
/>
</body>
</html>
Binary file added assets/embed/gamedistribution/index.zip
Binary file not shown.
13 changes: 13 additions & 0 deletions assets/embed/iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<html>
<body style="margin: 0px; overflow: hidden;">
<iframe
allowfullscreen
height="100%"
referrerpolicy="origin"
sandbox="allow-forms allow-pointer-lock allow-same-origin allow-scripts"
src="https://kiomet.com"
title="Kiomet"
width="100%"
/>
</body>
</html>
Binary file added assets/paintings/Airfield.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Armory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Artillery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Bunker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Centrifuge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/City.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Ews.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Headquarters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Helipad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/paintings/Launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/paintings/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resize:
mkdir -p ../../client/paintings
mogrify -resize 512x512 -format webp -quality 75 -path ../../client/paintings *.png
rm ../../client/paintings/Runway.webp
#optipng -o7 ../../client/paintings/*.png
Binary file added assets/paintings/Projector.png
Binary file added assets/paintings/Quarry.png
9 changes: 9 additions & 0 deletions assets/paintings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Images in this directory generated by AI and edited with GIMP.

## OpenAI.com (DALL-E)

- Rocket

## Craiyon.com

Everything else
Binary file added assets/paintings/Rampart.png
Binary file added assets/paintings/Reactor.png
Binary file added assets/paintings/Refinery.png
Binary file added assets/paintings/Rocket.png
Binary file added assets/paintings/Runway.png
Binary file added assets/paintings/Satellite.png
Binary file added assets/paintings/Silo.png
Binary file added assets/paintings/Town.png
14 changes: 14 additions & 0 deletions client/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[profile.release]
lto = "fat"
opt-level = 'z'
codegen-units = 1

# These 2 make the br compressed wasm a bit smaller.
# Using strip = "symbols" aka true breaks the client.
strip = "debuginfo"
panic = "abort"

[unstable]
# Requires the rust-src component. `rustup +nightly component add rust-src`
#build-std = ["std", "panic_abort"]
#build-std-features = ["panic_immediate_abort"]
2 changes: 2 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
target
Loading

3 comments on commit 326652c

@hexaheximal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘€

mazean open-source release when

@finnbear
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hexaheximal Mazean (as published) is deprecated and open-sourcing it would require significant effort, so it's not planned.

@hexaheximal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hexaheximal Mazean (as published) is deprecated and open-sourcing it would require significant effort, so it's not planned

@finnbear 😒

mazean is the best softbear game

Please sign in to comment.