diff options
-rw-r--r-- | maplist.lua | 4 | ||||
-rw-r--r-- | maps/platform.png | bin | 23382 -> 0 bytes | |||
-rw-r--r-- | maps/readme.md | 88 | ||||
-rw-r--r-- | maps/rill.lua | 51 |
4 files changed, 128 insertions, 15 deletions
diff --git a/maplist.lua b/maplist.lua index ef45fce..ba35085 100644 --- a/maplist.lua +++ b/maplist.lua @@ -1,4 +1,4 @@ return { "default", - "emo" -}
\ No newline at end of file + "rill" +} diff --git a/maps/platform.png b/maps/platform.png Binary files differdeleted file mode 100644 index 69cd60b..0000000 --- a/maps/platform.png +++ /dev/null diff --git a/maps/readme.md b/maps/readme.md index 5d0a8ee..dc139ad 100644 --- a/maps/readme.md +++ b/maps/readme.md @@ -1,20 +1,82 @@ # Mapmaking -*Hugs Emo*. -### Center -It is the center of the map. Camera will use it for tracking and together with **map size** they will cause deaths to players (IRL). +*Hugs Emo* -### Size -This is used for camera and checking if naut should die. Camera tracks nauts that are in rectangle with *width* x *height* size with its center in **map center**. +### Name (string) +Name of the map. Should be same as the filename. *I think*. +```lua +name = "default" +``` -Nauts will die if they are outside of rectangle with *width⋅2* x *height⋅2* size also with its center in the **map center**. +### Center (int) +Coordinates of center of the map. Camera zone and death zone are placed relative to it. +```lua +center_x = 0, +center_y = 0 +``` -### Colors -In RGBA format. +### Size (int) +Width and height of playground. Camera zone and death zone sizes are calculated based on map size. +```lua +width = 360, +height = 240 +``` -### Respawns -Global coordinates to each respawn point. +### Respawns (table, int) +Table of possible respawn points. Players will randomly spawn on one of these points. +```lua +respawns = { + {x = -15, y = -80}, + {x = -5, y = -80}, + {x = 5, y = -80}, + {x = 15, y = -80} +} +``` -### Platforms -This image should explain most parts of creating platforms: +### Clouds (bool) +Presence of clouds. Clouds will spawn if set to **true**. +```lua +clouds = true +``` -![alt](https://raw.githubusercontent.com/nthirtyone/not-nautz/master/maps/platform.png) +### Background (string) +Path to background image in the game structure. It will be used as fixed background. +```lua +background = "assets/background-default.png" +``` + +### Platforms (table, int, string) +Platforms on which player can stand. They will be placed on given coordinates with given sprite and shape. +Shape are points placed relatively to platform's coordinates. Shape points are connected in given order. On top of that last point is connected with first one. +```lua +platforms = { + { + x = -91, + y = 0, + shape = {0,1, 181,1, 181,10, 96,76, 86,76, 0,10}, + sprite = "assets/platform_big.png" + }, + { + x = 114, + y = 50, + shape = {0,1, 52,1, 52,30, 0,30}, + sprite = "assets/platform_small.png" + } +} +``` + +### Decoration (table, int, string) +Decorations are objects in the background which are not fixed but move alongside with foreground objects (platforms, players, clouds). They do not have physical body. +```lua +decorations = { + { + x = -80, + y = 10, + sprite = "assets/decoration_big.png" + }, + { + x = 50, + y = 50, + sprite = "assets/decoration_small.png" + } +} +```
\ No newline at end of file diff --git a/maps/rill.lua b/maps/rill.lua new file mode 100644 index 0000000..bf915d3 --- /dev/null +++ b/maps/rill.lua @@ -0,0 +1,51 @@ +return { + -- CENTER AND SIZE + name = "rill", + center_x = 0, + center_y = 60, + width = 320, + height = 240, + -- RESPAWN POINTS + respawns = { + {x = -100, y = 10}, + {x = -100, y = 10}, + {x = 100, y = 10}, + {x = 100, y = 10} + }, + -- GRAPHICS + clouds = false, + background = "assets/background-rill.png", + platforms = { + { + x = -120, + y = 30, + shape = {0,0, 40,0, 40,15, 0,15}, + sprite = "assets/platform_top.png" + }, + { + x = 80, + y = 30, + shape = {0,0, 40,0, 40,15, 0,15}, + sprite = "assets/platform_top.png" + }, + { + x = -15, + y = 70, + shape = {0,0, 30,0, 30,15, 0,15}, + sprite = "assets/platform_top.png" + }, + { + x = -110, + y = 90, + shape = {0,0, 10,-10, 90,80, 80,90}, + sprite = "assets/platform_top.png" + }, + { + x = 110, + y = 90, + shape = {0,0, -10,-10, -90,80, -80,90}, + sprite = "assets/platform_top.png" + } + }, + decorations = {} +}
\ No newline at end of file |