Add ice and movable blocks (#476)

This commit is contained in:
Corwin 2023-09-14 14:58:41 +02:00 committed by GitHub
commit b670ad4a1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 2496 additions and 377 deletions

3
.gitignore vendored
View file

@ -1,4 +1,5 @@
target
/out
template/Cargo.lock
agb*/Cargo.lock
agb*/Cargo.lock
*.tiled-session

View file

@ -5,6 +5,7 @@ use std::{
io::{BufWriter, Write},
str::FromStr,
};
use tiled::{Map, ObjectLayer, TileLayer};
use proc_macro2::TokenStream;
@ -28,6 +29,24 @@ const LEVEL_NAMES: &[&str] = &[
"level_spikes3",
"level_around",
"level_squidprogramming",
"a_familiar_sight",
"block_push_1",
"just_rocks",
"squid_rock",
"ice_ice",
"block_push_2",
"glove_key",
"block_push_3",
"teleporter_1",
"squid_teleport",
"teleporter_2",
"slime_teleporter",
"another_ice",
"another_ice_2",
"another_ice_3",
"another_ice_4",
"hole_introduction",
"rotator_1",
];
fn main() {
@ -38,7 +57,18 @@ fn main() {
let ui_map = load_tmx(&mut tile_loader, "maps/UI.tmx");
let ui_tiles = export_ui_tiles(&ui_map, quote!(ui));
let levels = LEVEL_NAMES
const DPL_LEVELS_ENVIRONMENT_VARIABLE: &str = "DPL_LEVELS";
println!(
"cargo:rerun-if-env-changed={}",
DPL_LEVELS_ENVIRONMENT_VARIABLE
);
let levels: Vec<String> = env::var(DPL_LEVELS_ENVIRONMENT_VARIABLE)
.map(|x| x.split(',').map(|x| x.trim().to_string()).collect())
.unwrap_or(LEVEL_NAMES.iter().map(|x| x.to_string()).collect());
let levels = levels
.iter()
.map(|level| load_level(&mut tile_loader, &format!("maps/levels/{level}.tmx")))
.collect::<Vec<_>>();
@ -100,6 +130,15 @@ enum Entity {
SpikesDown,
SquidUp,
SquidDown,
Ice,
MovableBlock,
Glove,
Teleporter,
Hole,
RotatorUp,
RotatorDown,
RotatorLeft,
RotatorRight,
}
impl FromStr for Entity {
@ -123,6 +162,15 @@ impl FromStr for Entity {
"SPIKES_DOWN" => SpikesDown,
"SQUID_UP" => SquidUp,
"SQUID_DOWN" => SquidDown,
"ICE" => Ice,
"BLOCK" => MovableBlock,
"GLOVE" => Glove,
"TELEPORTER" => Teleporter,
"HOLE" => Hole,
"ROTATOR_LEFT" => RotatorLeft,
"ROTATOR_RIGHT" => RotatorRight,
"ROTATOR_UP" => RotatorUp,
"ROTATOR_DOWN" => RotatorDown,
_ => return Err(()),
})
}
@ -147,6 +195,15 @@ impl quote::ToTokens for Entity {
SpikesDown => quote!(Item::SpikesDown),
SquidUp => quote!(Item::SquidUp),
SquidDown => quote!(Item::SquidDown),
Ice => quote!(Item::Ice),
MovableBlock => quote!(Item::MovableBlock),
Glove => quote!(Item::Glove),
Teleporter => quote!(Item::Teleporter),
Hole => quote!(Item::Hole),
RotatorUp => quote!(Item::RotatorUp),
RotatorDown => quote!(Item::RotatorDown),
RotatorLeft => quote!(Item::RotatorLeft),
RotatorRight => quote!(Item::RotatorRight),
})
}
}
@ -203,6 +260,7 @@ impl quote::ToTokens for EntityWithPosition {
struct Level {
starting_items: Vec<Entity>,
fixed_positions: Vec<EntityWithPosition>,
solution_positions: Vec<EntityWithPosition>,
directions: Vec<Direction>,
wall_bitmap: Vec<u8>,
name: String,
@ -212,6 +270,7 @@ impl quote::ToTokens for Level {
fn to_tokens(&self, tokens: &mut TokenStream) {
let wall_bitmap = &self.wall_bitmap;
let fixed_positions = &self.fixed_positions;
let solution_positions = &self.solution_positions;
let directions = &self.directions;
let starting_items = &self.starting_items;
let name = &self.name;
@ -220,6 +279,7 @@ impl quote::ToTokens for Level {
Level::new(
Map::new(11, 10, &[#(#wall_bitmap),*]),
&[#(#fixed_positions),*],
&[#(#solution_positions),*],
&[#(#directions),*],
&[#(#starting_items),*],
#name,
@ -228,10 +288,10 @@ impl quote::ToTokens for Level {
}
}
fn export_level(map: &tiled::Map) -> Level {
let objects = map.get_layer(1).unwrap().as_object_layer().unwrap();
let fixed_positions = objects.objects().map(|obj| {
fn extract_objects_from_layer(
objects: ObjectLayer<'_>,
) -> impl Iterator<Item = EntityWithPosition> + '_ {
objects.objects().map(|obj| {
let entity: Entity = obj
.name
.parse()
@ -241,7 +301,20 @@ fn export_level(map: &tiled::Map) -> Level {
let y = (obj.y / 16.0) as i32;
EntityWithPosition(entity, (x, y))
});
})
}
fn export_level(map: &tiled::Map) -> Level {
let objects = map
.get_object_layer("Puzzle")
.expect("The puzzle object layer should exist");
let fixed_positions = extract_objects_from_layer(objects);
let solution_positions = extract_objects_from_layer(
map.get_object_layer("Solution")
.expect("Should have an object layer called 'Solution'"),
);
let Some(tiled::PropertyValue::StringValue(starting_items)) = map.properties.get("ITEMS")
else {
@ -296,6 +369,7 @@ fn export_level(map: &tiled::Map) -> Level {
Level {
starting_items: starting_items.collect(),
fixed_positions: fixed_positions.collect(),
solution_positions: solution_positions.collect(),
directions: directions.collect(),
wall_bitmap: bool_to_bit(&are_walls.collect::<Vec<_>>()),
name: level_name.clone(),
@ -303,7 +377,9 @@ fn export_level(map: &tiled::Map) -> Level {
}
fn export_tiles(map: &tiled::Map, background: TokenStream) -> TokenStream {
let map_tiles = map.get_layer(0).unwrap().as_tile_layer().unwrap();
let map_tiles = map
.get_tile_layer("Ground")
.expect("The ground layer should exist");
let width = map_tiles.width().unwrap() * 2;
let height = map_tiles.height().unwrap() * 2;
@ -387,3 +463,22 @@ fn check_bool_to_bit() {
let bools = [true, false, false, false, true, true, true, true];
assert_eq!(bool_to_bit(&bools), [0b11110001]);
}
trait TiledMapExtensions {
fn get_object_layer(&self, name: &str) -> Option<ObjectLayer>;
fn get_tile_layer(&self, name: &str) -> Option<TileLayer>;
}
impl TiledMapExtensions for Map {
fn get_object_layer(&self, name: &str) -> Option<ObjectLayer> {
self.layers()
.find(|x| x.name == name)
.and_then(|x| x.as_object_layer())
}
fn get_tile_layer(&self, name: &str) -> Option<TileLayer> {
self.layers()
.find(|x| x.name == name)
.and_then(|x| x.as_tile_layer())
}
}

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="4">
<properties>
<property name="DIRECTIONS" value="LLRRRRR"/>
<property name="ITEMS" value="ICE"/>
<property name="NAME" value="A familiar sight..."/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,1,6,5,2,2,6,4,8,9,0,
0,10,17,17,12,15,13,17,17,38,0,
0,19,20,20,20,25,20,22,21,27,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="135.08" y="73.5784">
<point/>
</object>
<object id="2" name="HERO" x="71.625" y="73.3966">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="3" name="ICE" x="55.0287" y="71.0787">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="17">
<properties>
<property name="DIRECTIONS" value="RRU"/>
<property name="ITEMS" value="ICE,ICE,ICE,TELEPORTER,TELEPORTER"/>
<property name="NAME" value="How fast can something go?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,1,2,9,0,1,8,6,9,
0,0,0,10,17,18,1,1073741852,17,12,18,
0,1,5,1073741852,17,3221225500,1073741852,14,13,15,47,
0,46,16,17,15,12,16,12,2147483676,26,27,
0,10,12,3221225505,1073741857,3221225505,1073741857,16,18,0,0,
0,37,15,1073741863,2147483689,41,1073741863,13,3221225500,9,0,
0,46,13,17,1073741864,3221225512,14,11,15,18,0,
0,19,28,11,17,16,12,13,11,47,0,
0,0,19,20,22,20,28,15,14,18,0,
0,0,0,0,0,0,19,26,23,27,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="72.2556" y="24.5112">
<point/>
</object>
<object id="2" name="HERO" x="40.4421" y="57.8051">
<point/>
</object>
<object id="3" name="BLOCK" x="120.375" y="57.0922">
<point/>
</object>
<object id="7" name="BLOCK" x="103.637" y="57.0922">
<point/>
</object>
<object id="8" name="SQUID_UP" x="119.687" y="120.146">
<point/>
</object>
<object id="9" name="ICE" x="71.5373" y="43.1058">
<point/>
</object>
<object id="10" name="ICE" x="71.5373" y="58.468">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="12" name="ICE" x="120.834" y="102.72">
<point/>
</object>
<object id="13" name="ICE" x="119.229" y="86.2116">
<point/>
</object>
<object id="14" name="ICE" x="118.999" y="69.0151">
<point/>
</object>
<object id="15" name="TELEPORTER" x="118.541" y="37.3736">
<point/>
</object>
<object id="16" name="TELEPORTER" x="89.4216" y="55.4872">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="156">
<properties>
<property name="DIRECTIONS" value="DDDDLLLDLLLLD"/>
<property name="ITEMS" value="BLOCK,BLOCK,BLOCK,BLOCK,HERO,HERO,TELEPORTER,DOOR"/>
<property name="NAME" value="I must commend you, I'd have given up helping this useless hero by now. They're only going to get stuck again."/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
1,8,2,7,8,8,3,7,4,2,9,
46,17,13,17,13,12,12,15,11,16,38,
10,14,12,11,16,15,16,13,14,17,47,
37,13,16,15,16,13,16,14,16,13,38,
46,17,17,17,17,17,11,17,15,11,38,
46,17,13,12,17,15,15,16,17,15,38,
10,15,17,11,15,12,11,12,17,16,18,
10,13,13,17,15,17,16,13,2147483676,20,27,
19,28,15,13,17,12,2147483676,22,27,0,0,
0,19,24,20,25,20,27,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="27" name="ICE" x="87.1287" y="74.0594">
<point/>
</object>
<object id="28" name="ICE" x="86.8994" y="89.4216">
<point/>
</object>
<object id="33" name="ICE" x="87.1287" y="105.242">
<point/>
</object>
<object id="43" name="ICE" x="55.9458" y="88.5044">
<point/>
</object>
<object id="44" name="ICE" x="56.4044" y="106.159">
<point/>
</object>
<object id="94" name="ICE" x="54.7994" y="74.7473">
<point/>
</object>
<object id="98" name="ICE" x="23.6165" y="104.784">
<point/>
</object>
<object id="99" name="ICE" x="23.1579" y="88.5044">
<point/>
</object>
<object id="100" name="ICE" x="23.3872" y="74.2887">
<point/>
</object>
<object id="102" name="STAIRS" x="73.1423" y="122.668">
<point/>
</object>
<object id="107" name="ICE" x="56.1751" y="123.584">
<point/>
</object>
<object id="110" name="ICE" x="73.8301" y="138.718">
<point/>
</object>
<object id="111" name="ICE" x="87.358" y="138.947">
<point/>
</object>
<object id="114" name="ICE" x="56.6337" y="139.864">
<point/>
</object>
<object id="115" name="ICE" x="40.1251" y="139.177">
<point/>
</object>
<object id="123" name="ICE" x="40.5836" y="74.9766">
<point/>
</object>
<object id="126" name="ICE" x="39.8958" y="91.2559">
<point/>
</object>
<object id="129" name="ICE" x="40.1251" y="106.389">
<point/>
</object>
<object id="130" name="ICE" x="40.3544" y="121.522">
<point/>
</object>
<object id="132" name="ICE" x="23.6165" y="121.063">
<point/>
</object>
<object id="139" name="ICE" x="72.2251" y="106.159">
<point/>
</object>
<object id="142" name="SQUID_UP" x="87.358" y="54.5701">
<point/>
</object>
<object id="143" name="GLOVE" x="86.8994" y="39.2079">
<point/>
</object>
<object id="144" name="TELEPORTER" x="87.358" y="24.075">
<point/>
</object>
<object id="145" name="SPIKES" x="71.308" y="88.963">
<point/>
</object>
<object id="146" name="SPIKES" x="87.8166" y="122.209">
<point/>
</object>
<object id="147" name="ICE" x="72.4544" y="69.703">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="148" name="BLOCK" x="23.8458" y="40.1251">
<point/>
</object>
<object id="149" name="BLOCK" x="24.5336" y="54.3408">
<point/>
</object>
<object id="150" name="TELEPORTER" x="23.1579" y="23.6165">
<point/>
</object>
<object id="151" name="DOOR" x="135.05" y="88.7337">
<point/>
</object>
<object id="152" name="BLOCK" x="135.737" y="103.179">
<point/>
</object>
<object id="153" name="BLOCK" x="101.574" y="102.72">
<point/>
</object>
<object id="154" name="HERO" x="119.229" y="38.5201">
<point/>
</object>
<object id="155" name="HERO" x="153.392" y="22.6993">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="178">
<properties>
<property name="DIRECTIONS" value="ULURULURULURULUR"/>
<property name="ITEMS" value="BLOCK,BLOCK,BLOCK,BLOCK,HERO,SQUID_DOWN,GLOVE"/>
<property name="NAME" value="I did warn you they were going to get stuck again. I can't think of a creature more useless."/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
1,8,2,7,8,8,3,9,1,2,9,
46,2147483676,22,23,28,12,12,38,19,26,27,
19,27,1,9,46,15,16,38,1,5,9,
1,8,32,2147483680,1073741852,13,16,18,37,13,38,
46,17,3221225504,1073741856,17,17,17,38,19,23,27,
19,22,27,19,22,28,16,18,1,7,9,
0,0,0,1,2,32,15,18,19,26,27,
1,4,7,1073741852,15,1073741863,16,3221225500,5,3,9,
37,13,16,13,17,11,13,12,12,11,38,
19,22,22,20,25,22,26,25,26,24,27
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="148" name="ICE" x="70.8494" y="140.323">
<point/>
</object>
<object id="149" name="ICE" x="85.5237" y="139.635">
<point/>
</object>
<object id="150" name="ICE" x="102.72" y="140.552">
<point/>
</object>
<object id="151" name="ICE" x="118.541" y="140.552">
<point/>
</object>
<object id="152" name="ICE" x="135.508" y="140.094">
<point/>
</object>
<object id="154" name="STAIRS" x="71.7665" y="121.98">
<point/>
</object>
<object id="156" name="ICE" x="54.3408" y="137.113">
<point/>
</object>
<object id="162" name="ICE" x="39.8958" y="139.635">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="171" name="BLOCK" x="103.75" y="120.75">
<point/>
</object>
<object id="172" name="BLOCK" x="102.75" y="105.5">
<point/>
</object>
<object id="173" name="BLOCK" x="103" y="89.75">
<point/>
</object>
<object id="174" name="SQUID_DOWN" x="101.5" y="55.75">
<point/>
</object>
<object id="175" name="GLOVE" x="101.75" y="72.75">
<point/>
</object>
<object id="176" name="HERO" x="151.5" y="136.5">
<point/>
</object>
<object id="177" name="BLOCK" x="23.75" y="136.25">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="175">
<properties>
<property name="DIRECTIONS" value="LDDDD"/>
<property name="ITEMS" value="SQUID_UP,ICE,ICE"/>
<property name="NAME" value="In reality, a squid is a friend. They can't help but kill the hero, but they've been helping at every floor!"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,1,7,9,0,0,0,0,0,
0,0,1,1073741852,13,3221225500,8,9,0,0,0,
0,0,37,12,17,16,15,3221225500,9,0,0,
0,0,10,15,11,16,13,15,47,0,0,
0,0,37,16,14,17,14,11,18,0,0,
0,0,10,17,13,17,11,12,38,0,0,
0,0,46,17,16,12,13,11,47,0,0,
0,0,19,28,16,15,17,14,38,0,0,
0,0,0,19,22,28,11,2147483676,27,0,0,
0,0,0,0,0,19,24,27,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="164" name="HERO" x="120.022" y="72.8136">
<point/>
</object>
<object id="165" name="BLOCK" x="103.749" y="72.7514">
<point/>
</object>
<object id="166" name="SPIKES" x="104.324" y="122.816">
<point/>
</object>
<object id="167" name="STAIRS" x="104.656" y="137.806">
<point/>
</object>
<object id="168" name="SWITCH" x="71.6818" y="25.4545">
<point/>
</object>
<object id="171" name="SPIKES" x="71.6364" y="41.4545">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="172" name="ICE" x="87" y="72">
<point/>
</object>
<object id="173" name="ICE" x="70.5" y="56.5">
<point/>
</object>
<object id="174" name="SQUID_UP" x="71.75" y="105.25">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="9">
<properties>
<property name="DIRECTIONS" value="LLLLLLLLUUUU"/>
<property name="ITEMS" value="BLOCK,BLOCK"/>
<property name="NAME" value="Less familiar, but exciting nonetheless"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,1,3,2,6,9,0,0,0,0,0,
0,46,15,14,13,3221225500,4,6,7,7,9,
0,46,12,11,15,16,11,13,15,14,38,
0,46,12,13,14,16,17,14,11,12,18,
0,10,13,16,15,14,12,14,13,15,18,
0,46,16,17,17,13,15,14,16,15,18,
0,19,28,17,11,16,12,15,17,15,38,
0,0,19,20,28,17,17,15,17,2147483676,27,
0,0,0,0,19,21,25,20,23,27,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="3" name="HERO" x="119.458" y="71.7665">
<point/>
</object>
<object id="4" name="SWITCH" x="71.308" y="71.5373">
<point/>
</object>
<object id="5" name="STAIRS" x="86.8994" y="39.6665">
<point/>
</object>
<object id="6" name="DOOR_SWITCHED" x="87.1287" y="54.3408">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="BLOCK" x="54.3408" y="71.9958">
<point/>
</object>
<object id="8" name="BLOCK" x="86.2116" y="68.7858">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="5" nextobjectid="15">
<properties>
<property name="DIRECTIONS" value="RRUURRDD"/>
<property name="ITEMS" value="GLOVE"/>
<property name="NAME" value="Should be simple for a dungoen puzzler such as yourself"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,4,3,9,0,0,0,
0,0,0,1,1073741852,16,15,3221225500,8,9,0,
0,0,0,46,12,15,13,17,11,38,0,
0,0,0,19,24,28,17,2147483676,25,27,0,
0,0,0,0,0,10,13,47,0,0,0,
0,0,0,0,0,19,20,27,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="7" name="STAIRS" x="103.179" y="87.8166">
<point/>
</object>
<object id="9" name="BLOCK" x="86.8994" y="88.2751">
<point/>
</object>
<object id="11" name="BLOCK" x="103.408" y="105.013">
<point/>
</object>
<object id="12" name="HERO" x="69.9323" y="87.1287">
<point/>
</object>
<object id="13" name="BLOCK" x="119.687" y="86.6701">
<point/>
</object>
</objectgroup>
<objectgroup id="4" name="Solution">
<object id="14" name="GLOVE" x="87.1287" y="70.8494">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="22">
<properties>
<property name="DIRECTIONS" value="RRUURRDD"/>
<property name="ITEMS" value="BLOCK,ICE"/>
<property name="NAME" value="Wow, finally a level with nothing new introduced!"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,1,6,2,8,8,9,0,0,0,
0,1,1073741852,17,12,16,12,3221225500,9,0,0,
0,46,11,16,12,17,17,12,38,0,0,
0,46,17,16,12,16,11,14,38,0,0,
0,19,26,28,14,12,14,15,38,0,0,
0,0,0,19,24,28,11,2147483676,27,0,0,
0,0,0,0,0,19,23,27,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="14" name="HERO" x="54.7994" y="55.9458">
<point/>
</object>
<object id="16" name="BLOCK" x="103.408" y="71.7665">
<point/>
</object>
<object id="17" name="SWITCH" x="119.458" y="55.4872">
<point/>
</object>
<object id="18" name="STAIRS" x="103.408" y="87.358">
<point/>
</object>
<object id="19" name="DOOR_SWITCHED" x="104.325" y="103.179">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="20" name="ICE" x="103.637" y="54.3408">
<point/>
</object>
<object id="21" name="BLOCK" x="87.358" y="53.8822">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="9">
<properties>
<property name="DIRECTIONS" value="LLLLLU"/>
<property name="ITEMS" value="KEY,BLOCK"/>
<property name="NAME" value="Hmmmm"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,1,8,3,2,2,8,5,4,9,0,
0,10,17,15,17,11,13,15,16,38,0,
1,1073741852,11,12,11,13,17,13,16,47,0,
10,12,17,14,15,13,13,11,13,18,0,
19,28,12,15,13,13,14,15,13,38,0,
0,19,25,26,24,22,25,24,24,27,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="134.623" y="90.0266">
<point/>
</object>
<object id="2" name="GLOVE" x="119.41" y="88.7763">
<point/>
</object>
<object id="4" name="STAIRS" x="71.4795" y="72.1047">
<point/>
</object>
<object id="5" name="BLOCK" x="103.572" y="90.4434">
<point/>
</object>
<object id="6" name="SPIKES" x="39.8034" y="87.1091">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="KEY" x="71.8693" y="86.8421">
<point/>
</object>
<object id="8" name="BLOCK" x="88.6388" y="86.8421">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="5">
<properties>
<property name="DIRECTIONS" value="RRRRRRRR"/>
<property name="ITEMS" value="BLOCK"/>
<property name="NAME" value="That hero won't survive the fall"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,1,6,5,2,2,6,4,8,9,0,
0,10,17,17,12,15,13,17,17,38,0,
0,19,20,20,20,25,20,22,21,27,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="135.08" y="73.5784">
<point/>
</object>
<object id="2" name="HERO" x="55.8537" y="72.9973">
<point/>
</object>
<object id="3" name="HOLE" x="103.811" y="69.6733">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="4" name="BLOCK" x="72.069" y="72.069">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="18">
<properties>
<property name="DIRECTIONS" value="DDDDRRRD"/>
<property name="ITEMS" value="BLOCK,BLOCK,SWITCH"/>
<property name="NAME" value="Try not to go too far"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,1,6,9,0,0,0,1,6,9,0,
0,10,16,3221225500,9,0,1,1073741852,15,47,0,
0,46,13,17,47,0,37,11,11,18,0,
0,37,13,14,3221225500,7,1073741852,11,11,18,0,
0,10,17,14,11,15,14,17,15,18,0,
0,10,16,13,11,17,16,14,11,18,0,
0,19,21,21,23,28,16,2147483676,26,27,0,
0,0,0,0,0,19,26,27,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="4" name="ICE" x="119.968" y="121.411">
<point/>
</object>
<object id="6" name="ICE" x="103.64" y="120.788">
<point/>
</object>
<object id="7" name="ICE" x="87.1292" y="121.495">
<point/>
</object>
<object id="8" name="HERO" x="39.77" y="59.9001">
<point/>
</object>
<object id="9" name="STAIRS" x="104.248" y="138.423">
<point/>
</object>
<object id="11" name="SQUID_DOWN" x="135.273" y="56">
<point/>
</object>
<object id="13" name="SPIKES" x="135.636" y="89.0909">
<point/>
</object>
<object id="14" name="DOOR_SWITCHED_OPEN" x="70.5455" y="124">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="15" name="BLOCK" x="135.125" y="71.4972">
<point/>
</object>
<object id="16" name="SWITCH" x="136.025" y="102.299">
<point/>
</object>
<object id="17" name="BLOCK" x="54.185" y="120.511">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="5" nextobjectid="12">
<properties>
<property name="DIRECTIONS" value="DRDRRDLRD"/>
<property name="ITEMS" value="BLOCK"/>
<property name="NAME" value="Hmmmmm"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,1,3,5,4,5,9,0,0,0,
0,0,46,17,13,15,11,3221225500,9,0,0,
0,1,1073741852,12,17,15,13,15,3221225500,9,0,
0,10,13,13,13,15,17,11,17,18,0,
0,10,14,13,11,15,12,16,15,47,0,
0,19,20,28,17,16,14,2147483676,21,27,0,
0,0,0,19,21,23,26,27,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="2" name="HERO" x="56.8918" y="56.0583">
<point/>
</object>
<object id="5" name="BLOCK" x="86.6923" y="89.6099">
<point/>
</object>
<object id="7" name="STAIRS" x="119.202" y="108.157">
<point/>
</object>
<object id="8" name="BLOCK" x="71.2711" y="90.4434">
<point/>
</object>
<object id="9" name="BLOCK" x="103.989" y="59.601">
<point/>
</object>
<object id="10" name="BLOCK" x="105.448" y="73.5634">
<point/>
</object>
</objectgroup>
<objectgroup id="4" name="Solution">
<object id="11" name="BLOCK" x="72.3579" y="103.496">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="4">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="5">
<properties>
<property name="DIRECTIONS" value="RRRRRR"/>
<property name="ITEMS" value="KEY"/>
<property name="NAME" value="Keys open doors"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="134.443" y="72.9947">
<point/>
</object>
@ -31,4 +31,9 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="4" name="KEY" x="71.5373" y="71.5373">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="3">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="4">
<properties>
<property name="DIRECTIONS" value="DDDL"/>
<property name="ITEMS" value="DOOR"/>
<property name="NAME" value="You can't go through locked doors"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,3,9,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="87.5735" y="42.2091">
<point/>
</object>
@ -28,4 +28,9 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="3" name="DOOR" x="88.0459" y="84.148">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="6">
<properties>
<property name="DIRECTIONS" value="RRDURRRRR"/>
<property name="ITEMS" value="DOOR"/>
<property name="NAME" value="Keys open more than one door"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="55.3188" y="74.784">
<point/>
</object>
@ -34,4 +34,9 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="5" name="DOOR" x="87.8166" y="70.8494">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="4">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="5">
<properties>
<property name="DIRECTIONS" value="LLLLLLL"/>
<property name="ITEMS" value="SWORD"/>
<property name="NAME" value="You need a sword to kill slimes"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="134.575" y="71.8102">
<point/>
</object>
@ -31,4 +31,9 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="4" name="SWORD" x="103.408" y="69.4737">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="3">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="5">
<properties>
<property name="DIRECTIONS" value="LLRRRRR"/>
<property name="ITEMS" value="SLIME,SWORD"/>
<property name="NAME" value="It takes time to kill slimes"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="135.08" y="73.5784">
<point/>
</object>
@ -28,4 +28,12 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="3" name="SLIME" x="38.7493" y="72.6837">
<point/>
</object>
<object id="4" name="SWORD" x="53.8822" y="71.5373">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="6">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="7">
<properties>
<property name="DIRECTIONS" value="URULUUUUL"/>
<property name="ITEMS" value="DOOR"/>
<property name="NAME" value="You can only hold one item"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="103.958" y="123.868">
<point/>
</object>
@ -37,4 +37,9 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="6" name="DOOR" x="118.954" y="104.169">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="3">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="5" nextobjectid="7">
<properties>
<property name="DIRECTIONS" value="RULDRULDRULD"/>
<property name="ITEMS" value="DOOR,SWORD,SLIME,SQUID_UP"/>
<property name="NAME" value="Now they're just going in circles"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,1,7,4,7,5,2,2,2,9,
0,0,46,11,11,17,13,12,14,16,18,
1,6,1073741852,13,16,11,12,12,13,12,18,
46,16,13,13,15,14,13,16,15,13,47,
37,17,12,14,12,13,17,11,2147483676,26,27,
19,28,11,13,14,11,16,16,18,0,0,
0,37,16,12,13,17,17,15,18,0,0,
0,19,28,16,15,17,15,11,47,0,0,
0,0,46,12,15,12,16,2147483676,27,0,0,
0,0,19,21,25,23,22,27,0,0,0
0,0,0,0,1,7,5,6,9,0,0,
0,0,1,4,1073741852,17,13,13,3221225500,9,0,
0,1,1073741852,13,16,11,12,16,16,18,0,
0,37,13,13,15,14,13,11,11,47,0,
0,46,12,14,12,13,17,17,2147483676,27,0,
0,46,11,13,14,11,16,13,47,0,0,
0,19,28,12,13,17,17,16,47,0,0,
0,0,19,28,15,17,15,2147483676,27,0,0,
0,0,0,19,22,25,20,27,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="72.9779" y="76.2911">
<point/>
</object>
@ -28,4 +28,18 @@
<point/>
</object>
</objectgroup>
<objectgroup id="4" name="Solution">
<object id="3" name="DOOR" x="72.3579" y="57.1247">
<point/>
</object>
<object id="4" name="SWORD" x="87.8152" y="55.5565">
<point/>
</object>
<object id="5" name="SLIME" x="86.9191" y="38.9792">
<point/>
</object>
<object id="6" name="SQUID_UP" x="86.023" y="119.178">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="6">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="8">
<properties>
<property name="DIRECTIONS" value="RRRRRRDDRR"/>
<property name="ITEMS" value="DOOR_SWITCHED_OPEN,SWITCH"/>
<property name="NAME" value="Be careful of the spikes"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="38.5701" y="73.6808">
<point/>
</object>
@ -37,4 +37,12 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="6" name="DOOR_SWITCHED_OPEN" x="119.178" y="74.1501">
<point/>
</object>
<object id="7" name="SWITCH" x="103.272" y="73.254">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="7">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="11">
<properties>
<property name="DIRECTIONS" value="ULULULULULULULUL"/>
<property name="ITEMS" value="DOOR_SWITCHED_OPEN,SWITCH,SWITCH,DOOR_SWITCHED"/>
<property name="NAME" value="Why do people leave things in awkward places?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="133.224" y="106.213">
<point/>
</object>
@ -40,4 +40,18 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="DOOR_SWITCHED_OPEN" x="119.85" y="71.6859">
<point/>
</object>
<object id="8" name="DOOR_SWITCHED" x="101.256" y="71.0138">
<point/>
</object>
<object id="9" name="SWITCH" x="118.73" y="84.6789">
<point/>
</object>
<object id="10" name="SWITCH" x="102.152" y="85.799">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="8">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="11">
<properties>
<property name="DIRECTIONS" value="RRRRRRRRRRRRRR"/>
<property name="ITEMS" value="DOOR,SQUID_DOWN,DOOR_SWITCHED,DOOR_SWITCHED_OPEN"/>
<property name="NAME" value="Why are they running right at it?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,1,8,4,1073741872,2,7,9,0,0,
0,0,37,15,15,1073741863,15,13,3221225500,3,9,
@ -20,7 +20,7 @@
0,0,0,0,0,19,21,22,23,27,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="39.5158" y="73.1744">
<point/>
</object>
@ -43,4 +43,15 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="8" name="SQUID_DOWN" x="136.427" y="55.3325">
<point/>
</object>
<object id="9" name="DOOR" x="135.755" y="120.074">
<point/>
</object>
<object id="10" name="DOOR_SWITCHED_OPEN" x="87.5912" y="72.5819">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="5" nextobjectid="8">
<properties>
<property name="DIRECTIONS" value="RRRRRRRRR"/>
<property name="ITEMS" value="SWORD,SQUID_DOWN,HERO"/>
<property name="NAME" value="Squids keep stealing the treasure. Why did I put them here again?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,1,8,2,6,9,0,0,
0,0,0,0,46,11,11,11,38,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,19,23,27,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="DOOR" x="118.616" y="89.6423">
<point/>
</object>
@ -34,4 +34,15 @@
<point/>
</object>
</objectgroup>
<objectgroup id="4" name="Solution">
<object id="5" name="HERO" x="71.2378" y="86.023">
<point/>
</object>
<object id="6" name="SWORD" x="87.3671" y="86.6951">
<point/>
</object>
<object id="7" name="SQUID_DOWN" x="103.72" y="36.963">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="6">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="9">
<properties>
<property name="DIRECTIONS" value="DDDRRRR"/>
<property name="ITEMS" value="SQUID_DOWN,DOOR_SWITCHED_OPEN,DOOR_SWITCHED,KEY"/>
<property name="NAME" value="I'm sorry squid"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,5,9,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="70.8948" y="41.3376">
<point/>
</object>
@ -37,4 +37,15 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="6" name="SQUID_DOWN" x="70.5275" y="88.0051">
<point/>
</object>
<object id="7" name="DOOR_SWITCHED_OPEN" x="72.1724" y="102.399">
<point/>
</object>
<object id="8" name="KEY" x="72.3781" y="56.9566">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="7">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="12">
<properties>
<property name="DIRECTIONS" value="RDRDRDRRRDDDRR"/>
<property name="ITEMS" value="SWITCH,SWORD,DOOR,SLIME,SLIME"/>
<property name="NAME" value="The key is right there!"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,2,9,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="39.2614" y="90.2111">
<point/>
</object>
@ -40,4 +40,21 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="SWITCH" x="56.4526" y="105.961">
<point/>
</object>
<object id="8" name="SWORD" x="54.4365" y="90.5034">
<point/>
</object>
<object id="9" name="SLIME" x="71.4618" y="116.266">
<point/>
</object>
<object id="10" name="SLIME" x="88.9353" y="117.386">
<point/>
</object>
<object id="11" name="DOOR" x="105.065" y="89.3833">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="10">
<properties>
<property name="DIRECTIONS" value="DDDRRRRRRRRRRRRU"/>
<property name="ITEMS" value="SQUID_UP,SQUID_DOWN,SWITCH,SPIKES,DOOR,KEY"/>
<property name="NAME" value="We used to have treasure in there"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,1,4,8,3,2,3,9,0,
0,0,0,46,11,12,14,16,14,38,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="22.9531" y="73.3414">
<point/>
</object>
@ -34,4 +34,21 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="5" name="KEY" x="21.5058" y="84.4549">
<point/>
</object>
<object id="6" name="DOOR" x="135.307" y="103.048">
<point/>
</object>
<object id="7" name="SQUID_DOWN" x="88.4872" y="40.3233">
<point/>
</object>
<object id="8" name="SPIKES" x="86.6951" y="106.185">
<point/>
</object>
<object id="9" name="SWITCH" x="73.03" y="105.513">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="6">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="8">
<properties>
<property name="DIRECTIONS" value="RDDL"/>
<property name="ITEMS" value="DOOR_SWITCHED,DOOR_SWITCHED_OPEN"/>
<property name="NAME" value="Squids, they have a mind of their own"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,1,7,9,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="SQUID_DOWN" x="39.9103" y="42.1559">
<point/>
</object>
@ -37,4 +37,12 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="6" name="DOOR_SWITCHED" x="134.635" y="54.4365">
<point/>
</object>
<object id="7" name="DOOR_SWITCHED_OPEN" x="119.178" y="86.6951">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="7">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="9">
<properties>
<property name="DIRECTIONS" value="DDDRRRDDDLLL"/>
<property name="ITEMS" value="SWITCH,DOOR"/>
<property name="NAME" value="Why did I put that door there?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,1,8,9,0,0,0,0,0,
1,7,2,32,16,3221225500,9,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,19,23,25,48,22,27,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="DOOR_SWITCHED" x="70.8105" y="58.7495">
<point/>
</object>
@ -40,4 +40,12 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="SWITCH" x="22.4125" y="86.3602">
<point/>
</object>
<object id="8" name="DOOR" x="22.4125" y="39.4789">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="7">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="10">
<properties>
<property name="DIRECTIONS" value="RRDDRRRRRR"/>
<property name="ITEMS" value="KEY,SQUID_DOWN,SQUID_DOWN"/>
<property name="NAME" value="Why does no one look where they're going?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,3,7,6,9,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="40.9779" y="91.8723">
<point/>
</object>
@ -40,4 +40,15 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="SQUID_DOWN" x="86.6951" y="39.2032">
<point/>
</object>
<object id="8" name="SQUID_DOWN" x="118.954" y="39.2032">
<point/>
</object>
<object id="9" name="KEY" x="87.8152" y="56.2286">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="10">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="13">
<properties>
<property name="DIRECTIONS" value="RRRRRRRRRRRRRRR"/>
<property name="ITEMS" value="SWITCH,SWITCH,SWITCH,DOOR_SWITCHED,DOOR_SWITCHED_OPEN,SQUID_UP,SQUID_UP,SQUID_DOWN,SQUID_DOWN"/>
<property name="NAME" value="DO I HAVE TO DO EVERYTHING?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,1,4,3221225492,7,2147483655,3,1073741844,1073741850,2147483649,0,
0,37,2147483659,11,2147483659,2147483665,3221225486,3221225484,1073741839,3221225518,0,
@ -20,7 +20,7 @@
19,2147483672,2147483673,1073741831,1073741832,1073741829,21,1073741826,22,22,27
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="151.602" y="138.188">
<point/>
</object>
@ -49,4 +49,15 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="10" name="SQUID_UP" x="38.2908" y="43.7936">
<point/>
</object>
<object id="11" name="SWITCH" x="39.8958" y="26.8265">
<point/>
</object>
<object id="12" name="SWITCH" x="41.0422" y="85.9823">
<point/>
</object>
</objectgroup>
</map>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="3" nextobjectid="5">
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="6">
<properties>
<property name="DIRECTIONS" value="RLRRRD"/>
<property name="ITEMS" value="DOOR_SWITCHED"/>
<property name="NAME" value="Switches toggle things"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Tile Layer 1" width="11" height="10">
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
@ -20,7 +20,7 @@
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Object Layer 1">
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="72.4717" y="58.9704">
<point/>
</object>
@ -34,4 +34,9 @@
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="5" name="DOOR_SWITCHED" x="87.8166" y="56.6337">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="19">
<properties>
<property name="DIRECTIONS" value="RRRRRRRRRRRRRRRR"/>
<property name="ITEMS" value="DOOR,DOOR,DOOR,DOOR"/>
<property name="NAME" value="There's no way through without a little help"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
1,6,7,7,4,5,3,2,4,7,9,
37,12,14,13,12,15,12,16,14,13,47,
19,22,26,26,26,25,23,22,24,26,27,
1,7,4,7,2,2,8,2,2,5,9,
10,11,14,13,15,11,14,14,12,17,38,
46,12,12,14,12,16,17,15,17,13,18,
10,14,17,14,17,14,16,15,16,11,38,
10,15,16,16,11,11,11,13,16,15,18,
10,12,14,16,14,12,14,13,12,17,47,
19,23,24,26,22,20,24,25,26,25,27
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="3" name="HERO" x="38.75" y="23.5">
<point/>
</object>
<object id="4" name="STAIRS" x="135.25" y="23.25">
<point/>
</object>
<object id="5" name="DOOR_SWITCHED" x="71.5" y="23.5">
<point/>
</object>
<object id="6" name="DOOR_SWITCHED_OPEN" x="103.25" y="22.75">
<point/>
</object>
<object id="7" name="ROTATOR_UP" x="104" y="89.75">
<point/>
</object>
<object id="8" name="SWITCH" x="70.25" y="105.25">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution" visible="0">
<object id="15" name="DOOR" x="121.25" y="74.5">
<point/>
</object>
<object id="16" name="DOOR" x="88.75" y="72.75">
<point/>
</object>
<object id="17" name="DOOR" x="104.5" y="121.25">
<point/>
</object>
<object id="18" name="DOOR" x="38" y="106">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="12">
<properties>
<property name="DIRECTIONS" value="RRRRRRRRUUUUUUUU"/>
<property name="ITEMS" value="DOOR,SWITCH"/>
<property name="NAME" value="How many floors like this are there?"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,1,6,8,5,4,9,
0,0,1,7,8,32,11,17,12,17,38,
0,0,10,14,17,1073741863,14,2147483676,28,13,38,
0,0,37,11,11,13,13,38,46,15,18,
1,8,1073741852,16,16,11,13,18,10,11,38,
37,16,17,12,13,11,17,18,46,11,47,
10,12,2147483676,22,26,23,23,27,10,17,38,
46,16,3221225500,5,6,7,5,3,1073741852,15,47,
10,13,16,15,13,13,12,14,11,12,47,
19,26,20,21,25,20,22,24,21,24,27
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="3" name="HERO" x="24.9004" y="137.709">
<point/>
</object>
<object id="4" name="STAIRS" x="151.508" y="41.3147">
<point/>
</object>
<object id="5" name="DOOR_SWITCHED" x="103.816" y="138.512">
<point/>
</object>
<object id="6" name="DOOR_SWITCHED_OPEN" x="152.025" y="72.1267">
<point/>
</object>
<object id="7" name="ROTATOR_UP" x="23.3112" y="106.209">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="10" name="SWITCH" x="56.25" y="87.5">
<point/>
</object>
<object id="11" name="DOOR" x="86.5" y="88.25">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="15">
<properties>
<property name="DIRECTIONS" value="UULDLDDDDRDRRRD"/>
<property name="ITEMS" value="SWITCH"/>
<property name="NAME" value="There's no way through without a little help"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,1,8,3,9,1,7,9,0,0,0,
1,1073741852,11,11,3221225500,1073741852,13,38,0,0,0,
37,17,16,14,16,14,15,3221225500,7,9,0,
10,11,39,16,2147483676,28,16,16,11,47,0,
37,13,3221225504,24,27,10,15,14,29,30,0,
37,12,3221225500,9,0,37,15,12,15,38,0,
37,11,13,3221225500,6,1073741852,12,15,14,47,0,
19,28,12,11,13,17,11,39,15,38,0,
0,19,22,28,14,15,12,3221225504,26,27,0,
0,0,0,19,20,24,21,27,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="9" name="ROTATOR_UP" x="135.75" y="119.5">
<point/>
</object>
<object id="10" name="HERO" x="54.75" y="56.5">
<point/>
</object>
<object id="11" name="STAIRS" x="88.5" y="141.25">
<point/>
</object>
<object id="12" name="DOOR_SWITCHED" x="22" y="55.5">
<point/>
</object>
<object id="13" name="DOOR_SWITCHED_OPEN" x="87.25" y="120.5">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="14" name="SWITCH" x="103.25" y="88">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="12">
<properties>
<property name="DIRECTIONS" value="UUULLLD"/>
<property name="ITEMS" value="TELEPORTER,TELEPORTER,SQUID_UP,SWITCH"/>
<property name="NAME" value="Hmmmmmmmmmm"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,6,4,3,9,0,0,0,
0,0,1,1073741852,14,15,15,3221225500,8,9,0,
0,1,1073741852,17,15,12,14,17,16,38,0,
0,10,11,39,14,39,15,17,11,18,0,
0,37,16,1073741863,12,1073741863,15,14,12,38,0,
0,46,17,29,2147483677,15,15,11,12,18,0,
0,19,20,28,17,13,11,11,13,47,0,
0,0,0,19,24,28,14,15,2147483676,27,0,
0,0,0,0,0,19,22,22,27,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="STAIRS" x="70.4375" y="75.2306">
<point/>
</object>
<object id="2" name="SLIME" x="72.3131" y="60.6429">
<point/>
</object>
<object id="3" name="HERO" x="118.577" y="107.323">
<point/>
</object>
<object id="5" name="SWORD" x="103.156" y="57.7254">
<point/>
</object>
<object id="6" name="SPIKES" x="70.2291" y="89.6099">
<point/>
</object>
<object id="7" name="SWITCH" x="86.0671" y="57.1002">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="8" name="SQUID_UP" x="102.6" y="71.6859">
<point/>
</object>
<object id="9" name="TELEPORTER" x="102.152" y="40.9954">
<point/>
</object>
<object id="10" name="TELEPORTER" x="70.5658" y="36.515">
<point/>
</object>
<object id="11" name="SWITCH" x="116.714" y="55.1085">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="11">
<properties>
<property name="DIRECTIONS" value="RRRRD"/>
<property name="ITEMS" value="DOOR_SWITCHED_OPEN,SQUID_DOWN,BLOCK"/>
<property name="NAME" value="Hmmmm"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,6,2,7,5,9,0,
0,0,1,8,1073741852,17,15,13,17,38,0,
0,0,46,15,15,11,11,17,15,47,0,
0,0,10,15,12,17,17,15,11,38,0,
0,0,19,21,28,14,17,14,16,18,0,
0,0,0,0,19,24,28,16,13,38,0,
0,0,0,0,0,0,19,22,23,27,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="HERO" x="56.8918" y="88.5679">
<point/>
</object>
<object id="2" name="STAIRS" x="104.198" y="107.323">
<point/>
</object>
<object id="4" name="SPIKES" x="134.206" y="106.281">
<point/>
</object>
<object id="6" name="SWITCH" x="135.457" y="119.202">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="8" name="DOOR_SWITCHED_OPEN" x="119.229" y="88.5044">
<point/>
</object>
<object id="9" name="BLOCK" x="134.362" y="86.4409">
<point/>
</object>
<object id="10" name="SQUID_DOWN" x="133.215" y="71.0787">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="11">
<properties>
<property name="DIRECTIONS" value="ULLDDLD"/>
<property name="ITEMS" value="BLOCK,BLOCK,GLOVE"/>
<property name="NAME" value="Hmmmmmmmm"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
1,7,4,2,6,9,0,1,8,9,0,
10,15,11,17,15,18,0,46,11,18,0,
46,16,14,39,14,47,0,37,14,18,0,
46,11,13,1073741863,17,18,0,46,17,18,0,
10,16,17,11,2147483676,27,0,46,13,38,0,
19,28,11,14,47,0,0,19,22,27,0,
0,37,15,2147483676,27,0,0,0,0,0,0,
0,19,25,27,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="1" name="SQUID_UP" x="136.499" y="88.7763">
<point/>
</object>
<object id="2" name="TELEPORTER" x="136.29" y="56.0583">
<point/>
</object>
<object id="3" name="STAIRS" x="23.1318" y="92.1106">
<point/>
</object>
<object id="4" name="HERO" x="72.9383" y="58.7674">
<point/>
</object>
<object id="5" name="TELEPORTER" x="40.4286" y="91.0686">
<point/>
</object>
<object id="6" name="SPIKES" x="23.3402" y="72.7299">
<point/>
</object>
<object id="7" name="SWITCH" x="40.0118" y="105.448">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="8" name="BLOCK" x="136.196" y="71.5373">
<point/>
</object>
<object id="9" name="GLOVE" x="57.7801" y="39.8958">
<point/>
</object>
<object id="10" name="BLOCK" x="38.9786" y="55.9458">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="8">
<properties>
<property name="DIRECTIONS" value="RRRDRRRR"/>
<property name="ITEMS" value="TELEPORTER"/>
<property name="NAME" value="They say you can't remember moving"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,
0,1,4,5,4,3,7,2,8,9,0,
0,37,11,17,13,16,13,12,17,38,0,
0,19,21,22,20,26,26,20,25,27,0,
0,0,0,1,7,3,3,9,0,0,0,
0,0,1,1073741852,13,16,17,3221225500,9,0,0,
0,0,37,13,11,12,14,13,18,0,0,
0,0,19,21,28,16,2147483676,25,27,0,0,
0,0,0,0,19,25,27,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="3" name="HERO" x="39.3333" y="40.3333">
<point/>
</object>
<object id="4" name="STAIRS" x="87.6667" y="120">
<point/>
</object>
<object id="5" name="TELEPORTER" x="87.6667" y="100.333">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="7" name="TELEPORTER" x="87" y="39.6667">
<point/>
</object>
</objectgroup>
</map>

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.2" orientation="orthogonal" renderorder="right-down" width="11" height="10" tilewidth="16" tileheight="16" infinite="0" nextlayerid="4" nextobjectid="19">
<properties>
<property name="DIRECTIONS" value="RRRRDDDDDDDD"/>
<property name="ITEMS" value="BLOCK,BLOCK,SQUID_DOWN,TELEPORTER,TELEPORTER,GLOVE"/>
<property name="NAME" value="The hero is rather useless without help"/>
</properties>
<tileset firstgid="1" source="../level16.tsx"/>
<layer id="1" name="Ground" width="11" height="10">
<data encoding="csv">
0,0,1,8,7,7,5,9,0,0,0,
1,6,1073741852,15,16,15,13,3221225500,9,0,0,
46,15,11,17,17,12,11,14,47,0,0,
46,13,14,13,14,13,12,2147483676,27,0,0,
46,15,16,17,13,12,17,3221225500,8,9,0,
19,28,13,12,17,12,11,16,13,47,0,
0,19,25,28,15,11,16,12,2147483676,27,0,
0,0,0,19,28,17,2147483676,22,27,0,0,
0,0,0,0,46,15,38,0,0,0,0,
0,0,0,0,19,23,27,0,0,0,0
</data>
</layer>
<objectgroup id="2" name="Puzzle">
<object id="3" name="HERO" x="23.6165" y="40.8129">
<point/>
</object>
<object id="7" name="SWITCH" x="119.687" y="41.2715">
<point/>
</object>
<object id="8" name="BLOCK" x="102.949" y="39.4372">
<point/>
</object>
<object id="9" name="KEY" x="55.7165" y="41.5008">
<point/>
</object>
<object id="10" name="STAIRS" x="85.9823" y="135.05">
<point/>
</object>
<object id="11" name="DOOR" x="87.358" y="118.77">
<point/>
</object>
<object id="12" name="SPIKES" x="87.358" y="102.949">
<point/>
</object>
</objectgroup>
<objectgroup id="3" name="Solution">
<object id="13" name="SQUID_DOWN" x="55.4872" y="23.8458">
<point/>
</object>
<object id="14" name="TELEPORTER" x="54.7994" y="56.1751">
<point/>
</object>
<object id="15" name="TELEPORTER" x="86.6701" y="87.1287">
<point/>
</object>
<object id="16" name="GLOVE" x="38.2908" y="39.2079">
<point/>
</object>
<object id="17" name="BLOCK" x="89.8801" y="40.1251">
<point/>
</object>
<object id="18" name="BLOCK" x="88.0459" y="56.6337">
<point/>
</object>
</objectgroup>
</map>

View file

@ -19,4 +19,184 @@ pub const NUMBERS: &[&str] = &[
"Eighteen",
"Ninteen",
"Twenty",
"Twenty One",
"Twenty Two",
"Twenty Three",
"Twenty Four",
"Twenty Five",
"Twenty Six",
"Twenty Seven",
"Twenty Eight",
"Twenty Nine",
"Thirty",
"Thirty One",
"Thirty Two",
"Thirty Three",
"Thirty Four",
"Thirty Five",
"Thirty Six",
"Thirty Seven",
"Thirty Eight",
"Thirty Nine",
"Forty",
"Forty One",
"Forty Two",
"Forty Three",
"Forty Four",
"Forty Five",
"Forty Six",
"Forty Seven",
"Forty Eight",
"Forty Nine",
"Fifty",
"Fifty One",
"Fifty Two",
"Fifty Three",
"Fifty Four",
"Fifty Five",
"Fifty Six",
"Fifty Seven",
"Fifty Eight",
"Fifty Nine",
"Sixty",
"Sixty One",
"Sixty Two",
"Sixty Three",
"Sixty Four",
"Sixty Five",
"Sixty Six",
"Sixty Seven",
"Sixty Eight",
"Sixty Nine",
"Seventy",
"Seventy One",
"Seventy Two",
"Seventy Three",
"Seventy Four",
"Seventy Five",
"Seventy Six",
"Seventy Seven",
"Seventy Eight",
"Seventy Nine",
"Eighty",
"Eighty One",
"Eighty Two",
"Eighty Three",
"Eighty Four",
"Eighty Five",
"Eighty Six",
"Eighty Seven",
"Eighty Eight",
"Eighty Nine",
"Ninety",
"Ninety One",
"Ninety Two",
"Ninety Three",
"Ninety Four",
"Ninety Five",
"Ninety Six",
"Ninety Seven",
"Ninety Eight",
"Ninety Nine",
"One Hundred",
"One Hundred and One",
"One Hundred and Two",
"One Hundred and Three",
"One Hundred and Four",
"One Hundred and Five",
"One Hundred and Six",
"One Hundred and Seven",
"One Hundred and Eight",
"One Hundred and Nine",
"One Hundred and Ten",
"One Hundred and Eleven",
"One Hundred and Twelve",
"One Hundred and Thirteen",
"One Hundred and Fourteen",
"One Hundred and Fifteen",
"One Hundred and Sixteen",
"One Hundred and Seventeen",
"One Hundred and Eighteen",
"One Hundred and Nineteen",
"One Hundred and Twenty",
"One Hundred and Twenty One",
"One Hundred and Twenty Two",
"One Hundred and Twenty Three",
"One Hundred and Twenty Four",
"One Hundred and Twenty Five",
"One Hundred and Twenty Six",
"One Hundred and Twenty Seven",
"One Hundred and Twenty Eight",
"One Hundred and Twenty Nine",
"One Hundred and Thirty",
"One Hundred and Thirty One",
"One Hundred and Thirty Two",
"One Hundred and Thirty Three",
"One Hundred and Thirty Four",
"One Hundred and Thirty Five",
"One Hundred and Thirty Six",
"One Hundred and Thirty Seven",
"One Hundred and Thirty Eight",
"One Hundred and Thirty Nine",
"One Hundred and Forty",
"One Hundred and Forty One",
"One Hundred and Forty Two",
"One Hundred and Forty Three",
"One Hundred and Forty Four",
"One Hundred and Forty Five",
"One Hundred and Forty Six",
"One Hundred and Forty Seven",
"One Hundred and Forty Eight",
"One Hundred and Forty Nine",
"One Hundred and Fifty",
"One Hundred and Fifty One",
"One Hundred and Fifty Two",
"One Hundred and Fifty Three",
"One Hundred and Fifty Four",
"One Hundred and Fifty Five",
"One Hundred and Fifty Six",
"One Hundred and Fifty Seven",
"One Hundred and Fifty Eight",
"One Hundred and Fifty Nine",
"One Hundred and Sixty",
"One Hundred and Sixty One",
"One Hundred and Sixty Two",
"One Hundred and Sixty Three",
"One Hundred and Sixty Four",
"One Hundred and Sixty Five",
"One Hundred and Sixty Six",
"One Hundred and Sixty Seven",
"One Hundred and Sixty Eight",
"One Hundred and Sixty Nine",
"One Hundred and Seventy",
"One Hundred and Seventy One",
"One Hundred and Seventy Two",
"One Hundred and Seventy Three",
"One Hundred and Seventy Four",
"One Hundred and Seventy Five",
"One Hundred and Seventy Six",
"One Hundred and Seventy Seven",
"One Hundred and Seventy Eight",
"One Hundred and Seventy Nine",
"One Hundred and Eighty",
"One Hundred and Eighty One",
"One Hundred and Eighty Two",
"One Hundred and Eighty Three",
"One Hundred and Eighty Four",
"One Hundred and Eighty Five",
"One Hundred and Eighty Six",
"One Hundred and Eighty Seven",
"One Hundred and Eighty Eight",
"One Hundred and Eighty Nine",
"One Hundred and Ninety",
"One Hundred and Ninety One",
"One Hundred and Ninety Two",
"One Hundred and Ninety Three",
"One Hundred and Ninety Four",
"One Hundred and Ninety Five",
"One Hundred and Ninety Six",
"One Hundred and Ninety Seven",
"One Hundred and Ninety Eight",
"One Hundred and Ninety Nine",
"Two Hundred",
];

View file

@ -11,7 +11,7 @@ use crate::{
use self::{
animation::{Animation, RenderCache},
entity::{Action, EntityMap},
entity::{Action, EntityMap, EntityMapMaker},
};
mod animation;
@ -33,16 +33,21 @@ pub struct Simulation {
impl Simulation {
pub fn generate(
a: impl Iterator<Item = (Item, Vector2D<i32>)>,
entities_to_add: impl Iterator<Item = (Item, Vector2D<i32>)>,
level: &'static Level,
sfx: &mut Sfx,
loader: &mut SpriteLoader,
) -> Simulation {
let mut entities = EntityMap::default();
let mut entities = EntityMapMaker::new();
let mut animation = Animation::default();
for (item, location) in a {
animation.populate(entities.add(item, location), sfx);
for (item, location) in entities_to_add {
entities.add(item, location);
}
let (entities, animations) = entities.make_entity_map();
for ani in animations {
animation.populate(ani, sfx);
}
let mut simulation = Simulation {

View file

@ -8,6 +8,7 @@ use agb::{
display::object::{OamIterator, ObjectUnmanaged, SpriteLoader},
fixnum::{Num, Vector2D},
};
use alloc::vec;
use alloc::vec::Vec;
use slotmap::SecondaryMap;
@ -26,11 +27,15 @@ struct AnimationEntity {
attached: Option<(Item, Num<i32, 10>)>,
}
struct MovePoints {
sound_effect: Option<SoundEffect>,
points: Vec<Vector2D<Num<i32, 10>>>,
}
#[derive(Default)]
struct ToPlay {
moves: Vec<Move>,
move_points: SecondaryMap<EntityKey, MovePoints>,
attach_progress: Vec<AttachProgress>,
fakeout: Vec<FakeOutMove>,
detatch: Vec<Detatch>,
attach: Vec<Attach>,
change: Vec<Change>,
@ -50,9 +55,45 @@ impl ToPlay {
) {
match instruction {
AnimationInstruction::Move(e, p, s) => {
self.moves.push(Move(e, convert_to_real_space(p), s));
let move_points =
self.move_points
.entry(e)
.unwrap()
.or_insert_with(|| MovePoints {
sound_effect: s,
points: map
.get(e)
.map(|x| vec![x.start_position])
.unwrap_or_default(),
});
move_points.points.push(convert_to_real_space(p));
if let Some(sound_effect) = s {
move_points.sound_effect.get_or_insert(sound_effect);
}
}
AnimationInstruction::FakeOutMove(e, d, s) => {
let move_points =
self.move_points
.entry(e)
.unwrap()
.or_insert_with(|| MovePoints {
sound_effect: s,
points: map
.get(e)
.map(|x| vec![x.start_position])
.unwrap_or_default(),
});
if let Some(sound_effect) = s {
move_points.sound_effect.get_or_insert(sound_effect);
}
let &most_recent_position = move_points.points.last().unwrap();
move_points
.points
.push(most_recent_position + convert_to_real_space(d.into()) / 2);
move_points.points.push(most_recent_position);
}
AnimationInstruction::FakeOutMove(e, d, s) => self.fakeout.push(FakeOutMove(e, d, s)),
AnimationInstruction::Detatch(e, nk, s) => self.detatch.push(Detatch(e, nk, s)),
AnimationInstruction::Attach(e, o, s) => {
if let Some(entity_to_attach) = map.get(o) {
@ -118,7 +159,13 @@ impl RenderCache {
let mut score = 0;
if matches!(
self.item,
Item::Stairs | Item::Switch | Item::SwitchPressed | Item::SpikesDown | Item::SpikesUp
Item::Stairs
| Item::Switch
| Item::SwitchPressed
| Item::SpikesDown
| Item::SpikesUp
| Item::Ice
| Item::Teleporter
) {
score += 100000;
}
@ -148,12 +195,6 @@ impl Map {
entity.start_position = destination;
}
}
fn set_entity_to_start_location(&mut self, entity: EntityKey) {
if let Some(entity) = self.map.get_mut(entity) {
entity.rendered_position = entity.start_position;
}
}
}
impl Deref for Map {
@ -170,6 +211,31 @@ impl DerefMut for Map {
}
}
fn lerp_points<N: Copy + core::ops::Mul<Num<i32, 10>, Output = N> + core::ops::Add<Output = N>>(
points: &[N],
t: Num<i32, 10>,
) -> N {
let number_of_points = points.len() as i32;
let slope_for_spike_fn = number_of_points - 1;
let relevant_points_pair_idx = (t * slope_for_spike_fn).floor();
let spike_function_for_first = t * -slope_for_spike_fn + relevant_points_pair_idx + 1;
let spike_function_for_second = t * slope_for_spike_fn - relevant_points_pair_idx;
let first_point_idx = relevant_points_pair_idx as usize;
let &first = points
.get(first_point_idx)
.expect("Maybe input to lerp is out of range?");
let second = points.get(first_point_idx + 1);
if let Some(&second) = second {
first * spike_function_for_first + second * spike_function_for_second
} else {
first
}
}
impl Animation {
pub fn populate(&mut self, instruction: AnimationInstruction, sfx: &mut Sfx) {
self.to_play.populate(instruction, &mut self.map, sfx);
@ -234,25 +300,16 @@ impl Animation {
}
pub fn update(&mut self, sfx: &mut Sfx) -> bool {
if !self.to_play.moves.is_empty()
|| !self.to_play.fakeout.is_empty()
|| !self.to_play.attach_progress.is_empty()
{
if !self.to_play.move_points.is_empty() || !self.to_play.attach_progress.is_empty() {
if self.time >= 1.into() {
// finalise animations
for m in self.to_play.moves.drain(0..) {
for m in self.to_play.move_points.drain() {
let entity = m.0;
let destination = m.1;
let &destination = m.1.points.last().unwrap();
self.map.set_entity_start_location(entity, destination);
}
for m in self.to_play.fakeout.drain(0..) {
let entity = m.0;
self.map.set_entity_to_start_location(entity);
}
for m in self.to_play.attach_progress.drain(0..) {
if let Some(ease) = self
.map
@ -265,34 +322,11 @@ impl Animation {
}
} else {
// play moves and fakeouts
for m in self.to_play.moves.iter_mut() {
let entity = m.0;
let destination = m.1;
sfx.play_sound_effect(m.2.take());
for (entity, move_points) in self.to_play.move_points.iter_mut() {
sfx.play_sound_effect(move_points.sound_effect.take());
if let Some(entity) = self.map.get_mut(entity) {
let location = entity.start_position * (Num::<i32, 10>::new(1) - self.ease)
+ destination * self.ease;
entity.rendered_position = location;
}
}
for m in self.to_play.fakeout.iter_mut() {
let entity = m.0;
let direction = m.1;
let direction = convert_to_real_space(direction.into());
sfx.play_sound_effect(m.2.take());
let go_to = direction / 2;
let start = (self.ease * 2 - 1).abs();
let end_multiplier = -start + 1;
if let Some(entity) = self.map.get_mut(entity) {
let location = entity.start_position + go_to * end_multiplier;
let location = lerp_points(&move_points.points, self.ease);
entity.rendered_position = location;
}
@ -334,9 +368,13 @@ impl Animation {
attached: None,
},
);
self.to_play
.moves
.push(Move(new_key, destination_position, None));
self.to_play.move_points.insert(
new_key,
MovePoints {
sound_effect: None,
points: vec![position, destination_position],
},
);
}
}
} else if !self.to_play.attach.is_empty() {
@ -385,8 +423,6 @@ impl Animation {
}
}
struct Move(EntityKey, Vector2D<Num<i32, 10>>, Option<SoundEffect>);
struct FakeOutMove(EntityKey, Direction, Option<SoundEffect>);
struct Detatch(EntityKey, EntityKey, Option<SoundEffect>);
struct Attach(EntityKey, Item, EntityKey, Option<SoundEffect>);
struct AttachProgress(EntityKey, Option<SoundEffect>);

View file

@ -2,7 +2,7 @@ use agb::{display::object::Tag, fixnum::Vector2D};
use crate::{game::Direction, map::Map, resources};
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, Debug, Hash)]
pub enum Item {
Sword,
Slime,
@ -18,6 +18,15 @@ pub enum Item {
SpikesDown,
SquidUp,
SquidDown,
Ice,
MovableBlock,
Glove,
Teleporter,
Hole,
RotatorRight,
RotatorLeft,
RotatorUp,
RotatorDown,
}
impl Item {
@ -37,6 +46,15 @@ impl Item {
Item::SpikesDown => resources::SPIKES_OFF,
Item::SquidUp => resources::SQUID_UP_SHADOW,
Item::SquidDown => resources::SQUID_DOWN_SHADOW,
Item::Ice => resources::ICE,
Item::MovableBlock => resources::ROCK_SHADOW,
Item::Glove => resources::POW_GLOVE_SHADOW,
Item::Teleporter => resources::TELEPORTER_SHADOW,
Item::Hole => resources::HOLE,
Item::RotatorRight => resources::ROTATOR_RIGHT_SHADOW,
Item::RotatorLeft => resources::ROTATOR_LEFT_SHADOW,
Item::RotatorUp => resources::ROTATOR_UP_SHADOW,
Item::RotatorDown => resources::ROTATOR_DOWN_SHADOW,
}
}
@ -56,6 +74,15 @@ impl Item {
Item::SpikesDown => resources::SPIKES_OFF,
Item::SquidUp => resources::SQUID_UP,
Item::SquidDown => resources::SQUID_DOWN,
Item::Ice => resources::ICE,
Item::MovableBlock => resources::ROCK,
Item::Glove => resources::POW_GLOVE,
Item::Teleporter => resources::TELEPORTER,
Item::Hole => resources::HOLE,
Item::RotatorRight => resources::ROTATOR_RIGHT,
Item::RotatorLeft => resources::ROTATOR_LEFT,
Item::RotatorUp => resources::ROTATOR_UP,
Item::RotatorDown => resources::ROTATOR_DOWN,
}
}
@ -78,6 +105,15 @@ impl Item {
Item::SpikesDown => ZERO,
Item::SquidUp => STANDARD,
Item::SquidDown => STANDARD,
Item::Ice => ZERO,
Item::MovableBlock => ZERO,
Item::Glove => STANDARD,
Item::Teleporter => ZERO,
Item::Hole => ZERO,
Item::RotatorRight => STANDARD,
Item::RotatorLeft => STANDARD,
Item::RotatorUp => STANDARD,
Item::RotatorDown => STANDARD,
}
}
}
@ -87,15 +123,19 @@ pub struct Entity(pub Item, pub Vector2D<i32>);
pub struct Level {
pub map: Map<'static>,
pub entities: &'static [Entity],
#[cfg(test)]
pub solution: &'static [Entity],
pub directions: &'static [Direction],
pub items: &'static [Item],
pub name: &'static str,
}
impl Level {
#[allow(unused_variables)]
const fn new(
map: Map<'static>,
entities: &'static [Entity],
solution: &'static [Entity],
directions: &'static [Direction],
items: &'static [Item],
name: &'static str,
@ -103,6 +143,8 @@ impl Level {
Self {
map,
entities,
#[cfg(test)]
solution,
directions,
items,
name,

View file

@ -22,7 +22,7 @@ impl<'map> Map<'map> {
pub const fn get(&self, index: Vector2D<i32>) -> MapElement {
let (x, y) = (index.x, index.y);
if x > self.width as i32 || y > self.height as i32 {
if x > self.width as i32 || x < 0 || y > self.height as i32 || y < 0 {
MapElement::Wall
} else {
let position = x as usize + y as usize * self.width;

View file

@ -49,6 +49,22 @@ named_tag!(
SQUID_DOWN,
SQUID_UP_SHADOW,
SQUID_DOWN_SHADOW,
ICE,
ROCK,
ROCK_SHADOW,
POW_GLOVE,
POW_GLOVE_SHADOW,
TELEPORTER,
TELEPORTER_SHADOW,
HOLE,
ROTATOR_RIGHT,
ROTATOR_UP,
ROTATOR_LEFT,
ROTATOR_DOWN,
ROTATOR_RIGHT_SHADOW,
ROTATOR_UP_SHADOW,
ROTATOR_LEFT_SHADOW,
ROTATOR_DOWN_SHADOW,
]
);

View file

@ -75,6 +75,7 @@ impl<'a> Sfx<'a> {
SoundEffect::SwordDrop => {}
SoundEffect::SwitchedDoorToggle => {}
SoundEffect::SpikesToggle => {}
SoundEffect::TeleportEffect => {}
}
}
}
@ -101,4 +102,5 @@ pub enum SoundEffect {
SwitchedDoorToggle,
SpikesToggle,
WallHit,
TeleportEffect,
}

View file

@ -68,7 +68,7 @@ check-linker-script-consistency:
find -type f -name gba.ld -print0 | xargs -0 -n1 cmp -- agb/gba.ld
find -type f -name gba_mb.ld -print0 | xargs -0 -n1 cmp -- agb/gba_mb.ld
ci: check-linker-script-consistency build-debug clippy fmt-check test miri build-release test-release doctest-agb build-roms build-book check-docs
ci: check-linker-script-consistency build-debug clippy fmt-check test miri build-release test-release doctest-agb test-games build-roms build-book check-docs
build-roms:
just _build-rom "examples/the-purple-night" "PURPLENIGHT"
@ -103,6 +103,12 @@ _run-tool +tool:
(cd tools && cargo build)
"$CARGO_TARGET_DIR/debug/tools" {{tool}}
test-games:
just test-game the-dungeon-puzzlers-lament
test-game game:
(cd "examples/{{game}}" && CARGO_TARGET_THUMBV4T_NONE_EABI_RUNNER=mgba-test-runner cargo test)
_build-rom folder name:
#!/usr/bin/env bash
set -euxo pipefail