Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
GitPrivacy: fIt9CQUwZFLP4/IoDbJpSomt+97wmFopiL9g9c0/+Ep0nyQQXcNx6WM7SqGifAkgV9OdkCr+N5E= CFeQ7YKLXElRdc3jJyZN2vNlDiUNjAQREEZiCcAJ0UNFyHdt1uaKakNEpx8qHPrEDPLKJlZTw3g=
  • Loading branch information
William Raendchen committed Oct 22, 2024
1 parent a4fd367 commit 5135932
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 9 deletions.
72 changes: 63 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,77 @@

ScalaScape is a terminal-based game inspired by RuneScape and Melvor Idle, written in Scala 3.

## Build and run
https://github.com/user-attachments/assets/e119b642-e4c7-401e-abf1-cfb2496c57f9

## Prerequisites

### Getting a jar file
You can get a .jar file from the Releases section on the right, or [build it yourself](#building-the-game)

### Installing Java
You probably already have a compatible Java version installed. If not, https://adoptium.net/ has you covered.
Version 21, 17 or 11 should all work fine.

### Optional: Install Cool Retro Term (CRT)
https://github.com/Swordfish90/cool-retro-term is an awesome terminal and the recommended way to experience the game.
On Ubuntu or similar you may install it as easily as `apt install cool-retro-term`,
otherwise check the repo for instructions. Unfortunately it is not available for Windows.

If you want to try my personal CRT profile, you can find it in the `src/assets` folder.

## Running the game

### On Windows
just double click the jar file and a Java terminal emulator opens.

### On Linux
open a terminal (preferably CRT) and run the jar file with Java.
The `--terminal` flag will force the game to run in the current terminal.
The `--fps=Int` option will set the maximum frames per second. The default is 30,
but most native terminals start flickering above 25 fps, so pick a value that works for you.
```
java -jar scalascape-assembly-0.0.1-SNAPSHOT.jar --terminal --fps=15
```

To run the game in the packaged Java terminal emulator, run the file without any arguments:
```
java -jar scalascape-assembly-0.0.1-SNAPSHOT.jar
```

## Building the game

Build an uber jar with all dependencies:

```
sbt assembly
```

Run the uber jar:

This should create the following file in the project root:
```
java -jar target/scala-3.5.0/scalascape-assembly-0.0.1-SNAPSHOT.jar
target/scala-3.5.0/scalascape-assembly-0.0.1-SNAPSHOT.jar
```

By default, the game will always prefer to create a terminal emulator.
You can force it to run in the existing terminal by adding a flag:
## Shoutouts to awesome products
- https://www.scala-lang.org/ The Scala language
- https://github.com/mabe02/lanterna The Java library Lanterna which handles the Terminal access
- https://www.jetbrains.com/idea/ IntelliJ IDEA and the Scala plugin
- https://github.com/sbt/sbt-assembly The sbt-assembly plugin which packages all dependencies into a single jar
- https://www.scalatest.org/ ScalaTest for writing tests
- https://store.steampowered.com/app/1267910/Melvor_Idle/ Melvor Idle for inspiration

```
java -jar target/scala-3.5.0/scalascape-assembly-0.0.1-SNAPSHOT.jar --terminal
```
## Copyright

I did not attach a license file to this project, which means it is protected by copyright law.
By hosting it publicly on github.com, I implicitly grant you a few rights.
The following chart is for your information:

| Action | Permitted to you |
|-------------------------------------------------------------|------------------|
| Inspect the code | Yes ✅ |
| Build and run the code | Yes ✅ |
| Fork the code on github.com (with pointer to the original) | Yes ✅ |
| ----------------------------------------------------------- |------------------|
| Commercially use the code or any fork of it | No ❌ |
| Re-upload the code as your own | No ❌ |
| Distribute the product in any form | No ❌ |
| Add or modify a license | No ❌ |
27 changes: 27 additions & 0 deletions src/assets/crt-profile-scalascape.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"backgroundColor": "#000000",
"fontColor": "#729fcf",
"flickering": 0.2,
"horizontalSync": 0,
"staticNoise": 0.0955,
"chromaColor": 1,
"saturationColor": 1,
"screenCurvature": 0.2268,
"glowingLine": 0.1476,
"burnIn": 0.0955,
"bloom": 0.5017,
"rasterization": 0,
"jitter": 0.115,
"rbgShift": 0,
"brightness": 0.7392,
"contrast": 0.6962,
"ambientLight": 0,
"windowOpacity": 1,
"fontName": "TERMINUS",
"fontWidth": 1,
"margin": 0.1,
"blinkingCursor": false,
"frameMargin": 0.162,
"name": "Holo3",
"version": 2
}

0 comments on commit 5135932

Please sign in to comment.