Skip to content

Commit

Permalink
Merge branch 'development' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
meronbrouwer committed Dec 14, 2023
2 parents 931c7da + 6980eeb commit b507d19
Show file tree
Hide file tree
Showing 110 changed files with 1,066 additions and 445 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
- name: Fetch source code
uses: actions/checkout@v3.2.0

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Cache Maven packages
uses: actions/cache@v3.0.11
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
steps:
- uses: actions/checkout@v3.2.0

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Cache Maven packages
uses: actions/cache@v3.0.11
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ jobs:
steps:
- uses: actions/checkout@v3.2.0

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: 17
java-version: 21
server-id: ossrh
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD

- name: Cache Maven packages
uses: actions/cache@v3.0.11
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Yaeger is Another Education Game Engine Runtime, and a fully functional 2D game-engine that
requires only a traditional Object-Oriented style of programming. It is based on JavaFX and
requires Java 17 or above to work.
requires Java 21 or above to work.

## Documentation

Expand All @@ -21,13 +21,13 @@ requires Java 17 or above to work.
* Showcase: [Yaeger showcase](https://github.com/han-yaeger/yaeger-showcase)

## Usage
Yaeger requires JDK17, and is available through the Maven Central Repository.
Yaeger requires JDK21, and is available through the Maven Central Repository.

```xml
<dependency>
<groupId>com.github.han-yaeger</groupId>
<artifactId>yaeger</artifactId>
<version>2021.2022.3</version>
<version>2023.2024</version>
</dependency>
```

Expand Down
15 changes: 8 additions & 7 deletions docs/commandline-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ meant for debugging your Game.

The following arguments are currently supported:

| Argument | Explanation |
| :--------- | :------------------------------------------------- |
| --noSplash | Skip the Splash screen during start up. |
| --showBB | Show the BoundingBox of all instances of `YaegerEntity` that implement either `Collider` or `Collided`. |
| --showDebug | Show a debug window with information about the Scene. More information on the debug window can be found [here](debugging.md).|
| Argument | Explanation |
|:---------------|:------------------------------------------------------------------------------------------------------------------------------------------|
| --noSplash | Skip the Splash screen during start up. |
| --showBB | Show the BoundingBox of all instances of `YaegerEntity` that implement either `Collider` or `Collided`. |
| --showDebug | Show a debug window with information about the Scene. More information on the debug window can be found [here](debugging.md). |
| --showGrid | Show a coordinate grid as an overlay on each Scene. This can be useful when figuring out where exactly Entities are on the Scene. |
| --enableScroll | Enable the scrolling gesture for all instances of `ScrollableDynamicScene`. This can help during the development process of such a scene. |
| --limitGWU | Limit the Game World Update (GWU) to a max of 60/sec. |
| --help | Show this help screen with all commandline options. |
| --limitGWU | Limit the Game World Update (GWU) to a max of 60/sec. |
| --help | Show this help screen with all commandline options. |

## Using command line arguments from an IDE

Expand Down
14 changes: 7 additions & 7 deletions docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ program will come to a grinding halt.
The debugger keeps track of the number of Entities that are present on the
scene.

| Entity | Explanation |
| :--------- | :------------------------------------------------- |
| **Dynamic Entities** | Number of entities that extend `DynamicEntity` |
| **Static Entities** | Number of entities that extend `StaticEntity` |
| **Suppliers** | Number of objects that are able to supply entities to the scene. This means all instances of `EntitySpawner`, but also the Scene itself. |
| **Garbage** | Number of Entities that have been marked as garbage, by calling the `remove()` method. The will be removed from the Scene during the next Game World Update, which should result in a drop of *total used memory*|
| **Key listening entities**| Number of entities that implement `KeyListener` |
| Entity | Explanation |
|:---------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Dynamic Entities** | Number of entities that extend `DynamicEntity` |
| **Static Entities** | Number of entities that extend `StaticEntity` |
| **Suppliers** | Number of objects that are able to supply entities to the scene. This means all instances of `EntitySpawner`, but also the Scene itself. |
| **Garbage** | Number of Entities that have been marked as garbage, by calling the `remove()` method. The will be removed from the Scene during the next Game World Update, which should result in a drop of *total used memory* |
| **Key listening entities** | Number of entities that implement `KeyListener` |

## Loaded files

Expand Down
16 changes: 8 additions & 8 deletions docs/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ denotes downward and 180 logically means upward.
There are several Entities available, which can be divided into four different
types:

| Static Entity | Dynamic Entity | Type |
| :---------------- | :------------------------ |:------------------|
| `SpriteEntity` | `DynamicSpriteEntity` | Sprite entity |
| `CircleEntity` | `DynamicCircleEntity` | Shape entity |
| `EllipseEntity` | `DynamicEllipseEntity` | Shape entity |
| `RectangleEntity` | `DynamicRectangleEntity` | Shape entity |
| `TextEntity` | `DynamicTextEntity` | Text entity |
| `CompositeEntity` | `DynamicCompositeEntity` | Composite entity |
| Static Entity | Dynamic Entity | Type |
|:------------------|:-------------------------|:-----------------|
| `SpriteEntity` | `DynamicSpriteEntity` | Sprite entity |
| `CircleEntity` | `DynamicCircleEntity` | Shape entity |
| `EllipseEntity` | `DynamicEllipseEntity` | Shape entity |
| `RectangleEntity` | `DynamicRectangleEntity` | Shape entity |
| `TextEntity` | `DynamicTextEntity` | Text entity |
| `CompositeEntity` | `DynamicCompositeEntity` | Composite entity |

The sprite, shape and text-entity are basic entities. The composite entity
is of a different type. It should be used whenever the entity should
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trivially possible to use JavaFX within Yaeger. This is by design.

## Required Java version

Although Yaeger only exposes a traditional Object Oriented API, internally its
Although Yaeger only exposes a traditional Object-Oriented API, internally its
based on modern Java. To see which specific version is required, please read
the [readme](https://github.com/han-yaeger/yaeger) on the project GitHub.

Expand Down
2 changes: 1 addition & 1 deletion docs/scenes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Typical use cases are:

A `ScrollableDynamicScene` is exactly the same as a `DynamicScene`, but allows a
different width/height for its content. This way the scene can be much larger
that the viewable area (the viewport). The with and height of the scene can be
that the viewable area (the viewport). The width and height of the scene can be
set from the `setupScene()` and the part of the scene that is visible can be set
by setting the scroll-position.

Expand Down
24 changes: 12 additions & 12 deletions docs/user-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ In case of a `ScrollableDynamicScene`, the instances of `Coordinate2D` that are
passed to the event handlers report the coordinates of the entire scene, not
only the viewport.

| Interface | EventHandler(s) |
| :-------------------------------- | :-------------------------------------------------------- |
| `KeyListener` | `void onPressedKeysChange(Set<KeyCode>)` | |
| `MouseButtonPressedListener` | `void onMouseButtonPressed(MouseButton, Coordinate2D)` |
| `MouseButtonReleasedListener` | `void onMouseButtonReleased(MouseButton, Coordinate2D)` |
| `MouseEnterListener` | `void onMouseEntered()` |
| `MouseExitListener` | `void onMouseExited()` |
| `MouseMovedListener` | `void onMouseMoved(Coordinate2D)` |
| `MouseMovedWhileDraggingListener` | `void onMouseMovedWhileDragging(Coordinate2D)` |
| Interface | EventHandler(s) |
|:----------------------------------|:--------------------------------------------------------------------|
| `KeyListener` | `void onPressedKeysChange(Set<KeyCode>)` | |
| `MouseButtonPressedListener` | `void onMouseButtonPressed(MouseButton, Coordinate2D)` |
| `MouseButtonReleasedListener` | `void onMouseButtonReleased(MouseButton, Coordinate2D)` |
| `MouseEnterListener` | `void onMouseEntered()` |
| `MouseExitListener` | `void onMouseExited()` |
| `MouseMovedListener` | `void onMouseMoved(Coordinate2D)` |
| `MouseMovedWhileDraggingListener` | `void onMouseMovedWhileDragging(Coordinate2D)` |
| `MouseDraggedListener` | `void onMouseDragged(Coordinate2D)`, `void onDropped(Coordinate2D)` |
| `MouseDragEnterListener` | `void onDragEntered(Coordinate2D, MouseDraggedListener)` |
| `MouseDragExitListener` | `void onDragExited(Coordinate2D, MouseDraggedListener)` |
| `MouseDropListener` | `void onDrop(Coordinate2D, MouseDraggedListener)` |
| `MouseDragEnterListener` | `void onDragEntered(Coordinate2D, MouseDraggedListener)` |
| `MouseDragExitListener` | `void onDragExited(Coordinate2D, MouseDraggedListener)` |
| `MouseDropListener` | `void onDrop(Coordinate2D, MouseDraggedListener)` |
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.github.han-yaeger</groupId>
<artifactId>yaeger</artifactId>
<version>2022.2023</version>
<version>2023.2024</version>
<packaging>jar</packaging>


Expand All @@ -14,8 +14,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<javafx.version>19</javafx.version>
<java.version>21</java.version>
<javafx.version>21.0.1</javafx.version>
<sonar.projectKey>han-yaeger_yaeger</sonar.projectKey>
<sonar.organization>han-yaeger</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down Expand Up @@ -72,7 +72,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -155,14 +155,14 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.1</version>
<version>5.10.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.10</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -176,7 +176,7 @@
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.1</version>
<version>9.5</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -248,24 +248,24 @@
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.1</version>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.9.1</version>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.8.0</version>
<version>5.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ default void initSpawners() {

/**
* Register all instances of {@link EntitySpawner} that were added to this {@link EntitySpawnerContainer}.
* <p>
* Note: This method is part of the internal API, and should not be used when implementing a Yaeger game.
*/
default void registerEntitySpawners() {
if (getSpawners() == null || getEntityCollection() == null) {
Expand All @@ -74,6 +76,8 @@ default void registerEntitySpawners() {
/**
* Call the {@link Updatable#update(long)} of all instances of {@link EntitySpawner} that
* were added to this {@link EntitySpawnerContainer}.
* <p>
* Note: This method is part of the internal API, and should not be used when implementing a Yaeger game.
*
* @return an {@link Updatable} that delegates the {@link Updatable#update(long)}
*/
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/github/hanyaeger/api/Timer.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ public abstract class Timer {

private long intervalInMs;
private long prevTime = 0;

private boolean active = true;
private boolean garbage = false;

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/github/hanyaeger/api/TimerContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ default void addTimer(final Timer timer) {
/**
* Annotated with {@link OnActivation}, this method will be called during activation. First it will clear
* any timers from a previous activation, after which it will call {@link #setupTimers()}.
* <p>
* Note: This method is part of the internal API, and should not be used when implementing a Yaeger game.
*/
@OnActivation
default void initTimers() {
Expand All @@ -52,6 +54,8 @@ default void initTimers() {
/**
* Return an {@link Updatable} that, when called, call all the timers that were
* added to this {@code TimerContainer}.
* <p>
* Note: This method is part of the internal API, and should not be used when implementing a Yaeger game.
*
* @return an {@link Updatable} that delegates the {@link Updatable#update(long)} to
* all timers
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/github/hanyaeger/api/entities/Collided.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public interface Collided extends Bounded {
* <p>
* Note that all of this takes place during the same Game World update. The re-rendering takes place after this update
* completes, meaning the undoing will cause no jitter effect.
* <p>
* Note: This method is part of the internal API, and should not be used when implementing a Yaeger game.
*
* @param colliders a {@link Set} of colliders that should be checked for collisions
*/
Expand Down
Loading

0 comments on commit b507d19

Please sign in to comment.