Skip to content

Commit

Permalink
025500e get draft artificial chaser player
Browse files Browse the repository at this point in the history
  • Loading branch information
david-fong committed Apr 27, 2020
1 parent 0d5f5ce commit 71aa19e
Show file tree
Hide file tree
Showing 36 changed files with 488 additions and 251 deletions.
10 changes: 6 additions & 4 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@

### High Priority

1. Check if there are any overridden setters without a getter also overridden or vice versa. This is a subtle and unexpected cause of bugs.
1. Brainstorm ways to split up the js and css to defer loading.
- Make lang files dynamically imported. This will save loading if the user only plays online (no game-manager implementation needed).
1. Make and hook up lang registry (initialize in PostInit, define under Lang).
1. Implement Euclid2 spawn coordinates.
1. Implement basic artificial player.
1. Fill in implementation of bubble event handler.
1. Design decision: Change bubble mechanism:
- Activates automatically and immediately upon players entering each others' (mutual) attack range, or by pressing space in the (mutual) attack range of other players.
- When done automatically, health will be levelled-down enough to cause as many changes in downed-ness as possible by changing other players' health to zero.
- When done automatically, health will be levelled-down enough to cause as many changes in downed-ness as possible by changing other opponents' health to -1 and teammates' health to 0.
- If done by pressing space, health will be levelled further until the space-presser's health is at zero.
- The player with the highest health upon contact, or the player who pressed space is considered the attacker.
- If the attacker is downed (ie. everyone in the interaction is downed), no changes should be made. Just short circuit.
- First, for each un-downed enemy (non-teammate) in range (sorted to evenly distribute downed-ness), the attacker will subtract that enemy's health+1 from its own, causing that enemy to become downed (health === -1 \< 0) until all enemies are downed, or any further whole-health-subtractions would cause it to become downed.
- If it still has more health, it does something similar for its teammates.

### Routine Checkups

- Check if there are any overridden setters without a getter also overridden or vice versa. This is a subtle and unexpected cause of bugs.

### Low Priority

- If we start using SASS, make classes that always have .center-contents or .stack-contents use an extension mechanism so we don't have to manually specify those utility classes in the javascript. That makes it easier to see whats happening from looking just at the stylesheets.
Expand Down
6 changes: 3 additions & 3 deletions assets/style/game/grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
pointer-events: none;
top: 0; left: 0; bottom: 0; right: 0;
}
.game-grid-kbd-dc__icon {
.game-grid-kbd-dc {
color: var(--colour-tileBd);
text-shadow: 0 0 0.3em black;
text-shadow: 0 0 0.5em black;
visibility: hidden;
}

Expand All @@ -45,6 +45,6 @@
.game-grid-impl-body:not(:focus) {
filter: brightness(70%);
}
.game-grid-impl-body:not(:focus) ~ .game-grid-kbd-dc__icon {
.game-grid-impl-body:not(:focus) ~ .game-grid-kbd-dc {
visibility: visible;
}
1 change: 0 additions & 1 deletion assets/style/game/player.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ https://www.w3schools.com/cssref/pr_background-blend-mode.asp
.player[data-downed="no"] > .player__downed-overlay {
visibility: hidden;
}
/* TODO.debug why aren't these `~` selectors working? */
.player[data-face="me"] > .player__face/* ,
.player[data-face="me"] ~ .tile__char */ {
background-color: var(--colour-pFaceMe);
Expand Down
2 changes: 1 addition & 1 deletion assets/style/game/tile.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.tile * {
height: 100%; width: 100%;
}
.tile .tile__pointer-hitbox {
.tile__pointer-hitbox {
pointer-events: initial;
top: 40%; left: 40%;
/* border-color: black; */
Expand Down
3 changes: 1 addition & 2 deletions assets/style/game/zindex.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ is by giving it its own file. */
.game-grid-impl-body { z-index: 0; } /* ROOT */
.player__spotlight-long { z-index: 20; } /* SPOTLIGHT (long-range) */
.tile__seq { z-index: 12; }
.player__face { z-index: 11; }
.tile[data-health] .tile__char { z-index: 11; }
.player[data-face="teammate"] { z-index: 11; }
.player__spotlight-short { z-index: 10; } /* SPOTLIGHT (short-range) */
.player__face { z-index: 1; }

.game-grid-kbd-dc { z-index: 1; }
4 changes: 2 additions & 2 deletions assets/style/initial/colour/snakey.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
--colour-snakey-mainFg: #e9eef3;
--colour-snakey-mainBg: #3f5e77;

--colour-snakey-pFaceMe: #48dff3;
--colour-snakey-pFaceMe: #2fdef5;
--colour-snakey-pFaceTeammate: #f8df50;
--colour-snakey-pFaceImmortalTeammate: #f8df50;

--colour-snakey-pFaceOpponent: #e23fa3;
--colour-snakey-pFaceOpponent: #ec4daf;
--colour-snakey-pFaceImmortalOpponent: #e23fa3;
}
2 changes: 1 addition & 1 deletion dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Sanity check that everything is running properly for online and offline implemen

```shell
git add -u
# Add any required, untracked files.
# Force git tracking of dynamic chunks.
git commit
git push
npm publish
Expand Down
2 changes: 1 addition & 1 deletion dist/1.index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/1/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/1/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/client/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit 71aa19e

Please sign in to comment.