Skip to content

Commit

Permalink
New tileset "alien castle"
Browse files Browse the repository at this point in the history
  • Loading branch information
jvisser committed Apr 10, 2021
1 parent 692aba0 commit 0345a60
Show file tree
Hide file tree
Showing 38 changed files with 19,711 additions and 81 deletions.
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The following features have been implemented:
- 3 and 6 button controller support on both controller ports
- Independent camera with map streaming support for foreground and background
- Background behavior can be configured in the map editor (Tiled)
- 2 working tilesets

## How to run
### Prerequisites
Expand All @@ -33,37 +34,33 @@ The following tools should be on your PATH
- asm68k
- java (>=11)
- maven (>=3)
- sh (to run directly from Tiled. for windows the one supplied with gcc will work)
- sh/bash to run the provided scripts

### Build MapConvert
To build the Tiled map conversion tool run the script `./build_tools.sh`

### Run directly from Tiled
- Open the Tiled project workspace file in `./game/assets/map/`
- Press `alt+r` to compile the map and run the project in BlastEm
- Press `alt+r` to compile the run currently open/focussed map in BlastEm
- This runs the script `./game/src/build_and_run.sh <mapfile>`

### Run on real hardware
Create a ROM image `boot.bin` by runnin the following command from the source root: `asm68k.exe /p .\assembly.asm,boot.bin`.
Put `boot.bin` on a flash card like the Everdrive and run from there.
Create a ROM image `ultradrive.bin` by running the following command from the source root: `asm68k.exe /p .\assembly.asm,ultradrive.bin`.
Put `ultradrive.bin` on a flash card like the Mega EverDrive and run from there.

## Debug build
This adds Gens KMod debug support (Debug message and timers) which can be used in the Gens KMod and Exodus emulators.
This adds Gens KMod debug support (Debug message and timers) available in supported emulators.

Run asm68k from the command line in the source root:
`asm68k.exe /p /e "DEBUG='GENS'" .\assembly.asm,boot.bin`
`asm68k.exe /p /e "DEBUG='GENS'" .\assembly.asm,ultradrive.bin`

This produces a ROM image `boot.bin` which can be loaded in an emulator that supports the kmod debug protocol.
This produces a ROM image `ultradrive.bin` which can be loaded in an emulator that supports the kmod debug protocol.

## Controls
- **dpad**: move placeholder sprite
- **button c**: hold to move fast
- **dpad**: move player sprite
- **button a**: press to initiate manually triggered tileset animations

Collision detection is performed as follows:
- Ceiling collision detection is only performed when moving up.
- Floor collision detection is performed when moving down or left/right.
- Wall collision detection is performed for the direction of movement on the horizontal axis.

- **button b**: hold to disable collision detection
- **button c**: hold to move fast

## Example
![UltraDrive test map running in BlastEm](ultradrive.gif)
1 change: 1 addition & 0 deletions game/assets/graphics/md-palette.hex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
000000
000000
343434
575757
747474
Expand Down
Binary file not shown.
27 changes: 27 additions & 0 deletions game/assets/graphics/tileset/castle/blocks.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
000000
000000
343457
345790
577490
749090
acacac
cecece
ffffff
007457
57ac74
34ceac
ff7400
ff9000
ffac00
ffce00

000000
000000
000034
000074
0000ac
0000ff
5757ff
9090ff
ceceff
ffffff
15 changes: 15 additions & 0 deletions game/assets/map/maps/background/castle.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.5.0" orientation="orthogonal" renderorder="right-down" width="4" height="2" tilewidth="128" tileheight="128" infinite="0" nextlayerid="2" nextobjectid="1">
<properties>
<property name="background_tracker" value="tiling"/>
<property name="camera_lock_horizontal" type="bool" value="false"/>
<property name="camera_lock_vertical" type="bool" value="false"/>
</properties>
<tileset firstgid="1" source="../../tilesets/castle/chunks.tsx"/>
<layer id="1" name="Chunks" width="4" height="2">
<data encoding="csv">
44,44,44,44,
44,44,44,44
</data>
</layer>
</map>
15 changes: 15 additions & 0 deletions game/assets/map/maps/background/castle_abstract.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.5.0" orientation="orthogonal" renderorder="right-down" width="4" height="2" tilewidth="128" tileheight="128" infinite="0" nextlayerid="2" nextobjectid="1">
<properties>
<property name="background_tracker" value="tiling"/>
<property name="camera_lock_horizontal" type="bool" value="false"/>
<property name="camera_lock_vertical" type="bool" value="false"/>
</properties>
<tileset firstgid="1" source="../../tilesets/castle/chunks.tsx"/>
<layer id="1" name="Chunks" width="4" height="2">
<data encoding="csv">
45,46,45,46,
46,45,46,45
</data>
</layer>
</map>
34 changes: 34 additions & 0 deletions game/assets/map/maps/playfield/castle/map1.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.5.0" orientation="orthogonal" renderorder="right-down" width="40" height="20" tilewidth="128" tileheight="128" infinite="0" nextlayerid="2" nextobjectid="1">
<properties>
<property name="background" type="file" value="../../background/castle.tmx"/>
</properties>
<tileset firstgid="1" source="../../../tilesets/castle/chunks.tsx"/>
<layer id="1" name="Chunks" width="40" height="20">
<properties>
<property name="background" type="file" value="../../background/castle.tmx"/>
</properties>
<data encoding="csv">
103,101,104,101,104,101,104,101,104,101,104,101,104,101,104,101,89,130,90,101,104,101,104,101,104,101,104,101,102,193,194,195,196,103,104,101,102,90,104,89,
119,32,0,7,67,98,35,68,69,133,133,71,98,98,74,133,70,2,69,73,72,136,170,171,0,8,69,136,71,225,226,227,211,72,70,0,85,86,69,71,
116,69,133,70,85,104,105,116,85,105,146,179,178,147,203,205,86,2,85,102,146,149,147,187,188,171,85,101,87,195,225,225,227,88,86,2147483658,61,70,85,87,
119,118,145,116,67,68,85,86,2147483657,85,101,105,100,218,219,69,73,35,68,85,89,130,88,138,140,187,188,171,85,101,104,101,104,86,0,76,77,135,66,121,
116,121,161,132,134,116,0,69,170,171,172,83,84,0,9,67,151,103,86,0,31,31,0,0,156,139,140,187,189,70,97,98,35,74,91,92,148,147,53,118,
119,118,103,104,102,135,133,134,210,187,188,171,173,69,70,118,166,119,69,73,98,98,72,71,68,11,156,157,101,86,81,87,130,88,158,159,161,100,82,121,
116,85,86,0,85,104,101,87,130,88,105,187,189,134,132,137,167,119,118,210,203,205,158,159,132,133,136,133,70,0,0,0,2,0,174,175,176,116,9,118,
132,133,71,74,70,0,0,0,31,0,118,148,149,153,228,194,229,119,85,218,219,0,174,175,176,146,149,150,116,2147483655,65,34,2,11,190,191,175,132,66,121,
103,101,87,88,86,67,74,66,67,68,121,161,210,183,147,162,163,132,70,11,0,108,109,70,175,159,210,185,116,7,49,82,2,69,133,66,0,175,131,118,
116,69,170,171,7,83,88,82,83,84,85,104,101,101,101,104,105,100,86,69,122,124,103,86,0,175,176,161,116,2147483655,0,0,2,85,101,82,2147483655,8,2147483659,121,
119,118,145,187,189,70,0,0,31,0,69,136,170,171,0,0,85,86,0,121,148,147,116,0,38,0,192,87,84,2147483658,56,0,2,0,0,107,108,109,70,118,
119,118,161,162,163,132,133,73,98,74,134,146,147,187,189,71,72,133,136,137,161,210,135,70,39,10,0,0,0,7,0,0,2,0,69,122,124,125,84,121,
119,85,104,101,138,140,162,178,179,163,203,205,101,89,130,51,130,51,130,51,130,51,90,86,129,40,41,40,41,40,37,0,2,7,85,89,130,131,0,118,
119,2147483657,69,62,0,156,157,101,104,218,219,0,0,0,0,0,0,2,0,0,0,0,0,0,0,31,31,31,31,31,31,0,2,97,74,70,0,0,0,121,
119,69,71,78,79,0,0,0,67,68,8,65,70,56,0,56,0,2,2147483659,69,71,3,74,0,2147483658,97,40,41,40,41,98,68,2,49,50,86,0,0,0,118,
116,118,148,150,95,96,71,72,137,135,70,81,86,8,8,8,0,2,0,85,89,40,90,0,0,55,31,31,31,0,113,116,2,0,36,37,69,70,11,121,
119,121,164,185,228,226,195,151,193,195,119,69,73,4,5,6,68,2,69,70,0,0,0,0,0,54,67,40,41,40,130,84,2,0,0,0,85,86,69,134,
119,118,161,180,178,147,212,167,225,227,116,85,87,51,130,103,86,2,85,86,0,0,0,0,69,70,118,116,0,0,0,0,2,0,0,0,0,0,85,102,
116,85,104,101,104,101,104,89,90,101,86,0,8,8,8,0,0,2,0,7,38,8,0,8,85,86,83,84,0,0,0,0,2,0,0,0,8,8,0,118,
132,133,136,133,136,133,136,133,136,133,136,73,4,5,6,72,71,35,99,4,39,3,98,6,74,133,136,133,136,133,136,73,35,74,136,71,4,6,72,137
</data>
</layer>
</map>
21 changes: 21 additions & 0 deletions game/assets/map/maps/playfield/castle/map2.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.5" tiledversion="1.5.0" orientation="orthogonal" renderorder="right-down" width="19" height="10" tilewidth="128" tileheight="128" infinite="0" nextlayerid="2" nextobjectid="1">
<properties>
<property name="background" type="file" value="../../background/castle_abstract.tmx"/>
</properties>
<tileset firstgid="1" source="../../../tilesets/castle/chunks.tsx"/>
<layer id="1" name="Chunks" width="19" height="10">
<data encoding="csv">
100,104,101,104,101,104,101,104,101,104,101,104,101,104,101,104,101,104,102,
119,97,56,74,8,73,56,99,0,97,41,40,74,0,97,40,40,74,118,
116,39,0,55,3,39,0,39,0,39,8,8,39,0,39,8,8,39,121,
119,55,0,89,56,90,0,55,0,55,4,6,55,0,55,3,4,55,118,
116,39,0,0,2,0,0,39,0,113,40,40,115,0,113,40,41,90,121,
119,55,0,0,2,0,0,55,0,55,0,0,55,0,55,0,2,0,118,
116,39,0,0,2,0,0,39,0,39,0,0,39,0,39,0,2,0,121,
119,55,0,0,2,0,0,55,0,55,0,0,55,0,55,0,2,0,118,
116,54,0,0,2,0,0,54,0,54,0,0,54,0,54,0,2,0,121,
132,133,136,71,35,72,136,133,136,133,136,133,136,133,136,73,98,74,134
</data>
</layer>
</map>
2 changes: 1 addition & 1 deletion game/assets/map/maps/playfield/test/map1.tmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.4" tiledversion="1.4.3" orientation="orthogonal" renderorder="right-down" width="100" height="30" tilewidth="128" tileheight="128" infinite="0" nextlayerid="2" nextobjectid="1">
<map version="1.5" tiledversion="1.5.0" orientation="orthogonal" renderorder="right-down" width="100" height="30" tilewidth="128" tileheight="128" infinite="0" nextlayerid="2" nextobjectid="1">
<properties>
<property name="background" type="file" value="../../background/test.tmx"/>
</properties>
Expand Down
Binary file added game/assets/map/tilesets/castle/assets/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0345a60

Please sign in to comment.