Slope-ECS
Slope-ECS copied to clipboard
An Entity Component System written in Java, based on Austin Morlan's C++ ECS.
About Slope
Slope is a developer-friendly Entity Component System written in pure Java. It enables developers of all kinds to create games and other software built on a no-nonsense, cross-platform, open-source code library.
Highlights
- [x] Cross Platform - Fully supports all major desktop platforms (Linux, macOS, Windows)
- [x] Developer Friendly
- Robust testing for all supported platforms, ensuring your programs work as you expect.
- Well-documented source code, ensuring each part of the library's purpose to be easily understood.
- [x] Open Source
- Under the MIT License, you're free to use and modify this library for your own needs.
References
- This ECS is designed based on Austin Morlan's Entity Component System blog post.
Adding Slope-ECS to your project
This repository can be found on Maven Central -- as such, it can be easily added to your project as a dependency through the use of a build tool.
Requirements
-
Java 15 or later.
- IMPORTANT: The eventual target Java version will be Java 17.
- A build tool, such as Maven or Gradle.
Adding the Dependency
When adding the dependency, make sure to replace [latest version here]
with the actual latest version (you'll find this in the Maven Central link up above).
A few common dependencies are provided below:
-
Maven
<dependency> <groupId>io.github.lucasstarsz.slopeecs</groupId> <artifactId>slope-ecs</artifactId> <version>[latest version here]</version> </dependency>
-
Gradle
- Groovy:
implementation 'io.github.lucasstarsz.slopeecs:slope-ecs:[latest version here]'
- Kotlin:
implementation("io.github.lucasstarsz.slopeecs:slope-ecs:[latest version here]")
- Groovy:
-
Apache Ivy
<dependency org="io.github.lucasstarsz.slopeecs" name="slope-ecs" rev="[latest version here]" />
Learning Slope-ECS
The Wiki
I highly recommend Slope's wiki, as it will almost always contain the most up-to-date information on understanding how Slope-ECS works. It is still a work in progress -- as I have more time to work on it, much more will be added to it.
Code Examples
After getting an understanding of how Slope works, these example programs are the best way to learn about using Slope in an actual project.
Building the Source Code
Building Slope's source code is a very easy task. You just need to follow these steps:
-
If you don't already have it, download Git. It's a powerful source control tool, and is the same source control that Slope-ECS uses.
- You don't need to have Gradle installed to build
Slope-ECS
-- Gradle projects come with the build tool.
- You don't need to have Gradle installed to build
-
Using Git, clone the Slope-ECS repository.
git clone https://github.com/lucasstarsz/Slope-ECS.git
-
Once you've entered the top directory of the project (
cd Slope-ECS
), build the project using thegradlew
file.- On Windows, you'll want to use the
gradlew.bat
file. - For Unix-based systems, you'll need to use the
gradlew.sh
file (after giving it proper execution permissions).
./gradlew build
- On Windows, you'll want to use the
Having trouble accessing the gradlew
file? Read this.
Legal Information
This repository is licensed under the MIT License.