Commit Graph

125 Commits

Author SHA1 Message Date
Eevee (Evelyn Woods)
325960b609 Allow only players, ice blocks, directional blocks, and rovers to reveal walls 2020-09-15 00:32:24 -06:00
Eevee (Evelyn Woods)
6d26362cb0 Remove the hesitation check from sliding teeth 2020-09-14 22:30:12 -06:00
Eevee (Evelyn Woods)
2ee61634a6 Separate "can enter" from "can push" checks
This fixes several bugs surrounding block pushing (e.g. flicking) and
slapping through thin walls and off of solid things.

It should also fix animation delay when pushing a block off a turtle and
create the CC2 behavior of pushing a block off a popwall and then being
blocked by the resulting wall.
2020-09-14 22:25:28 -06:00
Eevee (Evelyn Woods)
48e03f3225 Restore the splash when pushing a block into water; fix splash/explosion in TW tileset 2020-09-14 21:52:27 -06:00
Eevee (Evelyn Woods)
dee2970ad3 whoops this is important too 2020-09-14 21:52:00 -06:00
Eevee (Evelyn Woods)
67228d89d1 Fix bumping to only happen on departure; add a CC2 input tiebreaker 2020-09-14 21:45:27 -06:00
Eevee (Evelyn Woods)
045bcb5789 Remove blocks' knowledge of their pusher's speed 2020-09-14 21:09:05 -06:00
Eevee (Evelyn Woods)
c214aeb0c6 Blocks pushed onto force floors should move at slide speed 2020-09-14 20:42:28 -06:00
Eevee (Evelyn Woods)
468a1d44ba Get wire rendering correctly, at least for floors 2020-09-14 19:34:48 -06:00
Eevee (Evelyn Woods)
13b4180ab8 Make teleporting undoable 2020-09-14 18:09:13 -06:00
Eevee (Evelyn Woods)
b88d42582c Stub out enough stuff to get CC2 Lesson 5 loading
- Wire is...  well, ignored
- Pink and black buttons load but don't do anything
- Railroad is loaded but doesn't do anything
- Bowling ball, purple toggle wall/floor, rover...  you get the idea
- Railroad sign would work if railroad did, though
2020-09-14 17:25:30 -06:00
Eevee (Evelyn Woods)
ec41139960 Stub out enough to get CC2 Lesson 4 loading
- Gender signs: implemented
- Transmogrifier: basically implemented
- Yellow tank: basically implemented
- Directional blocks: load but don't draw or behave correctly
- Floor mimic: moves at hyperspeed
- Secret eye: no effect
2020-09-14 16:03:35 -06:00
Eevee (Evelyn Woods)
54aaed73a0 Green bombs also count towards the required chip count 2020-09-14 14:15:54 -06:00
Eevee (Evelyn Woods)
c913df5e53 Players can't escape creatures exactly behind them 2020-09-12 21:16:48 -06:00
Eevee (Evelyn Woods)
090ba24062 Allow players to turn in traps 2020-09-12 21:06:06 -06:00
Eevee (Evelyn Woods)
f511e2ecb9 Make cloning undoable 2020-09-12 21:00:50 -06:00
Eevee (Evelyn Woods)
b26820d99b Fix revealing the void under a block hiding an item in CC1 2020-09-12 20:58:28 -06:00
Eevee (Evelyn Woods)
d3dfcba63b Don't remove the player when stepping on a bomb; it breaks things 2020-09-12 20:45:34 -06:00
Eevee (Evelyn Woods)
afa132bd4c Undo GCing the actor list 2020-09-12 20:36:11 -06:00
Eevee (Evelyn Woods)
5ccaad4666 Remember the player's secondary direction earlier 2020-09-12 20:11:14 -06:00
Eevee (Evelyn Woods)
5d39e37ad2 Implement CC2 input handling, bumping, and block slapping 2020-09-12 20:07:26 -06:00
Eevee (Evelyn Woods)
64bd6c49d9 Implement Melinda basics: ignores ice, can't walk on dirt/gravel 2020-09-12 19:03:38 -06:00
Eevee (Evelyn Woods)
ee333ddb7d Always update the previous cell when drawing force floors 2020-09-11 17:42:46 -06:00
Andrew Ekstedt
f0f2259aa1 Improve support for High DPI displays
On high DPI displays, a logical pixel does not necessarily equal a
device pixel. Images and such are scaled up to the logical pixel size;
unfortunately this introduces ugly aliasing. Web pages can take
advantage of high DPI screens by intentionally scaling stuff down to be
displayed at a higher resolution. By carefully canceling out the
automatic scaling of the game canvas we get nice crisp pixels even on
high DPI screens.

See the pull request for before/after screenshots.
2020-09-11 16:17:36 -07:00
Eevee (Evelyn Woods)
d3e60b88fa Stub out enough for CC2's Lesson 3 to load 2020-09-10 21:21:30 -06:00
Eevee (Evelyn Woods)
e8d3adfe8e Fix rotating actors in the editor 2020-09-10 21:06:58 -06:00
Eevee (Evelyn Woods)
6e7790efa6 Fix drawing with the mouse (button and buttons use different ordering) 2020-09-10 20:51:38 -06:00
Eevee (Evelyn Woods)
0c2295dc1d Make the editor grid a bit more rigid; add a few more basic tiles 2020-09-10 20:44:34 -06:00
Eevee (Evelyn Woods)
6bfb5f7896 Add mouse3 panning to the editor 2020-09-10 20:31:01 -06:00
Eevee (Evelyn Woods)
7c9bc92627 Start on editor UI; introduce some tools; implement adjust and force floors 2020-09-10 20:24:20 -06:00
Eevee (Evelyn Woods)
5da3a0f473 Load random force floors from c2m; read the initial direction from replays 2020-09-10 18:22:50 -06:00
Eevee (Evelyn Woods)
55214fad75 Add some visual feedback to the chip, time, and score counters 2020-09-10 18:07:49 -06:00
Eevee (Evelyn Woods)
16bfe22593 Implement score flags and the stopwatches 2020-09-10 17:45:14 -06:00
Eevee (Evelyn Woods)
9b9536d586 Sliding actors don't get to make a decision 2020-09-10 17:13:57 -06:00
Eevee (Evelyn Woods)
dd287284ef Boots block monsters 2020-09-10 17:13:57 -06:00
Andrew Ekstedt
71008d5a20 Avoid lookbehind assertion
The game fails to load under Firefox 77.0 with the very helpful error
message,

    SyntaxError: invalid regexp group   format-c2m.js:1:1

Turns out that it doesn't like the `(?<=^|\n)` lookbehind group in
the CLUE regexp. It seems lookbehind support wasn't added until FF 78,
according to the big table[1]. Switch it to a multiline regexp instead.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Browser_compatibility
2020-09-10 15:01:06 -07:00
Eevee (Evelyn Woods)
6fd5759de3 Fix chip sockets 2020-09-10 12:55:15 -06:00
Eevee (Evelyn Woods)
1453f68de5 Split up the actor loop, so actors make decisions in a separate pass
This fixes a lot of subtle issues: creatures hitting you when you push a
block past them, blocks moving jerkily while you push them (not even
sure why on that one), probably implementation of "the stupid glitch"...
2020-09-10 12:39:18 -06:00
Eevee (Evelyn Woods)
549b34ad30 Split out the game proper 2020-09-10 11:05:38 -06:00
Eevee (Evelyn Woods)
1a9c3f619d Fix trying to draw out of bounds 2020-09-10 11:05:24 -06:00
Eevee (Evelyn Woods)
6b5b8b06aa Spruce up the options dialog, though it still doesn't work 2020-09-09 21:39:24 -06:00
Eevee (Evelyn Woods)
57ee13425e Draw actors as they cross the viewport boundary too 2020-09-09 20:54:19 -06:00
Eevee (Evelyn Woods)
e85a896f5c Add CCLP3 2020-09-09 20:45:16 -06:00
Eevee (Evelyn Woods)
51a554286a Fix teeth not moving on levels without a time limit 2020-09-09 20:08:51 -06:00
Eevee (Evelyn Woods)
4d44441983 After a clone, mark the new clone as stuck too 2020-09-09 20:02:15 -06:00
Eevee (Evelyn Woods)
ac053d6c1f Restart the level when switching back from the editor 2020-09-09 18:47:18 -06:00
Eevee (Evelyn Woods)
274fa7c3c5 Only the player can step on thieves 2020-09-09 17:28:19 -06:00
Eevee (Evelyn Woods)
420b497cf2 Only the player can step on hints 2020-09-09 17:18:08 -06:00
Eevee (Evelyn Woods)
a3928b2865 Implement splashes and explosions, at least partially 2020-09-08 15:16:35 -06:00
Eevee (Evelyn Woods)
321641d8d8 Make fire block monsters; cleanup in prep for more CC2 nonsense 2020-09-08 14:52:23 -06:00