/Arc-Template

Arc-Template is a template repository for creating games using the Arc framework.

Primary LanguageJavaMIT LicenseMIT

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 main ApplicationCore that's to be supplied with other application modules.
    • The Logic class (tmp/core/Logic), which is an ApplicationListener that initially updates Time.
    • The Renderer class (tmp/core/Renderer), which is an ApplicationListener that initially handles a very basic example of rendering.
  • :desktop: The desktop launcher for the game. Initially, it has:
    • The DesktopApp class (tmp/desktop/DesktopApp), which holds the entry point that instantiates an SdlApplication with Template as the main listener. Any errors caught while running will be logged into standard output and popped up in an error window.

Requirements

  • JDK 17 or higher.
  • A fair knowledge of the Java programming language and the Arc framework.

Using this Template

  1. Click that big green Use this template button to copy this template as your repository.
  2. Refactor. Point of interests:
  3. 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 the core/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 in desktop/build/libs/.