10 Commits

Author SHA1 Message Date
2b2e2a6d02 use decimal instead of binary representation to save space
(cherry picked from commit 54ba73c177)
2026-04-25 09:22:21 +02:00
c378dc95fa update branches description
(cherry picked from commit 2344a2e874)
2026-04-25 09:21:00 +02:00
02e1e4c6b3 update branches description
(cherry picked from commit 4e03aada20)
2026-04-25 08:37:57 +02:00
d413170098 add colors: light gray and brown
(cherry picked from commit 356cf3fb94)
2026-04-25 08:34:26 +02:00
2c37af8dd0 change which 8 bit color is used for dark gray
(cherry picked from commit b7bc9956f9)
2026-04-25 08:34:26 +02:00
f96e2420ef add way to reduce build output's size
(cherry picked from commit 5231f54c27)
2026-04-25 08:34:26 +02:00
17c6b07367 add automatic padding in build script
(cherry picked from commit aad1fa45f7)
2026-04-25 08:34:26 +02:00
f0656aca40 replace texture jump table with dispatch table
(cherry picked from commit 88f10f9f06)
2026-04-25 08:34:26 +02:00
b0758c6976 change the way static RAM variable are declared and used
(cherry picked from commit 6cdb7304c2)
2026-04-25 08:34:26 +02:00
3992863664 remove unused colors.asm const file
(cherry picked from commit e6b2d8b086)
2026-04-25 08:34:26 +02:00
15 changed files with 39 additions and 27 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -29,7 +29,7 @@ const reservedSpacePath = 'src/reserved_space.asm';
const instructionLength = 4; // in bytes
const mapWidth = 15;
const spriteWidth = 17;
const spriteWidth = 5;
const mapMatchingStrings = {
0x00_00_00: '0', // Empty
@@ -38,17 +38,17 @@ const mapMatchingStrings = {
};
const spritesMatchingStrings = {
0x00_00_00: '0b000_000_00',
0x00_00_FF: '0b000_000_11',
0x00_FF_00: '0b000_111_00',
0x99_50_00: `0b010_001_00`,
0x77_77_77: '0b011_011_10',
0xB3_B3_B3: '0b100_100_10',
0xFF_00_00: '0b111_000_00',
0xFF_00_FF: '0b111_000_11',
0xFF_80_00: '0b111_100_00',
0xFF_FF_00: '0b111_110_00',
0xFF_FF_FF: '0b111_111_11',
0x00_00_00: ' 0', // 0b000_000_00
0x00_00_FF: ' 3', // 0b000_000_11
0x00_FF_00: ' 28', // 0b000_111_00
0x99_50_00: ' 68', // 0b010_001_00
0x77_77_77: '110', // 0b011_011_10
0xB3_B3_B3: '146', // 0b100_100_10
0xFF_00_00: '224', // 0b111_000_00
0xFF_00_FF: '227', // 0b111_000_11
0xFF_80_00: '240', // 0b111_100_00
0xFF_FF_00: '248', // 0b111_110_00
0xFF_FF_FF: '255', // 0b111_111_11
};
const mapPath = 'assets/map.ppm';

View File

@@ -9,7 +9,19 @@ It thus should be able to run on the architecture and ISA the players have built
The `main` branch contains a minimal implementation of the game.
The following branches contains variations, allowing comparisons of performances, visuals, gameplay, ...
- `res-2`: 256x192 screen resolution, 17x17 tile
- `res-0-prerendered`:
- `80x60` screen resolution
- `5x5` tile resolution
- initial screen prerendered
- no sprite rotation
- `res-2`:
- `256x192` screen resolution
- `17x17` tile resolution
- `res-2-prerendered`:
- `256x192` screen resolution
- `17x17` tile resolution
- initial screen prerendered
- no sprite rotation
## Build script
@@ -21,8 +33,8 @@ Usage example:
```sh
./build.ts > /path/to/the/game/schematics/architecture/Symfony/sandbox/main.asm
# script output can easily be piped to strip it off all comments, leading whitespace and empty lines:
./build.ts | sed 's/\s*;.*//' | sed 's/^\s*//' | sed '/^\d*$/d' > result.asm
# script output can easily be piped to strip it off all comments, leading whitespace, double spaces and empty lines:
./build.ts | sed -r 's/\s*;.*//' | sed -r 's/^\s+//' | sed -r 's/ +/ /' | sed -r '/^\s*$/d' > result.asm
```
The script is build over Deno's API, so you'll need to have a `deno` binary in your PATH to use it that way.

View File

@@ -1,3 +1,4 @@
; map size 16x12 (or 15x11 with margins)
pub const map.width = 15
pub const map.height = 11
pub const map.size = 165 ; 11*15

View File

@@ -1,9 +1,8 @@
; given:
; -> 256x192 pixels screen
; -> 15x11 tiles map
; => 17x17 pixels tile
; - 16x12 tiles map
; - 5x5 pixels tile
pub const scene.margin_top = 2
pub const scene.margin_bottom = 3
pub const scene.margin_left = 0
pub const scene.margin_right = 1
pub const scene.margin_left = 2
pub const scene.margin_right = 3

View File

@@ -20,7 +20,7 @@ pub const screen.mode_index = 0
pub const screen.mode_value = 2
pub const screen.offset_index = 1
pub const screen.resolution_index = 2
pub const screen.resolution_value = 2
pub const screen.resolution_value = 0
pub const screen.width = 256
pub const screen.height = 192
pub const screen.width = 80
pub const screen.height = 60

View File

@@ -1,6 +1,6 @@
pub const sprites.width = 17
pub const sprites.height = 17 ; unused as sprite are all square
pub const sprites.size = 289 ; height x width
pub const sprites.width = 5
pub const sprites.height = 5 ; unused as sprite are all square
pub const sprites.size = 25 ; height x width
pub const sprites.rotation_0 = 0
pub const sprites.rotation_90 = 1

View File

@@ -23,4 +23,4 @@ Resolution ID | Tile size (in pixels) | Comment
-- | -- | --
`0` | `5x5` | with a reminder of 5 pixels en width and 5 pixels in height.
`1` | `10x10` | with a reminder of 10w and 10h
`2` | `17x17` | with a reminder of 1w and 5h
`2` | `17x17` | no reminder