Skip to content
Browse files

Thinking about a few more cleaning game mechanics, and started buildi…

…ng an AX-C355R requisition controller which will dispense consumable items.
  • Loading branch information...
1 parent 5fe813d commit d383ba382304a40ec8f17d594c6b10ea6fed319e @JohnEarnest committed
View
3 games/CleanSweep/CleanEngine.fs
@@ -220,11 +220,10 @@
##
######################################################
-: spawn-npc ( tile-x tile-y frame 'logic 'trigger -- )
+: spawn-npc ( tile-x tile-y frame 'logic 'trigger -- id )
>r spawn
r> over trigger !
true over solid !
- drop
;
: face-player ( id -- )
View
BIN games/CleanSweep/LabTiles.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN games/CleanSweep/Scrubby.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
97 games/CleanSweep/TestLevels.fs
@@ -27,8 +27,8 @@
40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 1073741864 1073741864 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 -1
40 40 40 11 11 11 10 10 41 10 10 10 10 10 10 10 10 10 10 1073741936 1073741937 10 10 10 10 10 114 115 10 10 10 40 40 11 11 11 10 10 10 10 -1
40 40 40 11 11 11 10 10 10 10 10 10 10 10 10 10 10 10 127 1073741952 1073741953 10 10 10 10 10 130 131 10 44 10 40 40 11 11 11 83 84 10 10 -1
- 40 40 40 116 11 11 10 10 10 10 10 10 10 10 10 10 10 10 127 -1 -1 10 10 10 10 10 132 133 10 10 127 40 40 116 11 11 99 100 10 10 -1
- 40 40 40 132 45 11 127 127 11 11 11 11 10 10 10 10 10 10 42 -1 -1 127 10 10 10 42 75 76 10 127 127 40 40 132 11 11 127 10 10 10 -1
+ 40 40 40 116 11 11 10 10 10 10 10 10 10 10 10 10 10 10 127 -1 -1 147 148 10 10 10 132 133 10 10 127 40 40 116 11 11 99 100 10 10 -1
+ 40 40 40 132 45 11 127 127 11 11 11 11 10 10 10 10 10 10 42 -1 -1 163 164 10 10 42 75 76 10 127 127 40 40 132 11 11 127 10 10 10 -1
40 40 40 75 61 59 60 46 47 46 47 59 60 43 60 60 60 60 60 -1 -1 60 60 60 60 60 40 40 60 60 60 40 40 75 59 59 60 60 43 60 -1
40 40 40 18 77 18 0 62 63 62 63 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40 40 18 18 18 0 0 0 16 0
40 40 40 18 18 18 0 78 79 78 79 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 10 18 18 18 0 0 0 16 0
@@ -85,7 +85,7 @@
0 GS ! grid-center-hallway GP !
closet 19 6 spawn-door
8 14 spawn-scrubby
- 20 16 16 ' janet-tick ' janet-talk spawn-npc
+ 20 16 16 ' janet-tick ' janet-talk spawn-npc drop
;
: main-center-hallway
@@ -142,7 +142,7 @@
: init-right-hallway
0 GS ! grid-right-hallway GP !
- 8 14 22 { drop } 0 spawn-npc
+ 8 14 22 { drop } 0 spawn-npc drop
right-garbage 20 10 spawn-garbage-can
;
@@ -218,30 +218,30 @@
######################################################
:data grid-closet
- -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 249 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 10 10 10 10 10 10 8 22 22 22 22 22 22 22 22 22 22 22 22 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 10 10 10 10 10 10 8 22 22 126 22 126 22 22 22 85 86 87 22 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 10 10 10 10 45 10 8 22 22 22 22 22 22 22 22 101 102 103 22 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 26 26 26 26 61 26 8 24 24 24 24 24 24 24 56 57 58 24 24 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 18 18 18 18 77 18 18 18 18 18 18 18 18 18 72 73 74 18 18 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 18 18 0 0 36 18 2 2 2 2 2 2 2 2 36 18 18 18 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 18 18 2 2 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 18 18 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 56 57 58 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 72 73 74 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 72 73 74 38 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 72 73 74 18 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 18 18 18 18 2 2 2 0 16 16 16 16 0 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 18 18 2 2 2 2 2 0 16 16 16 16 0 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
- -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 40 40 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 40 40 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 40 40 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 1073741864 40 40 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 10 10 10 10 10 134 1073741952 1073741953 1073741959 1073741958 1073741952 1073741953 1073741959 1073741958 1073741952 1073741953 135 10 10 10 10 10 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 10 10 10 10 10 10 10 134 1073741952 1073741953 135 134 1073741952 1073741953 135 10 10 10 10 10 10 10 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 10 10 10 10 10 10 10 10 60 60 60 60 60 60 10 10 10 10 10 10 10 10 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 60 60 60 60 60 60 60 76 149 150 150 150 150 151 59 60 60 60 60 60 60 60 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 149 150 150 151 149 150 150 151 149 88 89 89 90 151 149 150 150 151 149 150 150 151 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 88 89 89 90 88 89 89 90 88 89 90 88 89 90 88 89 89 90 88 89 89 90 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 88 73 89 90 88 89 73 90 18 18 18 18 18 18 88 73 89 90 88 73 89 90 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 88 89 73 90 88 89 73 90 18 2 2 2 2 2 88 73 73 90 88 29 73 90 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 72 73 73 74 72 73 73 74 18 2 2 2 2 0 72 73 73 74 72 73 73 74 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 18 18 18 18 18 18 18 18 18 2 2 0 0 0 36 18 18 18 18 18 18 18 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 1073741973 1073741974 1073741974 1073741975 1073741973 1073741974 1073741974 1073741975 2 2 2 0 0 0 1073741973 1073741974 1073741974 1073741975 1073741973 1073741974 1073741974 1073741975 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 88 89 89 90 88 89 89 90 2 2 2 0 0 0 88 89 89 90 88 89 89 90 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 88 89 73 90 88 29 89 90 2 2 2 2 2 2 88 73 89 90 88 89 89 90 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 88 89 73 90 88 89 73 90 18 2 2 2 2 2 88 89 73 90 88 89 73 90 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 72 73 73 74 72 73 73 74 18 2 2 2 2 2 72 73 73 74 72 73 73 74 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 18 18 18 18 18 18 18 18 18 2 2 2 2 2 36 18 18 18 18 18 18 18 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 18 18 2 2 2 2 2 2 2 16 16 16 16 2 2 2 2 2 2 2 2 2 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 16 16 16 16 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 1073741895 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 40 40 40 40 40 1073741895 1073741895 1073741895 1073741895 40 40 40 40 40 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 40 40 40 40 40 40 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
@@ -250,10 +250,47 @@
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+:data bob-delta
+-1 -1 -2 -1 0 0 0
+ 1 1 2 1 0 0 0
+
+: bob ( id -- )
+ >r
+ i timer inc@
+ i timer @ 8 mod -if
+ i prev @ bob-delta + @
+ dup 0 < if 61 else 60 then i tile!
+ i +py
+ i prev @ 1 + 14 mod i prev !
+ then
+ rdrop
+;
+
+: follow ( id -- )
+ >r
+ i px 16 - player @ px over 32 + within if
+ 62 i tile!
+ else
+ 63 i tile!
+ player @ px i px < if
+ i face-left
+ else
+ i face-right
+ then
+ then
+ rdrop
+;
+
: init-closet
0 GS ! grid-closet GP !
- 20 16 spawn-scrubby
- 48x16 20 18 spawn-exit-door
+ 19 16 spawn-scrubby
+ 48x16 19 20 spawn-exit-door
+
+ 15 3 61 ' bob 0 spawn-npc 10 swap timer !
+ 23 3 61 ' bob 0 spawn-npc 2 swap prev !
+ 17 3 60 ' bob 0 spawn-npc 3 swap prev !
+ 21 3 60 ' bob 0 spawn-npc 7 swap prev !
+ 19 4 62 ' follow 0 spawn-npc drop
;
: main-closet

0 comments on commit d383ba3

Please sign in to comment.
Something went wrong with that request. Please try again.