------
As a n00b, I've found it hard to work out the best way of designing levels/screens but I think I've finally cracked it.
I wanted a tool like AGD has for designing the graphics and maps side-by-side. I decided that it would be best to utilise my regular apps - Aseprite for graphics and Tiled for tilemaps. I've written a little command-line PHP tool which reads files from the two programs and builds ZX BASIC or assembler files. I'll share it when it's a bit more mature.
1) Here's my tileset in Aseprite (postimg has washed out the colours on this shot):
2) The tileset imported into Tiled. I add paper, ink and bright properties to each tile. These are cross-referenced by the tool with the tilemap to build an attribute map of the screen. Later on I'll add support for extra properties for solid blocks, lethal blocks, etc:
3) The tilemap itself, a 32x24 grid of 8x8 tiles representing the Spectrum screen. The tool saves out each layer in a separate file and the intention is to use these layers for objects and/or different screens:
4) In Aseprite I also create a black & white version of the tileset (in another layer) making sure it matches how I've set paper/ink on the tileset. This is converted into binary data by the tool:
Some snippets of BASIC code created:
Code: Select all
Dim tiles(255,7) as uByte => { _
..
{128,128,128,255,8,8,8,255}, _
{80,80,80,95,82,82,82,95}, _
{0,255,0,255,8,8,8,255}, _
...
Dim tilesScreenTiles0(767) as uByte => { _
0,0,0,0,0,0,0,49,0,0,0,0,0,0,1,2,3,4,5,6,7,0,0,0,0,0,0,0,0,0,0,0, _
0,0,50,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0, _
...
Dim tilesScreenValues0(767) as uByte => { _
7,7,7,7,7,7,7,71,7,7,7,7,7,7,15,23,31,32,40,48,56,7,7,7,7,7,7,7,7,7,7,7, _
7,7,69,7,7,7,7,7,7,7,7,7,7,71,79,87,95,96,104,112,120,7,7,7,7,7,7,7,7,7,7,7, _
...
Code: Select all
._tiles_graphics_0
defb @00000000
defb @00000000
...
._tiles_screen_1_attribute_tiles
defb @00000000, @00000000, @00000000, @00000000
defb @00000000, @00000000, @00000000, @00110001
...
._tiles_screen_1_attribute_values
defb @00000111, @00000111, @00000111, @00000111
defb @00000111, @00000111, @00000111, @01000111
...