Skip to content

Commit

Permalink
[documentation] A small start on architecture documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
meronbrouwer committed Sep 16, 2024
1 parent 6c70aa4 commit d141a3c
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 5 deletions.
15 changes: 15 additions & 0 deletions architecture/class-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# A guide through Yaeger's internals

After reading this guide, you should have a basic picture of how Yaeger's internals work. Not everything will be covered,
but the basic setup should be clear and it should be possible to figure out how the missing parts work.

## Introduction

To get insight into how Yaeger is built, we will be using different views on its internals. We will base this on the game
of Pac-Man.

![Pac-Man](images/pacman.png)

## Base classes for Scenes and Entities


Binary file added architecture/images/pacman.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions architecture/plantuml/classdiagrams/user-perspective-base.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
@startuml
'https://plantuml.com/class-diagram

class YaegerGame {
setupGame(): void
setupScenes(): void
addScene(int, YaegerScene): void
}

interface YaegerScene {
setupScene(): void
setupEntities(): void
}

abstract class StaticScene implements YaegerScene{
addEntity(YaegerEntity): void
}

abstract class DynamicScene extends StaticScene{
}

abstract class YaegerEntity {
}

abstract class CircleEntity extends YaegerEntity {
}

abstract class DynamicCircleEntity extends CircleEntity {
}

abstract class EllipseEntity extends YaegerEntity {
}

abstract class DynamicEllipseEntity extends EllipseEntity {
}

abstract class RectangleEntity extends YaegerEntity {
}

abstract class DynamicRectangleEntity extends RectangleEntity {
}

abstract class SpriteEntity extends YaegerEntity {
}

abstract class DynamicSpriteEntity extends SpriteEntity {
}

abstract class TextEntity extends YaegerEntity {
}

abstract class DynamicTextEntity extends TextEntity {
}


@enduml
36 changes: 36 additions & 0 deletions architecture/plantuml/classdiagrams/user-perspective-tilemap.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@startuml
'https://plantuml.com/class-diagram

class YaegerGame {
setupGame(): void
setupScenes(): void
addScene(int, YaegerScene): void
}

interface YaegerScene {
setupScene(): void
setupEntities(): void
}

abstract class StaticScene implements YaegerScene{
addEntity(YaegerEntity): void
}

abstract class DynamicScene extends StaticScene{
}

abstract class YaegerEntity {
}

interface TileMapContainer {
setupTileMaps(): void
addTileMap(TileMap): void
}

abstract class TileMap{
setupEntities(): void
addEntity(int, Class<? extends YaegerEntity>): void
}


@enduml
10 changes: 5 additions & 5 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,26 @@ group them within their specific methods.

If you have a machine with Apple Silicon you might come across an error in the build process like this:

![Error building because of libraries that cannot be linked](./images/00-mac-error.png)
![Error building because of libraries that cannot be linked](images/00-mac-error.png)

To solve this you have to change the architecture of your JDK to one that is not specific to an ARM CPU.

Go to Project Structure, through File->Project Structure or enter the keycombo: `⌘+;`.

You will see something similar to this:

![Project Structure window in IntelliJ](./images/01-mac-project-structure.png)
![Project Structure window in IntelliJ](images/01-mac-project-structure.png)

Click on Edit next to the SDK overview and then choose `Download JDK`.

![Download button](./images/02-mac-download-jdk.png)
![Download button](images/02-mac-download-jdk.png)

Then choose a JDK that does not have the descriptor: `aarch64`.

![JDK without aarch64](./images/03-mac-without-aarch64.png)
![JDK without aarch64](images/03-mac-without-aarch64.png)

To finish click download.

![Download the JDK](./images/04-mac-download.png)
![Download the JDK](images/04-mac-download.png)

You should be able to build and run your project now.

0 comments on commit d141a3c

Please sign in to comment.