Skip to content

Commit 1d1d02c

Browse files
committed
Example Game: Scorched
1 parent 6964078 commit 1d1d02c

18 files changed

Lines changed: 569 additions & 3 deletions

File tree

games/breakout/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ The resulting jar will be executable and include all dependencies (so called "fa
3232
To run the built jar manually:
3333

3434
````
35-
java -jar game.jar
35+
java -jar kodenkel-breakout.jar
3636
````

games/pong/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ The resulting jar will be executable and include all dependencies (so called "fa
3737
To run the built jar manually:
3838

3939
````
40-
java -jar game.jar
40+
java -jar kodenkel-pong.jar
4141
````

games/scorched/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.txt
2+
target
3+
dev
4+
game.jar
2.52 MB
Binary file not shown.

games/scorched/lib/jaylib.jar

2.55 MB
Binary file not shown.

games/scorched/package.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
del kodenkel-scorched.jar
4+
5+
mvn clean package
6+
7+
copy target/kodenkel-scorched.jar kodenkel-scorched.jar
8+
java -jar kodenkel-scorched.jar

games/scorched/package.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
rm -f kodenkel-scorched.jar
4+
5+
mvn clean package
6+
7+
cp target/kodenkel-scorched.jar kodenkel-scorched.jar
8+
chmod +x kodenkel-scorched.jar
9+
java -jar kodenkel-scorched.jar

games/scorched/pom.xml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<groupId>com.kodenkel.game</groupId>
4+
<artifactId>scorched</artifactId>
5+
<version>1</version>
6+
<packaging>jar</packaging>
7+
<name>kodenkel scorched</name>
8+
9+
<dependencies>
10+
<dependency>
11+
<groupId>com.raylib</groupId>
12+
<artifactId>Jaylib</artifactId>
13+
<version>1.0.0</version>
14+
<scope>system</scope>
15+
<systemPath>${project.basedir}/lib/jaylib.jar</systemPath>
16+
</dependency>
17+
18+
<dependency>
19+
<groupId>com.raylib</groupId>
20+
<artifactId>Raylib</artifactId>
21+
<version>1.0.0</version>
22+
<scope>system</scope>
23+
<systemPath>${project.basedir}/lib/jaylib.jar</systemPath>
24+
</dependency>
25+
</dependencies>
26+
27+
<build>
28+
<finalName>kodenkel-scorched</finalName>
29+
<resources>
30+
<resource>
31+
<directory>${project.basedir}</directory>
32+
<includes>
33+
<include>lib/*.jar</include>
34+
<include>src/main/resources/*.png</include>
35+
</includes>
36+
</resource>
37+
</resources>
38+
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-shade-plugin</artifactId>
43+
<version>3.2.4</version>
44+
45+
<configuration>
46+
<createDependencyReducedPom>false</createDependencyReducedPom>
47+
</configuration>
48+
49+
<executions>
50+
<execution>
51+
<phase>package</phase>
52+
<goals>
53+
<goal>shade</goal>
54+
</goals>
55+
<configuration>
56+
<artifactSet>
57+
<excludes>
58+
<exclude>junit:junit</exclude>
59+
</excludes>
60+
</artifactSet>
61+
<transformers>
62+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
63+
<manifestEntries>
64+
<Main-Class>com.kodenkel.game.Application</Main-Class>
65+
<Class-Path>. ./lib/jaylib.jar</Class-Path>
66+
</manifestEntries>
67+
</transformer>
68+
</transformers>
69+
</configuration>
70+
</execution>
71+
</executions>
72+
73+
</plugin>
74+
</plugins>
75+
</build>
76+
</project>

games/scorched/readme.jpg

34.4 KB
Loading

games/scorched/readme.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
## Example Game: Scorched
2+
3+
This is a **very rudimentary** Scorched Earth clone.
4+
5+
Your objective is eliminating the opposing tank. The first tank to blow up the other tank is the winner.
6+
7+
Use the arrow keys to set the angle of the turret, and the speed of the missile.
8+
9+
![Preview](readme.jpg)
10+
11+
## Pre-requisites
12+
13+
- Java 1.8
14+
- Maven 3.6
15+
16+
or newer
17+
18+
Help on my blog: <a href="https://www.kodenkel.com/how-to/java-jdk-maven-installation-windows" target="_blank">How To Install the Java JDK and Maven on Windows</a>
19+
20+
Debian/Ubuntu
21+
22+
````
23+
sudo apt-get install default-jdk maven
24+
````
25+
26+
## Package and Test
27+
28+
On Linux simply run the "package.sh" script.
29+
30+
On Windows simply run the "package.bat" script (untested).
31+
32+
The resulting jar will be executable and include all dependencies (so called "fat-jar").
33+
34+
To run the built jar manually:
35+
36+
````
37+
java -jar kodenkel-scorched.jar
38+
````

0 commit comments

Comments
 (0)