Arc-Template
Arc-Template
is a template repository for creating games using the Arc framework. The project structure is modular, initially with :core
as common resource, and :desktop
as desktop runtime implementation.
General Structure
The project is divided into 2 modules:
:core
: This should contain resources that's shared to other runtime implementations. Initially, it has:- The
Template
class (tmp/Template
), which is the mainApplicationCore
that's to be supplied with other application modules. - The
Logic
class (tmp/core/Logic
), which is anApplicationListener
that initially updatesTime
. - The
Renderer
class (tmp/core/Renderer
), which is anApplicationListener
that initially handles a very basic example of rendering.
- The
:desktop
: The desktop launcher for the game. Initially, it has:- The
DesktopApp
class (tmp/desktop/DesktopApp
), which holds the entry point that instantiates anSdlApplication
withTemplate
as the main listener. Any errors caught while running will be logged into standard output and popped up in an error window.
- The
Requirements
- JDK 17 or higher.
- A fair knowledge of the Java programming language and the Arc framework.
Using this Template
- Click that big green
Use this template
button to copy this template as your repository. - Refactor. Point of interests:
appName
variable ingradle.properties
.- The window title in
DesktopApp
. - The license's year and licensee.
- Artifact name in the GitHub CI.
- Other non-specific ones.
- Compile and test (currently only desktop testing is available):
- Run
gradlew desktop:run
to run the application. - Run
gradlew core:pack
to re-pack sprites. This task is automatically run if thecore/assets/sprites/
folder isn't available (which it is initially when you clone the template). - Run
gradlew desktop:dist
to pack the entire game and assets into a JAR file, located indesktop/build/libs/
.
- Run