From 98f1370031b97fdef5f8ea8d0e391c95bdce1adf Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 16 Mar 2022 16:21:11 -0400 Subject: [PATCH] Setting up skeleton project --- .gitignore | 14 ++++++++++++++ Cargo.toml | 13 +++++++++++++ README.md | 11 +++++++++++ game/README.md | 10 ++++++++++ game/desktop_wrapper/Cargo.toml | 9 +++++++++ game/desktop_wrapper/src/main.rs | 4 ++++ game/game_logic/Cargo.toml | 11 +++++++++++ game/game_logic/src/lib.rs | 0 8 files changed, 72 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 game/desktop_wrapper/Cargo.toml create mode 100644 game/desktop_wrapper/src/main.rs create mode 100644 game/game_logic/Cargo.toml create mode 100644 game/game_logic/src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..6985cf1b --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..bf862527 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,13 @@ +[workspace] +members = ["./game/game_logic", "./game/desktop_wrapper"] +exclude = [ + "./third_party/raylib-rs/raylib", + "./third_party/raylib-rs/raylib-sys", +] + +[profile.release] +lto = true +codegen-units = 1 + +[profile.dev] +split-debuginfo = "unpacked" diff --git a/README.md b/README.md index d44dba94..5652b8f1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # ludum-dare-50 A game build over a weekend for Ludum Dare 50 + + +## Cloning + +**IMPORTANT:** This project makes use of recursive submodules. Make sure to pull them via GitKracken, or with the following command: + +```sh +git submodule update --init --recursive +``` + +*Your builds will fail unless this is done* diff --git a/game/README.md b/game/README.md index 83d4471b..e73a227e 100644 --- a/game/README.md +++ b/game/README.md @@ -1,3 +1,13 @@ # Here lives the code This directory should contain game code and exported assets. No workfiles please :) + + +## Directory structure + +- `./game_logic` + - Contains the actual game code +- `./desktop_wrapper` + - A tiny bit of code to initialize the game and run it + - Used to improve the speed of the Rust compiler + diff --git a/game/desktop_wrapper/Cargo.toml b/game/desktop_wrapper/Cargo.toml new file mode 100644 index 00000000..a3ac2816 --- /dev/null +++ b/game/desktop_wrapper/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "desktop_wrapper" +publish = false +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] \ No newline at end of file diff --git a/game/desktop_wrapper/src/main.rs b/game/desktop_wrapper/src/main.rs new file mode 100644 index 00000000..358d0456 --- /dev/null +++ b/game/desktop_wrapper/src/main.rs @@ -0,0 +1,4 @@ + +fn main(){ + +} \ No newline at end of file diff --git a/game/game_logic/Cargo.toml b/game/game_logic/Cargo.toml new file mode 100644 index 00000000..683c8529 --- /dev/null +++ b/game/game_logic/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "game_logic" +publish = false +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +raylib = {version="3.5", path="../../third_party/raylib-rs/raylib"} +# raylib = { version = "3.5", git = "https://github.com/ewpratten/raylib-rs", branch = "ludum-dare-50" } \ No newline at end of file diff --git a/game/game_logic/src/lib.rs b/game/game_logic/src/lib.rs new file mode 100644 index 00000000..e69de29b