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)
84840d2b02
Consider turn-based mode to be aid; switch back to realtime correctly
2020-11-03 10:32:25 -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
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
Timothy Stiles
a0e37422b9
Merge remote-tracking branch 'upstream/master'
2020-10-23 20:26:39 +11:00
Eevee (Evelyn Woods)
8c2f71294f
Fix crash caused by last fix dammit ( fixes #9 )
2020-10-22 14:44:05 -06:00
Timothy Stiles
fedbd200fc
Merge remote-tracking branch 'upstream/master'
2020-10-22 18:04:43 +11:00
Eevee (Evelyn Woods)
d03d61516f
Fix NaNs sneaking into the save file
2020-10-21 23:34:59 -06:00
Eevee (Evelyn Woods)
09eb03dad6
Iterate actors in reverse order to match Lynx/CC2 ( fixes #7 )
2020-10-21 21:24:59 -06:00
Eevee (Evelyn Woods)
8073604271
Add... error handling... sort of... for levels at least
2020-10-21 21:07:50 -06:00
Eevee (Evelyn Woods)
edbe32c148
Add support for drag/drop, dir upload, C2G, AND lazy level loading!
2020-10-21 20:47:07 -06:00
Timothy Stiles
9e53aa75a0
I tried 'snappier' and it was a bad idea, so now you don't have to
...
it basically skips the first frame of each turn-based movement. it's not TERRIBLE but the smooth movement is already really nice, we don't need to change it
2020-10-14 23:13:38 +11:00
Timothy Stiles
4388402850
Merge remote-tracking branch 'upstream/master'
2020-10-14 22:43:35 +11:00
Timothy Stiles
be5cc7f97f
spaceify
2020-10-14 22:23:13 +11:00
Timothy Stiles
e9d542f438
fix a bug when undoing while waiting for input
...
need to unset it (we used to do this but it got lost in the refactor)
2020-10-14 22:22:27 +11:00
Timothy Stiles
a7c38ae0af
fix 'keys held for less than a frame are ignored' bug
...
this was annoying me!
2020-10-14 22:17:07 +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
a8ce3bca11
fix bugs
...
we're back at parity now, it looks like
2020-10-14 21:42:51 +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)
4cd0585d0b
Revert the blue wall compat fix and replace them with popwalls instead ( fixes #5 )
2020-10-01 03:22:49 -06:00
Eevee (Evelyn Woods)
4f5d169d06
Reduce SFX volume in levels with a lot of off-screen button presses
2020-10-01 03:08:54 -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)
8326b42bc7
Pad "real time" seconds to two places; allow tied scores without aid to replace scores with aid
2020-09-30 02:37:43 -06:00
Eevee (Evelyn Woods)
8711d87a36
Split the editor into its own module
2020-09-28 00:58:31 -06:00
Eevee (Evelyn Woods)
760ca374ce
Fall back to webkitAudioContext if necessary, sigh
2020-09-26 19:47:51 -06:00
Timothy Stiles
c8d80dfc63
another spaceify (oops)
...
I literally tried to change the setting for this in notepad++ but it crashes every time I do
ha ha
2020-09-26 23:48:47 +10:00
Timothy Stiles
ccfd5c30ce
fix animation ugliness in turn-based mode
...
Uguhughugh it looks SO SMOOTH NOW. I can go to bed happy.
2020-09-26 23:45:53 +10:00
Timothy Stiles
e908434a20
only restart on fresh press of spacebar
2020-09-26 23:01:42 +10:00
Timothy Stiles
5b7273e9d9
Turn-Based: add space to wait
2020-09-26 22:40:38 +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)
b40805c02e
Take a rough swing at phone support
2020-09-26 02:55:39 -06:00
Eevee (Evelyn Woods)
12066072ec
Disable the big ol cheat whoops
2020-09-26 00:17:15 -06:00
Eevee (Evelyn Woods)
5e2c8ee65e
Add a background; hide some broken stuff
2020-09-25 19:55:34 -06:00
Eevee (Evelyn Woods)
f0bfa12083
Clear connections when editing a new level
2020-09-25 05:39:15 -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)
6aee8ed622
Overhaul the UI to be more good pretty; add CCLP2+4
2020-09-24 20:28:16 -06:00
Eevee (Evelyn Woods)
c231e7fc53
Add the Lexy tileset and make it the default, finally!
2020-09-24 19:20:29 -06:00
Eevee (Evelyn Woods)
19fd4273f1
Add three more songs; make music track deterministic
2020-09-24 17:23:31 -06:00
Eevee (Evelyn Woods)
f583fe3b10
Rewind at 2× speed
2020-09-23 21:43:24 -06:00
Eevee (Evelyn Woods)
a631b0f0e2
Fix demo playback (faucet was being created too early and immediately destroyed)
2020-09-23 21:42:05 -06:00
Eevee (Evelyn Woods)
b7ceafc5a1
Add a first pass at a soundtrack, with 5 tracks wow!
2020-09-21 02:08:03 -06:00
Eevee (Evelyn Woods)
0535cbc0bf
Stub out drawing connections in the editor
2020-09-20 21:17:18 -06:00
Eevee (Evelyn Woods)
8ac70f8ee6
Add some more obits and remove "player" from them
2020-09-20 21:17:01 -06:00
Eevee (Evelyn Woods)
ddfa7f562a
Extend the CC2 tile definition with some custom stuff
2020-09-19 23:32:13 -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)
bc08ec4ceb
Lazy-initialize the editor (to keep the TW tileset working in the player)
2020-09-16 23:34:52 -06:00
Eevee (Evelyn Woods)
ede7dbf424
Take inventory into account when auto-scaling the game
2020-09-16 19:46:39 -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)
e70e92b931
Move responsibility for drawing out of Tileset and into the renderer
2020-09-16 14:10:10 -06:00
Eevee (Evelyn Woods)
1dd617bbd0
Fix the editor's cell sort direction
2020-09-16 01:18:14 -06:00
Eevee (Evelyn Woods)
39a7985c1e
Add support for map compression; use URL-safe base64
2020-09-16 01:08:08 -06:00
Eevee (Evelyn Woods)
a7f00d6ec4
Get level encoding and URL sharing just barely working!
2020-09-16 00:11:52 -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)
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)
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)
67228d89d1
Fix bumping to only happen on departure; add a CC2 input tiebreaker
2020-09-14 21:45:27 -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)
5d39e37ad2
Implement CC2 input handling, bumping, and block slapping
2020-09-12 20:07:26 -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)
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)
6b5b8b06aa
Spruce up the options dialog, though it still doesn't work
2020-09-09 21:39:24 -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)
ac053d6c1f
Restart the level when switching back from the editor
2020-09-09 18:47:18 -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
Eevee (Evelyn Woods)
88ec9f89e7
Fix turtles and implement swivels; CC2 LESSON 1 now replays correctly!
2020-09-08 14:23:55 -06:00
Eevee (Evelyn Woods)
d38cbc9294
Add more items to the editor, fix its buttons, do smart drawing
2020-09-08 12:39:06 -06:00
Eevee (Evelyn Woods)
bb50189644
Actors who start on traps should start the level trapped
2020-09-07 14:38:31 -06:00
Eevee (Evelyn Woods)
2b07254d70
Fix undoing of slide moves
2020-09-05 19:50:09 -06:00
Eevee (Evelyn Woods)
9197061096
Don't stop when hitting a wall on a force floor
2020-09-05 19:41:36 -06:00
Eevee (Evelyn Woods)
136fa432e3
Prevent pushing a block off a cloner
2020-09-05 19:19:08 -06:00
Eevee (Evelyn Woods)
3d6dca2440
Fix blocks sliding on ice and also squishing the player
2020-09-05 17:57:48 -06:00
Eevee (Evelyn Woods)
4ccf17120b
Fix turning around when hitting a wall on an ice corner
2020-09-05 17:47:33 -06:00
Eevee (Evelyn Woods)
a43b7e1d37
Wire up the "change pack" button
2020-09-05 17:37:11 -06:00
Eevee (Evelyn Woods)
077999de57
Fix restart
2020-09-05 17:30:41 -06:00
Eevee (Evelyn Woods)
b01601fab6
Correctly identify DAT files; don't render editor when not in use
2020-09-05 17:17:59 -06:00
Eevee (Evelyn Woods)
bd526059f7
Unbreak opening CCLP1 (oops)
2020-09-05 17:11:34 -06:00
Eevee (Evelyn Woods)
6f6f0fab48
Finally support "uploading" your own levels
2020-09-05 17:10:52 -06:00
Eevee (Evelyn Woods)
dea7a7b754
Add a splash screen and the beginning of an editor
2020-09-05 16:21:31 -06:00
Eevee (Evelyn Woods)
25989fc75b
Limit the undo stack to 200 tics
2020-09-03 13:55:19 -06:00
Eevee (Evelyn Woods)
8384b8d268
Auto-pause when losing focus
2020-09-03 13:53:22 -06:00
Eevee (Evelyn Woods)
8309b80342
Fix draw order of tiles in a cell once and for all
2020-09-03 10:39:19 -06:00
Eevee (Evelyn Woods)
15d3d43b76
Let's just guarantee that tic_offset is never 1
2020-09-03 10:31:46 -06:00