Chapter X: v1.4.2 toolkit

Chapter 1 covers Actor / World / Main. This chapter is the rest of the public surface that shipped with v1.4.2: a unified clock, interpolated drawing, classpath assets, camera, config, and the utils package.

Simulation vs render

GameLoop updates on a fixed tick and sets a render alpha on the world between ticks. Gameplay code should keep using getX() / getY(). If you override paint, draw with the interpolated helpers so motion stays smooth:

Missed ticks are absorbed in the loop so a hitch does not spiral. Target FPS still comes from Activerse.properties.

ResourcePaths

Images and sounds resolve through ActiverseUtils.ResourcePaths: existing filesystem path first, otherwise a classpath URL (so java -jar still finds assets). Prefer relative keys such as assets/images/player.png and keep the same layout on disk and in the jar.

setImage(new ActiverseImage("assets/images/player.png"));
ActiverseSound step = new ActiverseSound("assets/sounds/step.wav");

Camera

ActiverseEngine.Camera is a viewport helper for scrolling worlds. World does not construct one for you; create it, call update() each tick, and convert coordinates when you paint or handle clicks.

Camera cam = new Camera(800, 600, 0.1f);
cam.setWorldBounds(worldWidth, worldHeight);
cam.setTarget(player);
cam.update();
double alpha = getRenderAlpha();
int screenX = cam.worldToScreenInterpolated(player.getX(), player.getY(), alpha).x;

ConfigPuller

ConfigPuller.getBoolean, getInt, getString read engine keys only from Activerse.properties. Other keys may fall through to settings.ini. The settings menu can persist engine toggles back to disk with saveEngineSettings (writes src/Activerse.properties when a src folder exists, otherwise the working directory copy).

KeyboardInfo extras

Actor extras

ActiverseUtils map

Class Use
Physics, ActorVector, MathUtilsMotion, vectors, clamps, distance
PerlinNoise, WorldGenerationProcedural terrain
WorldManager, WorldKeysSave/load under a Worlds/ folder
ParticleSystemSimple particle actors
Shaper, TextLabel, UIBar, PanelPainter, TextRenderUtilsHUD and shapes
ImageUtils, ColorUtilsImage size and color helpers
FileUtils, JsonUtils, IniUtilsFiles and config formats
Timer, DelayScheduler, DaemonExecutorsTiming and background work
ErrorLoggerACEHS formatting — Chapter 3

Full method lists are in the generated JavaDoc at /Activerse/. For the architecture write-up (clock, interpolation, lineage from v1.0), see Developers Insider Release 2 (PDF). Return to Chapter 0 or the Activerse home page.