Skip to content

Commit

Permalink
Merge branch 'release/0.2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-t committed Dec 21, 2017
2 parents a60d417 + ee0378d commit 38c203c
Show file tree
Hide file tree
Showing 34 changed files with 820 additions and 321 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,33 @@ There are also some special commands:

## Screenshots

This is how the game looks when run (**very** preliminary GUI):
This is how the game looks when run:

![](screenshots/gameplay.gif)

### Map

![](screenshots/orig_map.png)
After selecting a new game you have to generate the world, just before choosing the attributes.

Thanks to the map generator from [Red Blob Games](https://www.redblobgames.com/), I produced the map above. The one in
the game is fundamentally based on this (eg, it uses this heightmap) but it then simplifies the terrains into less
groups - so my map is much less coloured and it has less water mass.
NB: trees cannot be seen here, but they are generated (as individual obstacles) with varying probability
depending on terrain type.

The rivers and lakes are also currently not present. The map is **2048x2048 pixels**, and it's pixel is one "cell" in
game, so it's pretty big.
The rivers and lakes are upcoming in release `0.3.0`. The terrain types are currently fixed. Ordered by
height, they are:

In game, if it could be zoomed out it would look more like this:
* Deep water
* Shallow water
* Coast
* Grass-less ground
* Grass plain
* Grassy Hill
* Rocky Hill
* Mountain
* High Mountain

![](screenshots/map.png)
Some terrains are harder to move through: more stamina will be consumed, and a higher delay is to be expected.

The elevation thresholds are simplified to reduce the amount of colours (and thus, terrains) shown.

Later the terrain will be configurable by the user.

You can also see some rivers (still in-progress, not in the game yet) flowing from high to low places.

Note: this is only temporary. In the final game the terrain will be randomised.
All this should be completely configurable by the user by release `0.4.0`, hopefully.

## Features

Expand Down
15 changes: 8 additions & 7 deletions alone-rl.iml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.github.trystan:AsciiPanel:e0c4372" level="project" />
<orderEntry type="library" name="Maven: net.onedaybeard.artemis:artemis-odb:2.1.0" level="project" />
<orderEntry type="library" name="Maven: net.mostlyoriginal.artemis-odb:contrib-core:2.2.0" level="project" />
<orderEntry type="library" name="Maven: com.github.fabioticconi:rlforj-alt:0.2.0" level="project" />
<orderEntry type="library" name="Maven: net.mostlyoriginal.artemis-odb:contrib-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.github.fabioticconi:rlforj-alt:0.3.0" level="project" />
<orderEntry type="library" name="Maven: com.github.fabioticconi:terrain-generator:0.0.1" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.1" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.18" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.3" level="project" />
</component>
</module>
6 changes: 3 additions & 3 deletions data/items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ tree:
sprite:
c: T
col:
red: 0
green: 205
blue: 113
red: 77
green: 168
blue: 59
shadowView: true
obstacle: {}
cuttable: {}
Expand Down
Binary file modified data/map/elevation.data
Binary file not shown.
Binary file removed data/map/map.png
Binary file not shown.
Empty file removed data/map/map.yml
Empty file.
81 changes: 81 additions & 0 deletions data/map/terrain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

deep-water:
c: 247
col:
red: 51
green: 102
blue: 153
theight: 0.01
type: WATER

shallow-water:
c: '~'
col:
red: 20
green: 152
blue: 204
theight: 0.05
type: WATER

sand:
c: 250
col:
red: 170
green: 170
blue: 0
theight: 0.08
type: LAND

ground:
c: 250
col:
red: 184
green: 134
blue: 11
theight: 0.1
type: LAND

grass:
c: 250
col:
red: 31
green: 138
blue: 19
theight: 0.4
type: GRASS

hill-grass:
c: '^'
col:
red: 74
green: 105
blue: 4
theight: 0.7
type: GRASS

hill:
c: '^'
col:
red: 119
green: 93
blue: 61
theight: 0.8
type: LAND

mountain:
c: '^'
col:
red: 76
green: 70
blue: 50
theight: 0.9
type: LAND

high-mountain:
c: '^'
col:
red: 255
green: 240
blue: 220
theight: 1.1 # must be strictly greater than 1
type: ICE
46 changes: 46 additions & 0 deletions data/palette.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

## Arne64 from http://www.gridsagegames.com/rexpaint/palettes/Arne64.txt
#
#gray: [{0,0,0},{21,21,21},{52,52,52},{123,123,123},{168,168,168},{215,215,215},{255,255,255}]
#brown: [{ 35, 23, 18},{92,60,13},{174,108,55},{197,151,130},{226,215,181}]
#grayblue: [{13,32,48},{65,93,102},{113,166,161}]
#ochra: [{173,78,26},{246,143,55}]
#cyan: [{0,82,128},{10,152,172},{37,226,205},{189,255,202}]
#red: [{79,21,7},{224,60,40}]
#aquamarine: [{0,96,75},{32,181,98}]
#rosee: [{130,60,61},{218,101,94},{225,130,137},{245,183,132},{255,233,197}]
#green: [{0,78,0},{19,157,8},{88,211,50}]
#pink: [{135,22,70},{207, 60,113},{255,130,206}]
#green2: [{23,40,8},{55,109,3},{106,180,23},{140,214,18},{190,235,113},{238,255,169}]
#magenta: [{163,40,179},{204,105,228},{213,156,252},{254,201,237}]
#acidgreen: [{147,151,23},{182,193,33}]
#purple: [{33,22,64},{90,25,145},{106,49,202},{166,117,254},{226,201,255}]
#yellow: [{204,143, 21},{255,187,49},{255,231,55}]
#indigo: [{61,52,165},{98,100,220},{155,160,239}]
#blue: [{0,23,125},{2,74,202},{0,132,255},{91,168,255},{152,220,255}]

# from libtcod

red: 255,0,0
flame: 255,63,0
orange: 255,127,0
amber: 255,191,0
yellow: 255,255,0,
lime: 191,255,0
chartreuse: 127,255,0
green: 0,255,0
sea: 0,255,127
turquoise: 0,255,191
cyan: 0,255,255
sky: 0,191,255
azure: 0,127,255
blue: 0,0,255
han: 63,0,255
violet: 127,0,255
purple: 191,0,255
fuchsia: 255,0,255
magenta: 255,0,191
pink: 255,0,127
crimson: 255,0,63
sepia: 127,101,63
gray: 127,127,127
4 changes: 2 additions & 2 deletions make_pkg.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

v=`ls target/alone-rl-*-jar-with-dependencies.jar | awk -F"-" '{print $3}'`

mvn clean package -Dmaven.test.skip=true

v=`ls target/alone-rl-*-jar-with-dependencies.jar | awk -F"-" '{print $3}'`

cp target/alone-rl-*-jar-with-dependencies.jar alone-rl-$v.jar

7z a -tzip alone-rl-$v.zip data/ alone-rl-$v.jar
Expand Down
42 changes: 25 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.fabioticconi</groupId>
<groupId>com.github.fabio-t</groupId>
<artifactId>alone-rl</artifactId>
<version>0.2.0</version>
<version>0.2.5</version>
<packaging>jar</packaging>

<name>AloneRL</name>
Expand All @@ -41,48 +41,56 @@
<dependency>
<groupId>net.onedaybeard.artemis</groupId>
<artifactId>artemis-odb</artifactId>
<version>2.1.0</version>
<version>[2,3)</version>
</dependency>

<dependency>
<groupId>net.mostlyoriginal.artemis-odb</groupId>
<artifactId>contrib-core</artifactId>
<version>2.2.0</version>
<version>[2,3)</version>
</dependency>

<dependency>
<groupId>com.github.fabioticconi</groupId>
<artifactId>rlforj-alt</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<groupId>com.github.fabioticconi</groupId>
<artifactId>terrain-generator</artifactId>
<version>0.0.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.9.1</version>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>[1,2)</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>[4,5)</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.9.3</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.3</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
<version>2.9.3</version>
</dependency>

</dependencies>
Expand All @@ -92,7 +100,7 @@
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.9.0</version>
<version>2.9.3</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand All @@ -113,7 +121,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>[2,3)</version>
<configuration>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
Expand Down Expand Up @@ -161,9 +169,9 @@
</build>

<scm>
<connection>scm:git:git@fabioticconi/alone-rl.git</connection>
<url>scm:git:git@fabioticconi/alone-rl.git</url>
<developerConnection>scm:git:git@fabioticconi/alone-rl.git</developerConnection>
<connection>scm:git:git@fabio-t/alone-rl.git</connection>
<url>scm:git:git@fabio-t/alone-rl.git</url>
<developerConnection>scm:git:git@fabio-t/alone-rl.git</developerConnection>
</scm>

<repositories>
Expand Down
Binary file removed screenshots/full_colours.png
Binary file not shown.
Binary file modified screenshots/gameplay.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/map.png
Binary file not shown.
Binary file removed screenshots/orig_map.png
Binary file not shown.
Binary file removed screenshots/screenshot.png
Binary file not shown.
4 changes: 4 additions & 0 deletions src/main/java/com/github/fabioticconi/alone/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public Main() throws IOException
final WorldConfiguration config;
config = new WorldConfiguration();
// first thing to be loaded
config.setSystem(MapScreen.class);
config.setSystem(MapSystem.class);
// POJO
config.register(new Random());
Expand Down Expand Up @@ -127,6 +128,7 @@ public Main() throws IOException
config.setSystem(EquipScreen.class);
config.setSystem(CraftScreen.class);
config.setSystem(CraftItemScreen.class);
config.setSystem(CharScreen.class);
// last systems
config.setSystem(DeadSystem.class);

Expand Down Expand Up @@ -174,6 +176,8 @@ public void loop()
long repaintCooldown = 1L;
long actionCooldown = 0L;

world.process();

while (keepRunning)
{
currentTime = System.nanoTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.github.fabioticconi.alone.components.Position;
import com.github.fabioticconi.alone.components.Speed;
import com.github.fabioticconi.alone.components.attributes.Sight;
import com.github.fabioticconi.alone.constants.Cell;
import com.github.fabioticconi.alone.constants.TerrainType;
import com.github.fabioticconi.alone.systems.ActionSystem;
import com.github.fabioticconi.alone.systems.BumpSystem;
import com.github.fabioticconi.alone.systems.HungerSystem;
Expand Down Expand Up @@ -53,7 +53,7 @@ public class GrazeBehaviour extends AbstractBehaviour
// FIXME: this should be in a Context of sort
private Hunger hunger;

private EnumSet<Cell> validCells = EnumSet.of(Cell.GRASS, Cell.HILL_GRASS);
final private EnumSet<TerrainType> validCells = EnumSet.of(TerrainType.GRASS);

@Override
protected void initialize()
Expand Down
Loading

0 comments on commit 38c203c

Please sign in to comment.