1 ; *** WORM LEVELFILE ***
5 ;Sample levelfile with everything commented.
6 ;Teaches you everything to build your own level.
9 ;-----------------------------------------------------------------------------
11 ;Standard 128x57 FIELD:
13 ;(0,0)> |####(BORDER)#####|
19 ; |#################| <(127,56)
21 ;Drawable screen is (2,2)-(125,54); center is (63.5,28)
23 ;Screen will scroll with screensizes above 128x57 (max.256x256)
24 ;Example 256x80 FIELD (use 0,80):
25 ; +-----------------------------------+
26 ;(0,0)> |#############(BORDER)##############|
32 ; |#"""""""""""""""":""""""""""""""""#|
34 ; |###################################| <(255,255)
35 ; +-----------------------------------+
38 ;-----------------------------------------------------------------------------
40 ;DOUBLE CHECK THE FOLLOWING THINGS:
41 ; * correct name size at .org
42 ; * max. choosable level doesn't exeed actual levels present
43 ; * enough hiscore space (two bytes for each peaworm level!)
46 ;------------------------------- HEADER --------------------------------------
48 ;#include "asm86.h" ;use include files to make your own
49 ;#include "ti86asm.inc" ;singleplayer ending (just like normal asm)
52 .org $F3E3-10 ;$F3E3-[name size]
53 ;^^ <-MUST EQUAL NAME SIZE BELOW!!! If not, Worm will crash!
55 .db 'w',91 ;wormLevel header (version .91)
56 .db 10,"Example #1" ;name size (UPDATE .ORG!!!); level name
57 .dw hiscore-single ;leveldata size
62 .dw single ;points to singleplayer levels below
63 .dw peaworm ;...peaworm level
64 .dw deathmatch ;...deathmatch
65 .dw foodmatch ;...foodmatch
66 .dw linkmatch ;...linkmatch
68 .dw ctf ;...capture the flag
69 .dw domination ;...domination
71 ;note: use <.dw 0> if no levels present (empty level will be used).
73 .db 1,2,3,1 ;max. choosable level for each gametype
74 .db 1,1,1,1 ;so: 1 = level 1 only; 3 = level 1 to 3 available
76 ;again .db 0 indicates no levels present.
79 ;------------------------------- LEVELS --------------------------------------
83 ; .db 5 ;nr. of peas in level
84 ; .db 4 ;delay (0=fastest, 4=normal)
85 ; .db 15 ;growth per pea
87 ; .db 4 ;sprite size (1-8; 0=use default sprite)
88 ; .db %01100000 ;the sprite
92 ; .db 2 ;bouncing balls (0-40)
93 ; .db 2 ;BALL #1: begin y-position
95 ; .db %00 ; direction (%00=right+down, %11=left+up)
96 ; .db 2,7,%00 ;BALL #2: y,x,direction
97 ; .db 0 ;your start direction (0=down,$40=right,$80=up,$C0=left)
98 ; .db 2 ;your y-position (2=at top)
99 ; .db 63 ;your x-position (63=center)
100 ; ;IN MULTIPLAYER LEVELS also set positions for worm 2-4:
101 ;(.db $C0,28,125 ) ;player 2 moves left
102 ;(.db $00, 2, 63 ) ;player 3 moves down
103 ;(.db $80,54, 63 ) ;player 4 moves up
105 ; .db 128,57 ;field size: width (128-255), height (57-255)
106 ; ; screen will SCROLL if size is more than 128,57
107 ; ;IN CTF LEVELS also set flag-positions:
108 ;(.db 10,117 ) ;flag #1 y-position, x-position
109 ;(.db 46,10 ) ;flag #2 y-pos, x-pos.
111 ; .db 2 ;number of lines:
112 ; .db 28,14,100,41 ;LINE #1 coordinates: (x1,y1)-(x2,y2)
113 ; .db 28,41,100,14 ;LINE #2: the same
114 ; .db 1 ;number of boxes:
115 ; .db 16,12,48,12 ;BOX #1: x1,y1,x2,ysize(y2-y1)
116 ;------------ ;THAT'S ALL; repeat for all levels
119 single: ;singleplayer levels start here
131 .db 0,0 ;no lines/boxes
137 .db 1 ;one horizontal line
141 .db 255 ;end marker: no more levels
143 ;Code to run when all levels are done:
144 ;Worm waits a second, then screen is cleared and this code will be run.
146 ret ;no end, quit and continue with stats-screen
148 ;This is a sample ending displaying "Congratulations!!" to use instead of RET:
150 ; call _puts ;display text
151 ; jp _getkey ;wait for a key and return (jp = call+ret)
153 ; .db " Congratulations!!",0
156 peaworm: ;peaworm levels (2)
175 deathmatch: ;deathmatch levels
177 .db $40,28,2 ;begin stats for each player
181 .db 128,57 ;field size
193 .db $40,30,2,$C0,30,125, $00,2,64,$80,54,64
200 .db $40,30,2,$C0,30,125, $00,2,64,$80,54,64
207 .db $40,3,2,$40,6,2, $40,9,2,$40,12,2
217 .db $20,2,2,$A0,54,125, $20,2,7,$A0,54,120
224 hiscore: ;space reserved to store hi-scores
225 .dw 0 ;singleplayer hiscore will be saved here
226 .dw 0,0 ;peaworm hiscore for each peaworm-level