lrts/.git
5 weeks agocamera: started work on camera scrolling.
Lukas Krickl [Tue, 3 Mar 2026 04:13:32 +0000 (05:13 +0100)]
camera: started work on camera scrolling.

The input scroll system currently is hard coded in i_input.
This is likely not where it should remain but for now it works just
fine. Changed docs for commands to explicitly mention commands should
*only* affect gameplay and not contain anything related to menus or
camera movement.

5 weeks agotests: Added test filter
Lukas Krickl [Mon, 2 Mar 2026 14:48:36 +0000 (15:48 +0100)]
tests: Added test filter

5 weeks agoSTYLE: Added note about module globals.
Lukas Krickl [Mon, 2 Mar 2026 14:32:57 +0000 (15:32 +0100)]
STYLE: Added note about module globals.

5 weeks agocommands: Commands are not a ring buffer anymore.
Lukas Krickl [Mon, 2 Mar 2026 11:37:59 +0000 (12:37 +0100)]
commands: Commands are not a ring buffer anymore.

Commands now will need to be sorted before they are executed.
This will ensure consistent execution.

5 weeks agocommands: Added tests for command push
Lukas Krickl [Mon, 2 Mar 2026 11:12:37 +0000 (12:12 +0100)]
commands: Added tests for command push

5 weeks agocommand: Added command put
Lukas Krickl [Mon, 2 Mar 2026 10:16:13 +0000 (11:16 +0100)]
command: Added command put

The command queue is a ring buffer and will try to schedule.

5 weeks agoinput: removed i_input_set definition
Lukas Krickl [Mon, 2 Mar 2026 04:02:59 +0000 (05:02 +0100)]
input: removed i_input_set definition

5 weeks agoinput: reworked input to make the platform do less work.
Lukas Krickl [Mon, 2 Mar 2026 04:00:47 +0000 (05:00 +0100)]
input: reworked input to make the platform do less work.

Inputs are now polled based on action entries and the platform simply
has to accept a call of the core code for each action.
Actions now contain a generic scan code and device id to allow the
backend to decide which device to poll.
The device id is opaque. The platform may decide what it means.

5 weeks agoinputs: Added interfce for detecting action presses
Lukas Krickl [Sun, 1 Mar 2026 15:28:03 +0000 (16:28 +0100)]
inputs: Added interfce for detecting action presses

5 weeks agoinput: Added basic input mapping system from platform backend to engine
Lukas Krickl [Sun, 1 Mar 2026 15:04:29 +0000 (16:04 +0100)]
input: Added basic input mapping system from platform backend to engine

This allows a generic action struct to keep the user input state.
The platform is currently in charge of setting the button states based
on scan codes and modifier keys.
A history of previous states is kept to allow detection of keys being
just pressed or held.
Added mouse cursor postion.

5 weeks agocommand: wip added command type for camera movement
Lukas Krickl [Sat, 28 Feb 2026 06:59:16 +0000 (07:59 +0100)]
command: wip added command type for camera movement

5 weeks agomath: Added fixed point sqrt and fp setters and getters
Lukas Krickl [Fri, 27 Feb 2026 20:01:37 +0000 (21:01 +0100)]
math: Added fixed point sqrt and fp setters and getters

This should allow simple operations on fp vectors.

5 weeks agomap: maps now only render partially
Lukas Krickl [Fri, 27 Feb 2026 16:53:01 +0000 (17:53 +0100)]
map: maps now only render partially

If target fps is 0 the program does not crash anymore.

5 weeks agomake: Added addrsan to test build
Lukas Krickl [Fri, 27 Feb 2026 09:25:25 +0000 (10:25 +0100)]
make: Added addrsan to test build

5 weeks agostdio: Added printf and eprintf wrappers
Lukas Krickl [Fri, 27 Feb 2026 09:16:54 +0000 (10:16 +0100)]
stdio: Added printf and eprintf wrappers

5 weeks agomath: Added point in rect tester. Added tests for tile to screen and
Lukas Krickl [Fri, 27 Feb 2026 07:28:27 +0000 (08:28 +0100)]
math: Added point in rect tester. Added tests for tile to screen and
point in rect.

6 weeks agodebug font: rendering white on black now. Changed font spacing
Lukas Krickl [Thu, 26 Feb 2026 20:42:29 +0000 (21:42 +0100)]
debug font: rendering white on black now. Changed font spacing

6 weeks agodebug font: Added basic pixelart font.
Lukas Krickl [Thu, 26 Feb 2026 20:38:49 +0000 (21:38 +0100)]
debug font: Added basic pixelart font.

The font is included as a C header file and was generated using a png
and a quick script.
The font is not complete but good enough as a built-in way of rendering
text.

6 weeks agodebug font: wip adding debug 1bpp embedded font
Lukas Krickl [Thu, 26 Feb 2026 19:33:56 +0000 (20:33 +0100)]
debug font: wip adding debug 1bpp embedded font

6 weeks agodebug: Added debug flag and fps state
Lukas Krickl [Thu, 26 Feb 2026 12:58:08 +0000 (13:58 +0100)]
debug: Added debug flag and fps state

Added debug font renderer. Currently no font is actually loaded until
there is a good way to just grab any system font.
Added u_string.h with sprintf functions.
Added debug rendering.
Removed surface locking. This should be OK since there is only a single
thread.

6 weeks agoupdate: Added tick timing handler
Lukas Krickl [Thu, 26 Feb 2026 11:26:58 +0000 (12:26 +0100)]
update: Added tick timing handler

6 weeks agotimer: Added fps capping and fps calculation.
Lukas Krickl [Thu, 26 Feb 2026 10:50:55 +0000 (11:50 +0100)]
timer: Added fps capping and fps calculation.

Added a few platform functions that give hints about the current
tickrate of the rendering backend.
Added timer struct.
Added tickrate constant for simulation updates.

6 weeks agomap: wip added map struct
Lukas Krickl [Thu, 26 Feb 2026 07:52:35 +0000 (08:52 +0100)]
map: wip added map struct

added more keyboard keys

6 weeks agoinput: Added basic struct for input handling
Lukas Krickl [Thu, 26 Feb 2026 06:41:09 +0000 (07:41 +0100)]
input: Added basic struct for input handling

6 weeks agorender: tile size is now configurable
Lukas Krickl [Thu, 26 Feb 2026 06:19:02 +0000 (07:19 +0100)]
render: tile size is now configurable

6 weeks agor_asset: removed hard dependency on current tile size
Lukas Krickl [Thu, 26 Feb 2026 06:17:14 +0000 (07:17 +0100)]
r_asset: removed hard dependency on current tile size

6 weeks agor_asset: Added fallback tile border
Lukas Krickl [Thu, 26 Feb 2026 06:12:03 +0000 (07:12 +0100)]
r_asset: Added fallback tile border

6 weeks agorender: Added basic template fallback tile for isometric tile drawing.
Lukas Krickl [Thu, 26 Feb 2026 05:43:53 +0000 (06:43 +0100)]
render: Added basic template fallback tile for isometric tile drawing.

This tile is a mask for drawing a solid color tile.

6 weeks agochore: moved mono build to lrts_impl.h
Lukas Krickl [Thu, 26 Feb 2026 04:29:04 +0000 (05:29 +0100)]
chore: moved mono build to lrts_impl.h

6 weeks agorendering: wip asset fallback tile rendering
Lukas Krickl [Wed, 25 Feb 2026 04:23:01 +0000 (05:23 +0100)]
rendering: wip asset fallback tile rendering

6 weeks agotile drawing: wip isometric rendering
Lukas Krickl [Tue, 24 Feb 2026 16:37:08 +0000 (17:37 +0100)]
tile drawing: wip isometric rendering

6 weeks agoassets: wip rendering tiles
Lukas Krickl [Tue, 24 Feb 2026 15:56:31 +0000 (16:56 +0100)]
assets: wip rendering tiles

6 weeks agorendering: Added scaled rendering from frame buffer -> window
Lukas Krickl [Tue, 24 Feb 2026 07:50:49 +0000 (08:50 +0100)]
rendering: Added scaled rendering from frame buffer -> window

6 weeks agorendering: Added generic framebuffer
Lukas Krickl [Tue, 24 Feb 2026 06:57:19 +0000 (07:57 +0100)]
rendering: Added generic framebuffer

This can be used to render a frame to the screen.
The setup of a framebuffer is done by the rendering backend.
It should provide direct access to pixel data.

6 weeks agop_draw: Added basic single pixel draw command
Lukas Krickl [Mon, 23 Feb 2026 21:54:52 +0000 (22:54 +0100)]
p_draw: Added basic single pixel draw command

6 weeks agoengine: wip added setup for drawing pixels
Lukas Krickl [Mon, 23 Feb 2026 20:33:30 +0000 (21:33 +0100)]
engine: wip added setup for drawing pixels

6 weeks agot_unit: removed min and max damage. units now do exact damage.
Lukas Krickl [Mon, 23 Feb 2026 19:00:44 +0000 (20:00 +0100)]
t_unit: removed min and max damage. units now do exact damage.

6 weeks agou_arena: Added basic setup
Lukas Krickl [Mon, 23 Feb 2026 18:53:21 +0000 (19:53 +0100)]
u_arena: Added basic setup

6 weeks agoarena: wip tests and allocation
Lukas Krickl [Mon, 23 Feb 2026 17:00:32 +0000 (18:00 +0100)]
arena: wip tests and allocation

6 weeks agoarena: Added arena alloc and tests
Lukas Krickl [Mon, 23 Feb 2026 14:54:00 +0000 (15:54 +0100)]
arena: Added arena alloc and tests

6 weeks agoengine: Added error handling setup and arena allocator stub
Lukas Krickl [Mon, 23 Feb 2026 07:22:53 +0000 (08:22 +0100)]
engine: Added error handling setup and arena allocator stub

6 weeks agostyle: Allowing stdarg.h in core code.
Lukas Krickl [Mon, 23 Feb 2026 06:50:37 +0000 (07:50 +0100)]
style: Allowing stdarg.h in core code.

This change maks using some functions way easier.

6 weeks agoengine: Added basic logging
Lukas Krickl [Mon, 23 Feb 2026 05:38:23 +0000 (06:38 +0100)]
engine: Added basic logging

6 weeks agoplatform: Added simple event polling and window init code
Lukas Krickl [Sun, 22 Feb 2026 20:11:45 +0000 (21:11 +0100)]
platform: Added simple event polling and window init code

6 weeks agorendering: Added sdl
Lukas Krickl [Sun, 22 Feb 2026 19:52:56 +0000 (20:52 +0100)]
rendering: Added sdl

6 weeks agochor: removed getopt from non-platform code
Lukas Krickl [Sun, 22 Feb 2026 19:21:54 +0000 (20:21 +0100)]
chor: removed getopt from non-platform code

6 weeks agoengine: Added setup for tests
Lukas Krickl [Sun, 22 Feb 2026 19:21:06 +0000 (20:21 +0100)]
engine: Added setup for tests

Added basic tile def

6 weeks agoengine: wip utility functions
Lukas Krickl [Sun, 22 Feb 2026 08:20:00 +0000 (09:20 +0100)]
engine: wip utility functions

6 weeks agoinitial commit
Lukas Krickl [Sun, 22 Feb 2026 05:35:33 +0000 (06:35 +0100)]
initial commit