100 Commits
Author SHA1 Message Date
Eevee (Evelyn Woods) 2c879f99d2 Style nits: redarken bg, sharpen button highlights, emphasize splash headers 2024-05-09 21:01:39 -06:00
Eevee (Evelyn Woods) b82e112cbc Teach the connect tool to move destinations and delete connections 2024-05-09 21:00:10 -06:00
Eevee (Evelyn Woods) 2fa84e0477 Fix some subtle bugs with some octants in walk_grid 2024-05-09 19:02:01 -06:00
Eevee (Evelyn Woods) 6d003287e4 Fleshed out editor tools considerably
- Added a layer selector

- Added a line tool

- Changed the fill tool to stop at blocking terrain, when filling with
  something other than terrain

- Updated the rotate tool to respect the layer selector

- Updated the adjust tool to respect the layer selector

- Added support to the adjust tool for railroad tracks, ice, swivels,
  force floors

- Restored the adjust tool's support for buttons, added a pressed-button
  preview, and added support for blue buttons

- Added an ice tool, for drawing ice corners interactively

- Added a text tool, for writing longer text via letter tiles

- Added a thin walls tool

- Changed the wire tool to draw wires for more types of mouse movements,
  so that any kind of scribble should produce a continuous wire;
  individual clicks will also place a wire immediately
2024-05-09 18:27:14 -06:00
Eevee (Evelyn Woods) e963c83c4d Fix undoing green button presses 2024-05-08 08:55:23 -06:00
Eevee (Evelyn Woods) 0cd7537ce6 Add dirt sfx, and Cerise versions of the footstep and mmf sounds
Also toned down the reverb on get-tool while I'm here.
2024-05-07 17:50:58 -06:00
Eevee (Evelyn Woods) ed67f371cb Lighten the color scheme somewhat 2024-05-07 17:10:05 -06:00
Eevee (Evelyn Woods) 246e56187c Fix the editor to also crop the selection 2024-05-06 23:12:35 -06:00
Eevee (Evelyn Woods) 214eaad1f5 Fix an editor crash when floating a selection containing a red button 2024-05-06 22:45:00 -06:00
Eevee (Evelyn Woods) 9e90b18f1f Fix the size of the "clear inventory" button 2024-05-06 22:11:37 -06:00
Eevee (Evelyn Woods) d4910a4147 Sort of estimate the size of undo entries 2024-05-06 22:11:03 -06:00
Eevee (Evelyn Woods) fe096436da Add some random functions (which I'm already using whoops) 2024-05-06 22:06:56 -06:00
Eevee (Evelyn Woods) 7b5e9b564d Fix entering debug mode from the splash screen 2024-05-06 22:04:14 -06:00
Eevee (Evelyn Woods) 98c77ed798 Fix undoing level properties 2024-05-06 21:11:39 -06:00
Eevee (Evelyn Woods) 68eb16f7e7 Get the level filter out of the thread pool, and add a non-threaded pool 2024-05-06 20:07:31 -06:00
Eevee (Evelyn Woods) 559730eae4 Fix and clean up wiring
- Fixed a gigantic bug where, due to a typo, a new circuit was created
  for every single wire segment.  Oops!

- The wiring phase now has somewhat fewer intermediate parts.

- Power-generating tiles have an explicit update phase, rather than
  updating in a method whose name starts with "get".

Anyway it's slightly faster than when I started and that's nice.

Only drawback is that circuit recalculation doesn't quite undo
correctly, but I think the effect is only visual.
2024-05-06 20:03:37 -06:00
Eevee (Evelyn Woods) aa4b3f3794 Remove the tile pool
Doesn't save any space, doesn't make anything noticeably faster, and
also doesn't work and I don't want to waste time figuring out why.
2024-05-06 15:38:11 -06:00
Eevee (Evelyn Woods) 0e752972f0 Fix some style nits 2024-05-06 15:34:32 -06:00
Eevee (Evelyn Woods) 38d7b55032 Fix local directory loading 2024-05-06 15:03:31 -06:00
Eevee (Evelyn Woods) 913a8144f1 Fix overwriting a VFX with a transmute 2024-05-06 14:58:27 -06:00
Eevee (Evelyn Woods) 4772d63719 Remove some lingering console.log()s 2024-05-06 14:08:51 -06:00
Eevee (Evelyn Woods) 626d146375 Add explicit support in the level for sokoban buttons
Gets a lot of junk out of the sokoban buttons' implementations.

Also, undo closures are gone now!
2024-05-06 14:07:35 -06:00
Eevee (Evelyn Woods) 3c7b8948ae Remove the undo closure for failing the level 2024-05-06 13:41:29 -06:00
Eevee (Evelyn Woods) d1f0ac4956 Simplify wire phase undo
Turns out we don't really need to store these changes to tile power at
all; they can be rederived from circuit power.

One more undo closure gone.
2024-05-06 13:37:34 -06:00
Eevee (Evelyn Woods) b891d6f38c Undo inventory changes with tile props
This removes almost all of the remaining undo closures.
2024-05-06 12:57:58 -06:00
Eevee (Evelyn Woods) 20b19c53ff Cut down on some undo closures
If I can get rid of all of these, I can combine multiple undo entries,
and allow undoing backwards in time further (but more coarsely) with the
same memory usage.

This also introduces some actor pooling, which...  reduces memory usage
very slightly on clone-heavy levels, but may not be worth it overall.
2024-05-06 12:40:38 -06:00
Eevee (Evelyn Woods) c900ec80db Reduce undo memory usage by a third
- Changes to tiles are now stored in a plain object rather than a Map,
  which it turns out takes up a decent bit more space.

- Changes to a tile's type or cell no longer need additional closures to
  perform the cell movement.

- Less impactful, but changes to level properties are now stored as a
  diff, not as a full set every tic.
2024-05-06 11:21:27 -06:00
Eevee (Evelyn Woods) 63da1ff38c Implement the toll gate 2024-05-05 16:20:21 -06:00
Eevee (Evelyn Woods) 3f6278f281 Fix rendering of the moment of death
Finally!  With the help of several mildly unpleasant hacks, the game now
draws as if a monster killing the player were walking onto her.
2024-05-05 15:32:56 -06:00
Eevee (Evelyn Woods) 4527eb972e Add a little noise to the rewind effect 2024-05-05 14:55:24 -06:00
Eevee (Evelyn Woods) d54ba0a191 Increase rewinding speed 2024-05-05 13:28:05 -06:00
Eevee (Evelyn Woods) 45a8e0055d Untangle doppelganger movement from the visual is_blocked flag
Also, doppelgangers copy even failed force floor overrides.
2024-05-04 13:05:19 -06:00
Eevee (Evelyn Woods) f6ee09b6c7 Added a new auto-fix for actors atop bombs in CCL levels
This fixes CCLP5 level 25 (and I think one or two others) by introducing
a new item, the dormant bomb, which turns into a regular bomb when
something moves off of it.

Other accumulated tileset touchups that snuck in:

- Recolored the canopy to hopefully look more like a tent
- Lightened slime by one shade
- Made the custom green floor colors clash less, and lightened the
  yellow floor grout
- Removed the shadow from the pause stopwatch, and lightened the other
  two, to better distinguish their different behavior
- Added little rivets to steel walls
- Made the symbols on the sokoban blocks easier to see
- Lightened the blue and red keys to match the shade of the other two,
  and also hopefully make them easier to see atop water and thieves
- Shrank the railroad crossing sign slightly
- Added laces to the hiking boots
- Added shading to the bowling ball
- Removed the shadows from the actor versions of the bowling ball and
  dynamite
- Darkened the dynamite item to better distinguish it from active
  dynamite
- Lightened the blue teleporter exit so it doesn't look too much like an
  inactive red teleporter
- Improved the gradient on the beetle
- Made the hint tile look recessed like CC2, to better convey that it
  blocks some actors
- Added art for some possible tiles: rainbow teleporter, toll gate, nega
  heart, phantom ring, feather
2024-05-04 12:09:48 -06:00
Eevee (Evelyn Woods) e33c35bbe0 Fix (or unfix) the search radius for orange buttons 2024-05-04 11:35:20 -06:00
Eevee (Evelyn Woods) 1481047b94 Adjust the bug/paramecium and frame blocks in the editor palette to be more consistent 2024-04-28 09:24:13 -06:00
Eevee (Evelyn Woods) 037d9d86fb Fix a couple missed spots with actors_move_instantly 2024-04-25 05:24:34 -06:00
Eevee (Evelyn Woods) 9763ceaa1c Revamp tileset options; refactor drawing a bit; work on tileset conversion
Tileset options now identify the tilesets by their appearance, rather
than the fairly useless "custom 1" or whatever.

At last you can draw a tile without creating a renderer.  Truly this is
the future.

Tileset conversion is still incredibly jank, but it does a fairly decent
job (at least at LL -> CC2) without too much custom fiddling yet.
2024-04-25 05:22:18 -06:00
Eevee (Evelyn Woods) 5a17b9022d Arrange the compat flags into categories & show compat icon in main UI 2024-04-24 12:30:59 -06:00
Eevee (Evelyn Woods) 0efbefb999 Politely decline to emulate a bug in TW Lynx 2024-04-24 07:52:11 -06:00
Eevee (Evelyn Woods) 55c4c574ec New MS compat flag: Block splashes don't block the player 2024-04-24 03:32:35 -06:00
Eevee (Evelyn Woods) df0ab43e70 Add partial support for the mouse move format in TWS files 2024-04-24 03:21:14 -06:00
Eevee (Evelyn Woods) 097a4b04d8 Move Lynx trap ejection to its own mini-step 2024-04-23 02:58:23 -06:00
Eevee (Evelyn Woods) 7e210de5e7 New compat flag for making popwalls actually pop on arrival 2024-04-23 02:56:10 -06:00
Eevee (Evelyn Woods) 991704ee19 Erase animations at decision time, apparently 2024-04-23 02:52:47 -06:00
Eevee (Evelyn Woods) c5f2728ad0 Fix the Lynx fake-wall flicking behavior 2024-04-23 00:31:56 -06:00
Eevee (Evelyn Woods) 6c3cf8b4b4 Fix DAT files to not insert implicit button connections 2024-04-22 13:57:31 -06:00
Eevee (Evelyn Woods) 1cb92a454d Show the correct replay input when rewinding 2024-04-22 12:49:46 -06:00
Eevee (Evelyn Woods) 430fa5c354 Length connection arrows for adjacent cells 2024-04-22 10:23:22 -06:00
Eevee (Evelyn Woods) 5da2cf14db Give the adjust tool a live preview (still rough) 2024-04-22 10:22:31 -06:00
Eevee (Evelyn Woods) e7903d5895 Fix mirroring/flipping on ice corners and similar, oops 2024-04-22 10:21:58 -06:00
Eevee (Evelyn Woods) 6a92641d57 Add get_terrain() and get_actor() to StoredCell 2024-04-22 10:21:31 -06:00
Eevee (Evelyn Woods) 90a8f73b93 Tint it slightly pinker... 2024-04-22 10:21:02 -06:00
Eevee (Evelyn Woods) 13918a579f Fix the center point for keyboard zoom 2024-04-22 10:09:25 -06:00
Eevee (Evelyn Woods) 20e2b64390 Update connections after a full-level transform 2024-04-22 10:09:04 -06:00
Eevee (Evelyn Woods) 0a5e5c66c2 Add a rough circuit preview to the wire tool 2024-04-22 09:44:50 -06:00
Eevee (Evelyn Woods) 5f80e880c2 Add shortcuts to zoom in/out and reset the zoom 2024-04-22 09:07:55 -06:00
Eevee (Evelyn Woods) 3a9e7c1cd8 Split the adjust tool into rotate/adjust
It was trying to do too many things.  Also, the adjust tool is now free
to operate on actors, and can toggle the form of a number of them.

- Rearranged the palette to put colored tiles in canonical key order,
  finally

- Expanded the size of the SVG overlay slightly so hover effects don't
  get cut off at the level border

- Fixed some MouseOperation nonsense by simply using the same object
  when the same operation is bound to both mouse buttons

- Added a verb and preview to the adjust tool, in the hopes of making it
  slightly more clear what it might do

- Enhanced the adjust tool to place individual thin walls and frame
  arrows
2024-04-22 00:24:07 -06:00
Eevee (Evelyn Woods) abbda898c7 Add support for gray buttons to the adjust tool 2024-04-21 03:53:57 -06:00
Eevee (Evelyn Woods) 1170c5970e Fix blank circuit blocks? Although they seemed to work already? 2024-04-21 03:51:44 -06:00
Eevee (Evelyn Woods) 39f0f20dc6 Update implicit button connections when editing, I hope 2024-04-21 02:30:34 -06:00
Eevee (Evelyn Woods) 04d6b3dddb Refactor circuit-tracing to be more in algorithms
This should make it more usable in the editor.
2024-04-21 00:39:23 -06:00
Eevee (Evelyn Woods) c45ebe60e1 Run replays in reverse order, in the hopes of a teeny speedup 2024-04-21 00:38:34 -06:00
Eevee (Evelyn Woods) b360fa3998 Change sand slowdown from 100% to 50%, and give it the gravel sound 2024-04-20 03:34:14 -06:00
Eevee (Evelyn Woods) 29fbb56c88 Update grass description 2024-04-20 03:29:29 -06:00
Eevee (Evelyn Woods) a31c8b8a86 Update icon to the new (current) palette 2024-04-20 03:28:22 -06:00
Eevee (Evelyn Woods) 3dfa9bd361 Continue to fuck around with the color scheme a bit at a time 2024-04-20 03:27:11 -06:00
Eevee (Evelyn Woods) 43d5d65366 Fix loading of c2g zips, oops 2024-04-20 02:56:47 -06:00
Eevee (Evelyn Woods) 0098660d7b Change editor export to use fragments 2024-04-20 02:13:05 -06:00
Eevee (Evelyn Woods) cd2d28dedd Switch to using fragment; support direct linking to packs and levels
That includes direct loading from GliderBot, though there is no UI for
this at the moment, and the URL is also not updated live.
2024-04-20 01:46:01 -06:00
Eevee (Evelyn Woods) b6f38f835d Enable zlib compression of exported levels 2024-04-20 01:45:25 -06:00
Eevee (Evelyn Woods) b44da28020 Try fruitlessly to make c2g parsing more tolerant of mistakes 2024-04-20 01:44:32 -06:00
Eevee (Evelyn Woods) 06ceb827f3 Don't let the player get stuck in an inactive red teleporter 2024-04-19 21:51:34 -06:00
Eevee (Evelyn Woods) 17f4e77054 Fix force-proof players to still bonk on force floors
Fixes the replay of Chaos to Metastable, my white whale!
2024-04-19 21:41:57 -06:00
Eevee (Evelyn Woods) 939c71aab7 Don't die to a monster that was just hooked
This interaction sounds ridiculous but it is real CC2 nonsense.  Fixes
the Hoopla replay!
2024-04-19 00:24:58 -06:00
Eevee (Evelyn Woods) af57e8a33e Remove the raft from the editor 2024-04-18 02:08:55 -06:00
Eevee (Evelyn Woods) e3d8a0f669 Fix the floodfill tool 2024-04-18 02:08:17 -06:00
Eevee (Evelyn Woods) 3cf81b53ad Improve the connection tool somewhat; show implicit connections
For example, you can now make connections with the connection tool.
Remarkable.

Unfortunately, implicit connections aren't updated as you edit the level
yet.

Also came with some refactors for searching a level and whatnot.
2024-04-18 00:56:20 -06:00
Eevee (Evelyn Woods) 5e2dfdd926 Allow clicking green buttons in the editor; move cursor into MouseOperation 2024-04-17 20:30:23 -06:00
Eevee (Evelyn Woods) c624964b76 Oops! Fix calls to blocks_leaving 2024-04-17 19:46:50 -06:00
Eevee (Evelyn Woods) e9650db4d8 Hardcode green toggles a bit less, and shrink the undo size 2024-04-17 19:46:29 -06:00
Eevee (Evelyn Woods) 5aeeb8a974 Touch up some tile tooltips; rearrange experimental tiles 2024-04-17 03:52:39 -06:00
Eevee (Evelyn Woods) e11a5956bd Make hearts and mines transmogrify into each other 2024-04-17 03:51:47 -06:00
Eevee (Evelyn Woods) 618f292ec9 Add an xray view and a "matching button" sprite for the sokoban blocks 2024-04-17 03:51:11 -06:00
Eevee (Evelyn Woods) 849010fc75 Add some saturation to the palette
Opinions are mixed, but not mine.  I like this.
2024-04-17 03:50:19 -06:00
Eevee (Evelyn Woods) 2439048f59 Fix transforming selection + add more transforms 2024-04-17 02:24:06 -06:00
Eevee (Evelyn Woods) ed5f76221b Add support for subtracting from the selection 2024-04-17 01:22:45 -06:00
Eevee (Evelyn Woods) eaa3bf6965 Spruce up the editor toolbar
Ditch the textured backgrounds (hard to read), add some icons for the
controls, and recolor the icons themselves to the new tentative palette.
2024-04-17 01:09:55 -06:00
Eevee (Evelyn Woods) ba11e48c7d Highlight the most interesting button in a dialog 2024-04-16 23:58:47 -06:00
Eevee (Evelyn Woods) 7e0c1b0337 Improve the editor's selection tool (slightly WIP)
It now supports arbitrary regions!  The tool itself still makes
rectangles, but you can shift-drag to add to the selection.

It also distinguishes visually between a floating selection and not, is
more easily visible against certain tile backgrounds and at small zoom
levels, and, I don't know, probably some other stuff.
2024-04-16 23:55:35 -06:00
Eevee (Evelyn Woods) 48482b2a65 Recolor the whole thing to pinkish-orange
You know.  Lexy colors.  Seems to make sense.

Also fixed several places I just hated the color scheme, such as the
hover color in popup menus and the title bar in dialogs.  Woohoo.
2024-04-16 23:44:28 -06:00
Eevee (Evelyn Woods) e1e99e73e7 Fix circuit blocks; distinguish floor wiring from black button wiring 2024-04-16 21:09:46 -06:00
Eevee (Evelyn Woods) 3802b10956 Visually indicate when a floor is in an odd wiring state
This distinguished a regular crossed floor from what you get when
blowing up e.g. a blue or red teleporter.

Fixes #60.
2024-04-16 20:48:50 -06:00
Eevee (Evelyn Woods) bef5550a95 Make mouse operations always exist, not only while clicking
This allows for multi-eyedrop (where right-clicking the same cell cycles
through everything in that cell) to finally work.

Also fixes #72, I think.
2024-04-16 05:23:56 -06:00
Eevee (Evelyn Woods) 933d20d559 Factor out the list of pushable tiles 2024-04-13 22:06:00 -06:00
Eevee (Evelyn Woods) cddc274701 Don't let key repeat interfere with the restart timer 2024-04-12 19:03:24 -06:00
Eevee (Evelyn Woods) fe4c111fa9 Thread the bulk tester
Four threads makes it twice as fast.  Go figure.
2024-04-12 18:29:49 -06:00
Eevee (Evelyn Woods) a06f53af29 Emit wire pulses in reverse reading order
Fixes the replay for CC2LP1 #67 Before My Very Eyes.
2024-04-12 04:00:37 -06:00
Eevee (Evelyn Woods) 52bc2bdf8e Show the entire blast radius of dynamite 2024-04-12 01:08:16 -06:00
Eevee (Evelyn Woods) f7b8d3c7bc Whoops I meant to spice up the score, not the label 2024-04-12 00:07:07 -06:00
Eevee (Evelyn Woods) 01dd4eb1a8 Show best score on the level overlay; touch up scorecard and mobile CSS a bit 2024-04-11 23:49:18 -06:00