diff --git a/architecture/class-overview.md b/architecture/class-overview.md new file mode 100644 index 000000000..9c64798d6 --- /dev/null +++ b/architecture/class-overview.md @@ -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 + + diff --git a/architecture/images/pacman.png b/architecture/images/pacman.png new file mode 100644 index 000000000..97ebca3a4 Binary files /dev/null and b/architecture/images/pacman.png differ diff --git a/architecture/plantuml/classdiagrams/user-perspective-base.puml b/architecture/plantuml/classdiagrams/user-perspective-base.puml new file mode 100644 index 000000000..0f8188217 --- /dev/null +++ b/architecture/plantuml/classdiagrams/user-perspective-base.puml @@ -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 \ No newline at end of file diff --git a/architecture/plantuml/classdiagrams/user-perspective-tilemap.puml b/architecture/plantuml/classdiagrams/user-perspective-tilemap.puml new file mode 100644 index 000000000..1390e26b5 --- /dev/null +++ b/architecture/plantuml/classdiagrams/user-perspective-tilemap.puml @@ -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): void +} + + +@enduml \ No newline at end of file diff --git a/docs/faq.md b/docs/faq.md index 916afe9a3..7168651ee 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -52,7 +52,7 @@ 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. @@ -60,18 +60,18 @@ 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.