Commit Graph

346 Commits

Author SHA1 Message Date
Eevee (Evelyn Woods)
6fc4f6b58f Change StoredCell to also be layered, and update the editor to match 2021-01-03 17:44:16 -07:00
Eevee (Evelyn Woods)
323ed3ee18 Refactor to using cells with fixed slots
This better matches CC2 behavior and also makes some very common
operations, like grabbing a cell's actor or terrain, way faster.

It also allows me to efficiently implement CC2's layer order when
checking for collisions; thin walls are checked before terrain, and
actors only afterwards.  The upshot is that bowling balls no longer
destroy stuff on the other side of a thin wall!

I also did some minor optimizing, mostly by turning loops over an entire
cell's contents into checks for a single layer; Chromium now performs a
bulk test about 30% faster.

Downsides of this change:
- All kinds of stuff may have broken!
- It'll be a little difficult to ever emulate MSCC's curious behavior
  when stacking terrain on top of items or other terrain.  But not
  impossible.
- It'll be far more difficult to emulate buggy Lynx (or maybe it's just
  Tile World?) behavior where some combination of cloners and teleports
  allow a ton of monsters to accumulate in a few cells.  I guess I
  wasn't planning on doing that anyway.
2021-01-03 17:19:27 -07:00
Eevee (Evelyn Woods)
cff756597c Fix a few places where two tiles on the same layer could coexist in a cell 2021-01-03 15:18:53 -07:00
Eevee (Evelyn Woods)
fe7731efe7 Fix minor issues: ghosts don't affect popwalls, voodoo tiles shouldn't crash, on_bump is unused 2021-01-03 14:06:41 -07:00
Eevee (Evelyn Woods)
c6c3ff2d71 Fix losing slide mode when teleporting on a yellow teleport you just dropped 2021-01-03 14:06:04 -07:00
Eevee (Evelyn Woods)
0e1bd91075 Add a bunch more sound effects 2021-01-03 13:07:15 -07:00
Eevee (Evelyn Woods)
6446a4654b Fix the order of operations for slide mode, again
This fixes an obscure bug where you could redirect a block that was in
the process of sliding off of ice onto floor, because its slide mode had
not yet been cleared.
2021-01-02 23:47:49 -07:00
Eevee (Evelyn Woods)
656d124c89 Fix a crash when blowing up a pink button 2021-01-02 17:42:07 -07:00
Eevee (Evelyn Woods)
4454970564 Split up the Steam loop into begin/finish parts to match what turn-based mode expects 2020-12-31 18:01:40 -07:00
Eevee
f0cd4d3c5a
Merge pull request #22 from Patashu/master
fix turn-based mode
2020-12-31 17:23:24 -07:00
Eevee (Evelyn Woods)
d700561c0f Add a cursor to the editor 2020-12-30 11:52:27 -07:00
Timothy Stiles
f6a79456e9 fix turn-based mode 2020-12-30 13:01:01 +11:00
Eevee (Evelyn Woods)
6b0bb9cb3d Prevent pushing a block that's already moving due to a slide push 2020-12-29 12:30:08 -07:00
Eevee (Evelyn Woods)
c475500bdb Add in a single-tic delay after a failed teleport 2020-12-29 11:42:41 -07:00
Eevee (Evelyn Woods)
819a2e2203 Make actors bonk on ice even if they weren't already sliding 2020-12-29 10:16:10 -07:00
Eevee (Evelyn Woods)
6c99752f37 Allow the hook to block monster movement at decision time 2020-12-29 09:03:40 -07:00
Eevee (Evelyn Woods)
41ab804f79 Prevent blocks from pushing sliding blocks, except frame blocks pushing dirt blocks 2020-12-29 08:30:55 -07:00
Eevee (Evelyn Woods)
63f09283ea Make actors explode when starting the level on a bomb 2020-12-29 07:21:18 -07:00
Eevee (Evelyn Woods)
0561e15d0a Move hooking to decision time while fixing the swivel following problem 2020-12-29 07:04:55 -07:00
Eevee (Evelyn Woods)
2c1d047f4b Don't let animations block actors with helmets 2020-12-28 15:03:40 -07:00
Eevee (Evelyn Woods)
f6f83a45f1 Add a teleport flash 2020-12-28 14:21:28 -07:00
Eevee (Evelyn Woods)
b72e20a4a5 Round the bonus down when halving it 2020-12-27 18:26:49 -07:00
Eevee (Evelyn Woods)
a2914cc291 In Lynx update mode, only tick an actor's cooldown after an extra move if that move succeeded 2020-12-27 17:32:55 -07:00
Eevee (Evelyn Woods)
2c9fbbba50 Make ghosts bonk on ice corners too 2020-12-27 09:32:37 -07:00
Eevee (Evelyn Woods)
b9f31b4170 Attempt to fix the swap button flickering like mad 2020-12-27 08:51:12 -07:00
Eevee (Evelyn Woods)
1fc8e35843 Run on_ready in reverse order, mostly so initial RFF directions are correct 2020-12-27 08:33:03 -07:00
Eevee (Evelyn Woods)
66ca5f5fff Prevent pickup up a fifth tool when unable to drop one (because it's a yellow teleport and you're not on floor) 2020-12-27 08:05:38 -07:00
Eevee (Evelyn Woods)
f30b9b34dd Prevent bumping tiles in a cell that's blocked by thin walls 2020-12-27 08:05:03 -07:00
Eevee (Evelyn Woods)
bf952433f1 Allow anything to pull blocks with the hook 2020-12-27 07:41:11 -07:00
Eevee (Evelyn Woods)
6ab3ff9b0b Fix treating a tile as wired if it had an adjacent wire with a tunnel running under it 2020-12-27 07:32:28 -07:00
Eevee (Evelyn Woods)
4e5b2f02d9 Make yellow tanks remember a yellow button press made while they were sliding 2020-12-27 07:20:33 -07:00
Eevee (Evelyn Woods)
6470575a7b Populate movement_cooldown for lit dynamite; guard against NaNs; check for moving blocks in bump mode 2020-12-27 05:41:03 -07:00
Eevee (Evelyn Woods)
c7815ba841 Move teleporter overriding to decision time; treat teleporting as a kind of slide; decouple speed from sliding 2020-12-27 05:40:06 -07:00
Eevee (Evelyn Woods)
adb0c4c869 Fix the search radius for orange buttons 2020-12-26 04:34:24 -07:00
Eevee (Evelyn Woods)
059a523347 Make ghosts erase fire even if they just got the boots from the same cell 2020-12-26 04:23:23 -07:00
Eevee (Evelyn Woods)
ab22c6ff3f Fix actors trying to reverse when bonking on normal force floors 2020-12-26 03:41:58 -07:00
Eevee (Evelyn Woods)
9c2809be29 Fix interpolation after the tic -> frame change 2020-12-26 03:41:35 -07:00
Eevee (Evelyn Woods)
0500518537 Move sliding back to arrive time, but force floor bonking to movement time 2020-12-26 03:15:00 -07:00
Eevee (Evelyn Woods)
0bb3f78a33 Give flame jets their own mini-pass 2020-12-26 02:03:39 -07:00
Eevee (Evelyn Woods)
86bf90ee89 Don't let the last player walk back out of the exit 2020-12-24 10:18:45 -07:00
Eevee (Evelyn Woods)
019f6a78bc Move hook-pulling code to fix several ordering issues 2020-12-24 09:29:25 -07:00
Eevee (Evelyn Woods)
d567a2553e Disallow pulling unpushable blocks; play a sound on bowling ball collision 2020-12-24 06:55:50 -07:00
Eevee (Evelyn Woods)
1a7dc3e737 Implement a couple more compat flags and fix some typos with the dialog 2020-12-24 06:30:22 -07:00
Eevee (Evelyn Woods)
2381bd38b9 Add compat switches for using the CC2 timing and update order
Other gameplay changes/fixes that crept in:

- Ghosts no longer pick up red keys

- Doppelgangers now read their movement directly from players, so no
  intermediate variables are necessary

- Spring mining is no longer possible

- Push recursion is detected and prevented

- Bowling balls will also blow up anything that runs into them
2020-12-23 04:30:10 -07:00
Eevee (Evelyn Woods)
1aa406fc7b Move sliding effects to decision time 2020-12-21 03:50:03 -07:00
Eevee (Evelyn Woods)
bf743caee5 Fix regression with dropping items on force floors 2020-12-21 00:34:31 -07:00
Eevee (Evelyn Woods)
6ea46c238c Fix doppelganger moves lingering after a player switch/transmog 2020-12-21 00:29:14 -07:00
Eevee (Evelyn Woods)
42dd4b9ce6 Make ghosts with fire boots erase fire and blobs not move between canopies 2020-12-21 00:21:32 -07:00
Eevee (Evelyn Woods)
151f66a0fb Make blobs spread slime onto floor 2020-12-21 00:05:12 -07:00
Eevee (Evelyn Woods)
b0aeee6ff0 Allow swapping and cycling even while sliding 2020-12-21 00:04:51 -07:00
Eevee (Evelyn Woods)
74eaab3fde Allow disabling undo for circuitry, too 2020-12-19 21:21:28 -07:00
Andrew Ekstedt
8986a497fd Disable undo during bulk testing
Undo generates a lot of garbage. Faster not to.

CC1 bulk test on my laptop:

Firefox 77 speeds up from 61s to 41s
Chrome barely moves, from 34s to 28s
2020-12-19 19:12:28 -08:00
Eevee (Evelyn Woods)
a413d1afc2 Fix bowling balls to start rolling immediately 2020-12-19 19:25:32 -07:00
Eevee (Evelyn Woods)
86c4561647 Add a basic implementation of the hook 2020-12-19 18:43:30 -07:00
Eevee (Evelyn Woods)
f6bf33274f Fix some collision issues with ghosts and timing of dynamite 2020-12-19 18:24:30 -07:00
Eevee (Evelyn Woods)
aa0bb5cbc2 Bowling balls still blow up actors when sliding 2020-12-19 17:33:26 -07:00
Eevee (Evelyn Woods)
148beb7d74 Implement all-players-exit behavior; touch up locks, buttons, logic gates; fix demo saving 2020-12-19 17:16:50 -07:00
Eevee (Evelyn Woods)
78f59b38c1 Rewrite wiring code and fix basically all issues with it; faster, undoable, etc. 2020-12-18 19:58:12 -07:00
Eevee (Evelyn Woods)
48f085d0df Remove Level.cells in favor of linear_cells 2020-12-17 15:51:57 -07:00
Eevee (Evelyn Woods)
7e262feeb6 Delete some old code 2020-12-16 21:24:03 -07:00
Eevee (Evelyn Woods)
6aed1fa38e Improve rotation of frame blocks on railroads 2020-12-16 21:23:37 -07:00
Eevee (Evelyn Woods)
cace6d4180 Allow CC2 actions anytime the player can move, including on force floors 2020-12-16 20:53:42 -07:00
Eevee (Evelyn Woods)
d4da572940 Fix rovers once and for all; make helmet work more often; rename some stuff; simplify attempt_step 2020-12-16 20:05:36 -07:00
Eevee (Evelyn Woods)
7cf92f7841 Set slide mode twice, to handle the obscure case of grabbing cleats on ice 2020-12-16 14:59:40 -07:00
Eevee (Evelyn Woods)
408e4cd9f6 Yellow tanks give up if blocked 2020-12-16 14:28:11 -07:00
Eevee (Evelyn Woods)
b42b091181 Fix yellow tank timing; make ghosts go through doors, not stamp dirt 2020-12-16 14:15:32 -07:00
Eevee (Evelyn Woods)
6587cbf7f0 Fix detecting presses of action keys, again 2020-12-16 01:39:17 -07:00
Eevee (Evelyn Woods)
a91d7f24a1 Fix when we remember the player's move 2020-12-16 01:14:49 -07:00
Eevee (Evelyn Woods)
62eb1a86e4 Fix some minor wire bugs: NOT/counter/pink button power drawing, circuit block motion, nested wire tunnels 2020-12-15 22:57:32 -07:00
Eevee (Evelyn Woods)
daa3581be0 Fix pressing CC2 actions while moving 2020-12-15 21:14:38 -07:00
Eevee (Evelyn Woods)
25b4b32f94 Add teleport overriding and seriously clean up teleport code 2020-12-15 16:44:37 -07:00
Eevee (Evelyn Woods)
7c82a4cdf9 Only do CC2 actions per press, not per held tic 2020-12-15 01:07:02 -07:00
Eevee (Evelyn Woods)
bf81738e19 Partly implement helmet; get rover very close to correct (?) 2020-12-15 00:44:07 -07:00
Eevee (Evelyn Woods)
55abe8b53a Allow the bowling ball to slide normally 2020-12-15 00:26:00 -07:00
Eevee (Evelyn Woods)
f858668ca8 Clumsily teach bowling balls to destroy actors 2020-12-15 00:10:23 -07:00
Eevee (Evelyn Woods)
2d7df413ee Allow ghosts to pass through thin walls 2020-12-14 23:59:38 -07:00
Eevee (Evelyn Woods)
3e18e38f15 Add rough implementations of dynamite and bowling ball 2020-12-14 23:25:48 -07:00
Eevee (Evelyn Woods)
bf3c501353 Fix yellow tank behavior to be faux simultaneous 2020-12-14 23:14:31 -07:00
Eevee (Evelyn Woods)
a529414e42 Cycle an RFF after a failed override; move slide turnaround to move phase 2020-12-14 22:06:42 -07:00
Eevee (Evelyn Woods)
a865647eae Non-players move instantly while sliding 2020-12-14 17:52:59 -07:00
Eevee (Evelyn Woods)
f02fa1a9bb Split up the wiring updates 2020-12-14 17:42:31 -07:00
Eevee (Evelyn Woods)
00ac94ac8c Add a further hack atop the cooldown delay hack to fix adjacent trap release 2020-12-14 17:25:15 -07:00
Eevee (Evelyn Woods)
c34aaadf06 Attempt, unsuccessfully, to implement ice block melting 2020-12-14 17:07:35 -07:00
Eevee (Evelyn Woods)
efd25294ac Restore the notion of an out-of-turn move
This fixes a lot of replay sync issues with cloners; in CC2, actors
advance only one frame (1/3 tic) at a time, so when a cloned object
happens to get a turn later in the same tic that it was cloned, it only
ends up 1 frame ahead of everything else.  Since actors can only begin
moves on tic-aligned frames, even though it does get where it was going
sooner, it has to wait for a frame before moving, so the advantage
doesn't change anything.

The problem is that LL counts movement in tics, not frames, so that kind
of bonus turn puts the clone an entire tic ahead which can gum things
up.

This is still not perfect, but it's much closer.
2020-12-14 17:05:01 -07:00
Eevee (Evelyn Woods)
f3f73a5e41 Move input handling into Level and clean it up a ton; add a bulk test gizmo 2020-12-14 17:02:14 -07:00
Eevee (Evelyn Woods)
0f5b8098f6 Split teleporting into its own pass, like Lynx 2020-12-13 02:23:14 -07:00
Eevee (Evelyn Woods)
90008c3a89 Make the player push blocks at decision time
It turns out the player explores all their decisions in a very physical
way, which is the real source of block slapping and also means the
player can push blocks before anything else can move, regardless of
actor order.

This fixes at least half a dozen CC1 replays, which is just
mindboggling.
2020-12-13 00:39:36 -07:00
Eevee (Evelyn Woods)
bd4c04c1d8 Fix wiring order; relax player/monster collision 2020-12-12 21:00:28 -07:00
Eevee (Evelyn Woods)
3a04b6276c Go back to toggling green objects instantly 2020-12-12 19:22:04 -07:00
Eevee (Evelyn Woods)
4d23acb27e Add on_approach; use it to erase animations and fix popdown floors 2020-12-12 19:00:58 -07:00
Eevee (Evelyn Woods)
077ac65650 Restore turn-based mode 2020-12-12 18:16:52 -07:00
Eevee (Evelyn Woods)
299b1578a7 Mostly revert actor loop reorg
I was right the first time, and I've proven it to myself now.  I
originally made the change because I couldn't see any other way to fix
the ICEBERG replay from Steam CC1, but now, I do!
2020-12-12 17:57:47 -07:00
Eevee (Evelyn Woods)
8671bee08b Run wiring thrice per tic; recognize some tiles have odd propagation rules 2020-12-11 22:49:23 -07:00
Eevee (Evelyn Woods)
410af788fc Fix teleporters, and more generally out-of-turn movement 2020-12-11 20:58:50 -07:00
Eevee (Evelyn Woods)
6c2afd7e32 Fix flicker when pushing a block across multiple cells 2020-12-11 13:59:23 -07:00
Eevee (Evelyn Woods)
2f130861d6 Remove animation_{progress,speed} and fix interpolation 2020-12-11 13:56:41 -07:00
Eevee (Evelyn Woods)
b75253a249 Rearrange actor loop to put movement advancement at the end
I don't know why I ever thought this was a separate pass; I think it was
just the easiest way to make smooth scrolling work when I first
implemented it on like day 2.  Turns out it wasn't ever correct and has
all manner of subtle implications I'll be sorting out for ages.

This does make the turn-based stuff //way// simpler, though.
2020-12-10 18:51:40 -07:00
Eevee (Evelyn Woods)
6063ea9fba Wired tracks only switch on pulse; wired red teleports only work when powered 2020-12-09 21:07:14 -07:00
Eevee (Evelyn Woods)
db2a24319d Fix lightning bolt; implement speed boots 2020-12-09 20:52:58 -07:00
Eevee (Evelyn Woods)
235cc79e8b Add LL-specific exit poses for Lexy and Cerise 2020-12-09 20:22:35 -07:00
Eevee (Evelyn Woods)
90b583df44 In CC2 (and Lynx, for different reasons), clones are immediately nudged out of the cloner 2020-12-08 17:22:20 -07:00
Eevee (Evelyn Woods)
8428572def Step in reverse order; allow pushing blocks on railroads; gliders ignore turtles 2020-12-06 16:29:07 -07:00
Eevee (Evelyn Woods)
54381370c0 Add timid teeth; move movement decisions onto tile types; improve doppelganger behavior 2020-12-06 16:16:04 -07:00
Eevee (Evelyn Woods)
cb62786470 Fix yellow teleport behavior (you pick up even if it itself is not blocked); play pickup sound 2020-12-03 22:43:24 -07:00
Eevee (Evelyn Woods)
caf4906176 Fix a crash when trying to drop from an empty inventory 2020-12-03 22:21:44 -07:00
Eevee (Evelyn Woods)
b97aaa81a9 Slime doesn't kill blobs; implement bribe; fix player size on level restart 2020-12-03 20:52:43 -07:00
Eevee (Evelyn Woods)
0cd1ea342d Implement yellow teleport pickup behavior 2020-12-03 20:52:00 -07:00
Eevee (Evelyn Woods)
c1452e005f Disable action buttons when appropriate; add inv overflow; partial CC1 support 2020-12-02 17:23:55 -07:00
Eevee (Evelyn Woods)
e51665b612 Add basic support for drop/cycle/swap 2020-12-02 17:18:54 -07:00
Eevee (Evelyn Woods)
8d197ce479 Add a basic implementation of doppelgangers 2020-12-02 15:03:13 -07:00
Eevee (Evelyn Woods)
f0680ce0c4 Cleaned up several tile properties; added railroad adjusting 2020-12-02 13:54:32 -07:00
Eevee (Evelyn Woods)
e7c9bbe846 Implement most of the railroad behavior 2020-11-30 09:08:55 -07:00
Eevee (Evelyn Woods)
ac6e33bb6c Simplify blitting; fix arrow blitting; impl light switch; load more items 2020-11-25 01:14:15 -07:00
Eevee (Evelyn Woods)
5cb29c8f7d Overhaul collision
Collision now uses bits and masks.  The main upshot is that ghost and
ice/directional blocks collide much more correctly, now.  And turtles
block fireballs.

Also, monsters can now move over "no" signs, and can trample the player
if she's standing on top of an item.

While I was at it, I finished implementing the "bestowal bow", an item
mod (same layer as the "no" sign) that allows any actor to pick up the
item in that tile.
2020-11-23 23:41:32 -07:00
Eevee (Evelyn Woods)
fb301b3b3e Initialize direction when placing actor tiles in the editor 2020-11-23 22:18:40 -07:00
Eevee (Evelyn Woods)
39d463932b Remove the "stuck" flag and fix all the repercussions of that 2020-11-23 21:35:28 -07:00
Eevee (Evelyn Woods)
e803af2fd2 Handle actors starting on force floors; partially implement item bestowal 2020-11-23 19:22:59 -07:00
Eevee (Evelyn Woods)
1b6bd68879 Bump undo buffer size to 30 seconds 2020-11-03 12:09:12 -07:00
Eevee (Evelyn Woods)
8ff0bd803a Use a ring buffer for undo; don't pause when running out of undo during rewind 2020-11-03 11:57:16 -07:00
Eevee (Evelyn Woods)
350ac08d4d Shrink size of undo buffer by 40%
Using simple maps of changed properties, rather than a big pile of
closures, takes up significantly less space.
2020-11-03 11:48:51 -07:00
Eevee (Evelyn Woods)
e7e02281a2 Clean up turn-based code
Mostly style nits, but also:

- Renamed some stuff in anticipation of removing GameEnded.

- Actor decisions are independent, so there's no need to do most of them
  in the first part of a tic and the player in the second part; they can
  all happen together in the second part.

- waiting_for_input was merged into turn_based, which I think makes it
  easier to follow what's going on between tics.  Although I just
  realized it introduces a bug, so, better fix that next.

- The canvas didn't need to know if we were waiting or not if we just
  force the tic offset to 1 while waiting.  This also fixed some slight
  jitter with force floors.
2020-11-03 09:50:37 -07:00
Eevee (Evelyn Woods)
83a1dd23ff Merge branch 'master' of github.com:eevee/lexys-labyrinth 2020-11-02 15:40:09 -07:00
Eevee (Evelyn Woods)
49ff0d9723 Clean up wiring drawing and logic (zero gates is now a no-op!); begin implementing logic gates 2020-11-01 11:36:17 -07:00
Eevee (Evelyn Woods)
060dfdc7d7 Implement drawing and correctly pushing directional blocks 2020-10-28 00:17:41 -06:00
Timothy Stiles
f670224460 forgot to change a continue to a return 2020-10-26 16:08:29 +11:00
Timothy Stiles
32b4399683 Merge remote-tracking branch 'upstream/master' 2020-10-26 16:05:34 +11:00
Eevee (Evelyn Woods)
dedaa45d07 Fix pushing sliding blocks 2020-10-24 22:30:18 -06:00
Eevee (Evelyn Woods)
368e4676fd Mostly implement orange buttons and flame jets 2020-10-24 21:33:11 -06:00
Timothy Stiles
509b3ca3b7 Merge remote-tracking branch 'upstream/master' 2020-10-25 14:31:32 +11:00
Eevee (Evelyn Woods)
0c9a7e3d07 Implement all three blob modes and fix up some minor details
This makes the replays from the Steam copies of Blobnet and Nice Day
play back correctly!  Neato!
2020-10-24 20:49:14 -06:00
Eevee (Evelyn Woods)
a07e10218e Monsters always attempt their last candidate direction, even if blocked 2020-10-24 20:32:22 -06:00
Eevee (Evelyn Woods)
f1b040f176 Implement green teleports and the Lynx/CC2 PRNG 2020-10-23 21:09:31 -06:00
Eevee (Evelyn Woods)
603a74a751 Show a hint the player starts on 2020-10-23 17:44:26 -06:00
Eevee (Evelyn Woods)
2820c067c5 Implement the CC2 "no sign" 2020-10-23 17:37:50 -06:00
Timothy Stiles
fedbd200fc Merge remote-tracking branch 'upstream/master' 2020-10-22 18:04:43 +11:00
Eevee (Evelyn Woods)
09eb03dad6 Iterate actors in reverse order to match Lynx/CC2 (fixes #7) 2020-10-21 21:24:59 -06:00
Timothy Stiles
4388402850 Merge remote-tracking branch 'upstream/master' 2020-10-14 22:43:35 +11:00
Timothy Stiles
e3de4d59c7 spaceify 2020-10-14 22:34:00 +11:00
Timothy Stiles
f7e83342a0 fix a turn based rewinding visual bug 2020-10-14 22:33:45 +11:00
Timothy Stiles
be5cc7f97f spaceify 2020-10-14 22:23:13 +11:00
Timothy Stiles
bb168d7e1e fix force arrows in turn based mode
if you got misaligned in tic_counter then you'd force arrow forever.
also, turn_based is no longer passed in! yay!
2020-10-14 22:07:29 +11:00
Timothy Stiles
e53f00a432 I broke force arrows, in fact!
so much for tooting my own horn
2020-10-14 21:54:13 +11:00
Timothy Stiles
2e1a87199a code refactor part 1: advance_tic is now two parts
seems to work so far
2020-10-14 21:24:46 +11:00
Eevee (Evelyn Woods)
36b9f2efd7 Make (most) actors pick up blue keys 2020-10-07 15:28:51 -06:00
Eevee (Evelyn Woods)
b20e2cac8c Tanks in traps turn around 2020-10-04 09:52:59 -06:00
Eevee (Evelyn Woods)
5c2fc32546 Tanks always decide to move in their given direction, even when blocked 2020-10-04 09:47:03 -06:00
Eevee (Evelyn Woods)
8adb630862 Add partial wiring support 2020-10-01 06:46:07 -06:00
Eevee (Evelyn Woods)
9b873764fb Shim around several compat issues that affect CCLP levels
- CCLP1 #81 requires pushing blocks off of blue walls, which is
  impossible in CC2 but allowed in TW Lynx (unclear if this is a lynx
  behavior or a tw bug)

- CCLP1 #89 has a tank start on a recessed wall and drive off of it,
  expecting the recessed wall to be left alone, but under CC2 rules it
  becomes a wall; such walls are now automatically converted to a new
  tile, the "doubly recessed wall", which restores the expected behavior
  without changing how recessed walls work in general

- CCLP4 #135 expects pressing a blue button to not affect blue tanks
  that are currently in mid-slide

In addition, the behavior of blue buttons now matches the Lynx/Steam
behavior: the press is stored as a flag and queued until the tank is
next able to move.
2020-10-01 03:08:25 -06:00
Eevee (Evelyn Woods)
f99b9826be Detect trap buttons that are held down when the level begins 2020-09-30 02:20:33 -06:00
Eevee (Evelyn Woods)
f4363b8fda Rewrite how connections work
- Teleporters now connect on the fly, rather than having fixed
  connections (important because dynamite can destroy teleporters!)

- If custom connections are present, red and brown buttons ONLY use
  those, rather than falling back to CC2 connection rules

- Multiple brown buttons connected to the same trap should now work
  correctly
2020-09-30 02:11:17 -06:00
Eevee (Evelyn Woods)
ade135514b Undo actor animation (fixes #4) 2020-09-28 00:38:24 -06:00
Timothy Stiles
5b7273e9d9 Turn-Based: add space to wait 2020-09-26 22:40:38 +10:00
Timothy Stiles
e6a4e88935 spaceify previous commit 2020-09-26 22:32:01 +10:00
Timothy Stiles
d2e900dc3a fix a rewind bug in non turn based mode
Was caused by not making these setters undoable.
2020-09-26 22:31:18 +10:00
Timothy Stiles
30a145599c fix a graphical undoing bug in Turn-Based Mode
turns out we were smuggling pending_undo to previous moves. aha!
2020-09-26 22:18:19 +10:00
Timothy Stiles
5c6cd01b39 Implement turn based mode
Seems to work mechanically though I haven't extensively stress tested it yet. Force floors work the way you'd want them to though (you're given control whenever you can make an input and not otherwise).
There are some graphical bugs with rewinding, but there were some without turn based mode anyway...
2020-09-26 22:10:42 +10:00
Eevee (Evelyn Woods)
68de70743f Fix, partially, stopping yourself on force floors 2020-09-25 20:45:01 -06:00
Eevee (Evelyn Woods)
55014fa1ca Use ceil, not floor, when converting the timer to seconds 2020-09-25 20:02:53 -06:00
Eevee (Evelyn Woods)
5c93b5f199 Only let the player pick up keys for now 2020-09-25 05:11:30 -06:00
Eevee (Evelyn Woods)
537e011f2a Track scores, including your total score for a pack 2020-09-25 03:47:18 -06:00
Eevee (Evelyn Woods)
40aa845e92 Add sound effects! 2020-09-25 01:28:31 -06:00
Eevee (Evelyn Woods)
8adb249925 Steam Teeth pursue the player's image 2020-09-23 23:38:10 -06:00
Eevee (Evelyn Woods)
5e70df77a6 Fix block behavior, again 2020-09-23 22:41:07 -06:00
Eevee (Evelyn Woods)
e859afe0b5 Change hint behavior to match Steam: hint shows as you approach 2020-09-23 21:31:56 -06:00
Eevee (Evelyn Woods)
67504e436e Draw the player's blocked/pushing frame (at last) 2020-09-23 21:09:57 -06:00
Eevee (Evelyn Woods)
362c18d6e2 Remove ||=, which is also really new! 2020-09-20 01:09:42 -06:00
Eevee (Evelyn Woods)
ad615e5caf Teleporters with an actor on them are blocked 2020-09-20 01:08:47 -06:00
Eevee (Evelyn Woods)
2dc18a98db Finally fix pushing a sliding block 2020-09-20 01:05:24 -06:00
Eevee (Evelyn Woods)
c8a24d0e4b Avoid ??= for now, it's extremely new 2020-09-20 00:30:07 -06:00
Eevee (Evelyn Woods)
582a875c52 Don't use "ignores" to override blocking; it breaks ice corners 2020-09-19 22:53:38 -06:00
Eevee (Evelyn Woods)
16f87bf6e0 Fix hot blocks appearing to move backwards on death 2020-09-19 22:47:04 -06:00
Eevee (Evelyn Woods)
32be0d0d71 Overhaul inventory: taking items is now undoable; inventory UI is correct, shows key counts 2020-09-19 22:43:04 -06:00
Eevee (Evelyn Woods)
4edc83ae4f Restore bumping solid tiles 2020-09-19 20:35:12 -06:00
Eevee (Evelyn Woods)
e0bfb0aadf Standardize visual state, and use it instead of transmuting a dead player 2020-09-16 21:08:43 -06:00
Eevee (Evelyn Woods)
063d9f9ef9 Implement rewind, add a key for it, and suggest keys in general 2020-09-16 19:40:38 -06:00
Eevee (Evelyn Woods)
57810da581 Add obituaries, and get them out of the game itself 2020-09-16 19:21:32 -06:00
Eevee (Evelyn Woods)
fe12c599bc Abort the tic and draw a final frame after the game ends; fix dead player appearance 2020-09-16 18:14:06 -06:00
Eevee (Evelyn Woods)
cce28c2d7e Rearrange C2M tile definitions to make saving easier
Also, tile templates no longer use name or carry format-specific
modifiers; they have the same properties as real tiles.
2020-09-15 22:45:15 -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)
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)
13b4180ab8 Make teleporting undoable 2020-09-14 18:09:13 -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)
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)
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)
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