Rewriting Argentum Online in Java, using Artemis, Kryonet and libGDX.
To understand ECS, I recommend to read this. Using artemis framework has been really useful to start rewriting this game.
Avoid creating huge game protocol since we can use Requests and Responses, which can be processed easily with 'visitor' design pattern. Read more here
It allows us to create application game logic, create screens and render all that we need using OpenGL.
git clone https://github.com/ao-libre/ao-java.git
Important: you need to use OpenJDK 12 to make it run.
- Go to folder and use following commands to run client
./gradlew desktop:run
or server./gradlew server:run
- Or generate distribution jars
./gradlew desktop:dist
./gradlew server:dist
If you want to run server in local machine and don't want to open ports, add following property to VM Options:
-Dserver.useLocalhost=true
To avoid recompiling shared module and regeneration of .class files, which will probably bring some execution errors like ClassNotFoundException, you can add this argument to skip fluid
task in both client and server run configurations:
-x :shared:fluid
- Select 'Import Project'
- Find and select
build.gradle
file - Create run configurations using gradle tasks (desktop:run, server:run)
Here is an image showing how it should look like:
If you have another version of Java already installed, please change: https://kodejava.org/how-do-i-set-the-default-java-jdk-version-on-mac-os-x/
If you use IntelliJ, use the JDK that comes with the project if is not working change it by yourself like in the picture below:
IntelliJ IDEA -> Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle
Contains all components (ECS related)
Game client logic, screens, GUI, client systems (ECS): on runtime should have a replicated World.
Contains assets and desktop game launcher.
Server logic and systems (ECS), database connection (TBD), etc.
All stuff shared between client and server, like network requests and responses, objects, maps, etc.
- ATTACK_1 = CONTROL_LEFT
- ATTACK_2 = CONTROL_RIGHT
- MEDITATE = M
- USE = U
- HIDE = O
- INVENTORY = I
- SPELLS = K
- TALK = ENTER
- DROP = T
- TAKE = A
- EQUIP = E
- MOVE_LEFT = LEFT
- MOVE_RIGHT = RIGHT
- MOVE_UP = UP
- MOVE_DOWN = DOWN
- ATTACK_1 = SPACE
- ATTACK_2 = SHIFT_RIGHT
- MEDITATE = M
- USE = SHIFT_LEFT
- HIDE = O
- INVENTORY = I
- SPELLS = K
- TALK = ENTER
- DROP = T
- TAKE = L
- EQUIP = E
- MOVE_LEFT = A
- MOVE_RIGHT = D
- MOVE_UP = W
- MOVE_DOWN = S