Skip to content
Snippets Groups Projects
README.md 3.43 KiB
Newer Older
Louis's avatar
Louis committed
# Bevy 2D Template

## Includes

- Workspace configuration w/ assets dir
- Splash screen
- [Websockets](https://lab.lcr.gr/microhacks/micro-bevy-remote-events)
- [High level audio player](https://lab.lcr.gr/microhacks/micro-bevy-musicbox)
- Basic component based follow-camera setup
- Convenience loader for assets
- Asset loading state to preload all assets
- Gitlab CI template based on [Bevy Builder](https://lab.lcr.gr/microhacks/bevy-builder)

## Usage

Write some code, ya dig?

This project is set up for a multi-crate bevy game, but will work equally well
if just using a single crate for your game. `game_core` is the location of your
entry point, assets are placed at the root of the workspace in the `assets` folder.

Update the splash screen by replacing `assets/splash.png` - it is scaled by 
default to fill the shortest screen side; you can include empty space in your 
splash image as a simple way of changing the padding. `assets/splash_sting.mp3` will
be played during the splash screen.

If you need to pre-process files to generate your assets, update the `Makefile` `assets`
command so that Gitlab CI will package them properly.

Includes websocket based multiplayer building blocks, using [micro_bevy_remote_events](https://lab.lcr.gr/microhacks/micro-bevy-remote-events)

Comes with a Gitlab CI configuration that will build releases for web, Windows and Linux.
It will also publish a Gitlab pages site with the web version automatically.

## Commands

This project uses a Makefile to define some commands to get things going.

To run the game locally on linux, get things set up by running `make setup-x11` or `make setup-wayland`
depending on your requirements.

`make run` will run the desktop version of the game, while `make run-web` will run the game in your web 
browser. The web version requires `trunk` to be installed (`cargo install trunk`).

Building the game for desktop will use a docker container to manage dependancies, but will mount
your workspace to perform the build. `make build-linux` and `make build-windows` can be run on any platform
with docker installed, perfect for cross-compilation without juggling dependencies. `make build-web`

## License

The code source files found in this repository are covered by the license found in the LICENSE file

The logo found in `assets/splash.png` is licensed under the following license for use only within the context of this project.

Louis's avatar
Louis committed
Asset creators are listed in CREDITS with any relevant licenses

Louis's avatar
Louis committed
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><span property="dct:title">Microhacks Logo</span> by <span property="cc:attributionName">Microhacks Ltd</span> is licensed under <a href="http://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY-NC-ND 4.0</a></p>
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/nd.svg?ref=chooser-v1">