-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated pom to reflect current version. - Switched up the README and moved relevant info to their own markdown files. - Fixed a bug where unloaded entities could be drawn. - Added the TIMER Entity type. - Added a Timer entity. - Added a playedBefore boolean type to the config. - Script has been updated to work with both an SFL & NSFL version of the script. - ScriptSection modified to work with SFL & NSFL script sections. - EndScreen now has a smoother transition to the main menu. - Documentation added to ScrollableIntMenuComponent. - Documentation and runtime verification added to ScrollableMenuComponent. - Removed unnecessary import from SingleplayerMenu. - Added the GameState type to the Action enum. - Slightly cleaned up FreeMode. - Switched up getScript() in Phase: it accounts for new players. - Bug fixes for StoryIntro. - Smoother transitions and bug fixes for StoryMode. - Added COLON texture to CharMap, Texture, resources. - Added an isOn() -> boolean method to NSFL enum. - Cleaned up & fixed documentation in TexturePreprocessor. - Added script constant & updated version in Constants. - View now handles focusGain/focusLost events. - Cleaned up Window. - Added tutorial/no tutorial and sfl/nsfl options to script.json.
- Loading branch information
Showing
28 changed files
with
675 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
## How to Run | ||
|
||
This game is developed in Java, specifically compiled by AdoptOpenJDK (HostSpot) version 11.0.11. | ||
However, you do not need this specific release of Java to run this game. | ||
Any Java release after 11 is capable of running the game thanks to backwards compatability. | ||
In order to check if you already have the Java 11 JRE installed, you can run the command `java -version` from your preferred terminal. | ||
|
||
If you get an output similar to the following, then you're set to start. | ||
<br /> | ||
Make sure that the major version (highlighted below) is at or greater than 11. | ||
|
||
![Java Version](https://i.imgur.com/KEN7pfz.png) | ||
|
||
If not, you can download the AdoptOpenJDK v11 [here](https://adoptopenjdk.net/archive.html). | ||
If you want your Java release straight from Oracle, you can download Java 17 [here](https://www.oracle.com/java/technologies/downloads/). | ||
|
||
After you get the above or similar output, you get the [latest release](https://github.com/glitchedcoder/hangman/releases) by going to the assets and clicking the `Hanged Men.jar` file. | ||
After that, you can type in `java -jar ` and drag + drop the downloaded jar to your terminal. | ||
After that, all you need to do is press enter! The game will take care of the rest. | ||
|
||
Lucky for you, if this is a nuisance to you, and you don't like terminals, you can simply double-left-click the `Hangman.jar` file, and it will open. | ||
|
||
## How to Play | ||
|
||
After opening the game, a small intro will play, and then you will be landed on a screen asking for an API key. | ||
This API key is given to participants of the hackman challenge**, however, you do not need your own key in order to play. | ||
Simply typing the global key `12345` (with the alphanumeric key group (not the numeric keypad)) and then pressing enter will launch you into the main menu. | ||
|
||
From the main menu, there are four different options to choose from: | ||
- [Singleplayer](./RUN%20AND%20PLAY.md#singleplayer) | ||
- [Multiplayer](./RUN%20AND%20PLAY.md#multiplayer) | ||
- [Preferences](./RUN%20AND%20PLAY.md#preferences) | ||
- Exit | ||
|
||
All but the last option (as I hope it's obvious as to what it does) will be further explained below. | ||
|
||
** _Unfortunately, the API to provide words to this game will not last forever. In order to preserve the game, in a future update, I will have the word list stored locally and the API Key Entry scene will be removed._ | ||
|
||
### Singleplayer | ||
|
||
Singleplayer is split into two different categories: Story Mode and Free Mode. | ||
|
||
Story Mode will give you the best experience through a tutorial of the layout and even an explanation as to how you ended up in this place, so it is recommended you start on this option. | ||
In Story Mode you will meet the Executioner and will go through three phases of difficulty, based on word length. | ||
|
||
Free Mode is like Story Mode, but without the dialogue and instead of three phases, only has one. | ||
The word length in Free Mode is pseudo-random, between 4 and 14. | ||
|
||
### Multiplayer | ||
|
||
To preface this, this mode does not interact with any outside network nor your local network. | ||
This mode is meant to be played between two people on one device. | ||
|
||
Multiplayer allows you to first select the word length, between 4 and 14 letters (alphabetical letters only, sorry). | ||
You will then be taken to a second screen where you type in this word with the length selected on the previous screen. | ||
After, a second user can guess the word just like you would in Free Mode. | ||
|
||
### Preferences | ||
|
||
In the Preferences menu, there are two sliders: Resolution and NSFL (short for Not Safe for Life, this will be explained later). | ||
The scrollable options in the menu do not currently show the settings that you have applied. | ||
This may be updated in the future, but I don't plan on making it a priority. | ||
|
||
For resolutions, the following options are available (width x height - in pixels): | ||
- 1024x576 | ||
- 1152x648 | ||
- 1280x720 | ||
- 1600x900 | ||
- 1920x1080 | ||
- 2560x1440 | ||
- 3840x2160 | ||
|
||
For NSFL, the following options are available: | ||
- NSFL ON | ||
- NSFL OFF | ||
|
||
NSFL is an option due to a rather graphic scene that pops up when on the game over screen. | ||
If you are uncomfortable with the rather dark tone of this game, you can select NSFL OFF in order to turn off more disturbing images. | ||
In order to distinguish between NSFL being on or off, in the main menu and all games, you can distinguish between the hands: | ||
|
||
**NSFL ON**: | ||
![NSFL ON](https://i.imgur.com/ZY2ngsl.png) | ||
|
||
**NSFL OFF**: | ||
![NSFL OFF](https://i.imgur.com/13sxwxi.png) | ||
|
||
In order for the changes to take effect (for both resolution and NSFL toggle), you need to select the `APPLY + RESTART` menu option. | ||
This will restart the game for you with these settings applied and saved to your local configuration file. | ||
|
||
### Outro | ||
|
||
That's all there is to know! Thank you so much for playing my game! | ||
|
||
The Executioner awaits your arrival. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## Technical Details | ||
|
||
This section will include all the technical details of this project. | ||
|
||
### Assets & The Game Engine | ||
|
||
Although I am not very good with drawing assets, all assets found [here](https://github.com/glitchedcoder/hangman/tree/main/src/main/resources/texture) were hand-drawn in Photoshop. | ||
This game is meant to portray a sort of arcade-like feel, with a story-driven option that adds some creativity. | ||
Other than the dependencies, the only standard library features that this game uses is JFrame (part of [Swing](https://en.wikipedia.org/wiki/Swing_(Java))) and Canvas (part of [AWT](https://en.wikipedia.org/wiki/Abstract_Window_Toolkit)). | ||
The rest of this game is built from scratch, including [Scenes](https://github.com/glitchedcoder/hangman/blob/main/src/main/java/dev/glitchedcoder/hangman/window/Scene.java) and [Entities](https://github.com/glitchedcoder/hangman/blob/main/src/main/java/dev/glitchedcoder/hangman/entity/Entity.java). | ||
|
||
### Tech Stack | ||
|
||
**Language**: Java | ||
<br /> | ||
**JDK**: AdoptOpenJDK (HostSpot) version 11.0.11 | ||
<br /> | ||
**Build System**: Maven | ||
<br /> | ||
**Dependencies**: | ||
|
||
- [Google GSON v2.9.0](https://github.com/google/gson) | ||
- [Lombok v1.18.22](https://github.com/projectlombok/lombok) | ||
- [Google FindBugs v3.0.2](https://github.com/findbugsproject/findbugs) | ||
- [Apache HttpComponents Client v4.5.13](https://github.com/apache/httpcomponents-client) | ||
|
||
_Dependencies are shaded with the JAR and do not need to be downloaded._ | ||
|
||
### Local Data | ||
|
||
This app does indeed store preferences. | ||
|
||
Where this data is located depends on your operating system: | ||
- Windows: `%appdata%\Hanged Men Data` | ||
- MacOS: `/Users/YOUR_USERNAME/Library/ApplicationSupport/Hanged Men Data` | ||
- Linux: `/home/YOUR_USERNAME/Hanged Men Data` | ||
|
||
As of the writing of this, the following files are stored: | ||
- `config.json` - This file stores the following preferences: | ||
- API Key: Used to access the [word API](https://github.com/Jay-Madden/hackmanapi). | ||
- Resolution: The size of the window. | ||
- NSFL: Enables NSFL scenes and dialogue. | ||
- Played Before: Enables and disables tutorial dialogue. | ||
|
||
### Diagrams | ||
|
||
The following diagrams were made with [draw.io](https://draw.io). | ||
These diagrams were made post-submission and were meant to display how the game works. | ||
|
||
**Entity Inheritance Diagram** | ||
![Entity Diagram](https://i.imgur.com/w7mYhTA.png) | ||
|
||
**Scene Inheritance Diagram** | ||
![Scene Diagram](https://i.imgur.com/7pdPA4v.png) | ||
|
||
**Scene Activity Diagram** | ||
![Scene Activity Diagram](https://i.imgur.com/f7Y8nQI.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ public enum EntityType { | |
TEXT_INPUT, | ||
ICON_OVERLAY, | ||
LIGHT_FIXTURE, | ||
SPRITE | ||
SPRITE, | ||
TIMER | ||
|
||
} |
Oops, something went wrong.