aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 97eefe2f0236f2229e7002a0b3d4d67d27ae7647 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# NPE Hero v2.0
One-year anniversary update!

Goals:
- [x] New integrated level editor
- [ ] Custom keybindings
- [ ] Installer / Linux package
- [ ] Code cleanup

### Notes:
TEMOPORARY: USE G KEY INSTEAD OF SPACE KEY

# Installation
1. Install Java 17 or newer
1. Go to Deployments > Releases.
1. Download the correct archive for your OS
1. Unzip it into an empty directory
1. Run the start file (start.sh or start.bat)

# Run in IDE
## VSCode
1. Windows: Install git for windows
1. import the repository...
- Method 1
    1. Click the blue clone button
    1. Click "Visual Studio Code (HTTPS)
- Method 2
    1. Click the source control button on the sidebar
    1. Click clone repository
    1. Return to GitLab and click the blue clone button
    1. Copy the "Clone with HTTPS" link
    1. Paste the link into the VSCode popup
3. Click the run and debug button on the sidebar 
1. Click "create launch.json" and open the file
1. Add the key "vmArgs" and put in the [VM arguements](https://gitlab.sowgro.net/npeinc/npehero#java-vm-arguements) for your OS

For example: 
```json
    "configurations": [
        {
            "type": "java",
            "name": "Driver",
            "request": "launch",
            "mainClass": "gui.Driver",
            "projectName": "GuitarHero",
            "vmArgs": "--module-path lib/linux --add-modules javafx.controls,javafx.fxml,javafx.media -Dprism.forceGPU=true"
        },
```
Do not forget the comma after the second to last item.

## Eclipse
1. Click the search icon in the upper right corner
2. Search "git repositories" and select it
3. Click "Clone a git repository"
1. Return to GitLab and click the blue clone button
1. Copy the "Clone with HTTPS" link
1. Paste it into the URI box
1. Other information should fill in automatically, click next
1. Ensure that the Main branch is selected and click next
1. Change the directory to your eclipse workspace
1. Check "Import all existing Eclipse projects after clone finishes"
1. Click finish
1. Right click on project > Properties
1. Select Run/Debug Settings > Driver
1. Click Edit
1. Click the Arguments tab
1. Paste in the [VM Arguements](https://gitlab.sowgro.net/npeinc/npehero#java-vm-arguements) for your OS

## Java VM Arguments
These are automatically run by the start files when installing from an archive.

#### Windows
`--module-path lib/windows/lib --add-modules javafx.controls,javafx.fxml,javafx.media`

#### Linux
`--module-path lib/linux --add-modules javafx.controls,javafx.fxml,javafx.media -Dprism.forceGPU=true`

# Development Links

[Figma link](https://www.figma.com/file/dpeMlWStSWrVHfLd0Uohws/Untitled?node-id=0%3A1&t=PVQi61Ig3AWtWNMm-1)

[JavaFX docs (with search)](https://openjfx.io/javadoc/15)

javafx guides (really helpful website):
[edencoding.com](https://edencoding.com/javafx-layouts/)