Age | Commit message (Collapse) | Author |
|
Performing the maga branch in the shader slows things down
considerably.
This commit gets rid of the in-shader branch by splitting the
plasma fragment shader into maga and non-maga variants.
This required adding shader vector support to shader-node so
multiple shaders could be supplied, with a selector index pointer
used to pick which is used by the render function.
|
|
This was unnecessary copy-n-pasta
|
|
This case was ignored previously
Also made the baby's position update immediate upon pickup rather
than potentially delayed until adult moved again...
|
|
Initially there were few entity types that would linger in the
ix2 while inactive. That slowly changed over time, and now it's
just silly to have so many piecemeal checks if the node is
active.
This commit just moves the node active test before the entity
type switch and removes the type-specific ones. Other trivial
cleanups are sprinkled in there, but there should be no
functional difference.
|
|
This is a bit janky on the integration side, may cleanup later.
When game_t.is_maga is true, plasma-node now goes nationalist
with red white and blue stripes.
|
|
Preparatory commit for exposing maga mode to plasma-node for
switching to a nationalistic color palette
|
|
For now just scale the intensity of the plasma by the infections
rate. When the infections rate sustain the maximum rate, the
plasma eventually turns black.
Will probably have to iterate a bit on this
|
|
Preparatory commit for tying plasma behavior to infections rate
|
|
Dan's idea...
|
|
This is a first stab at reeling in the cacophony of noise that
develops in the late stages of sars.
|
|
The MAGA powerup appears only when the adult is captivated by the
TV. It's technically not guaranteed to occur, but the
propability is so high currently it's basically always going to
appear when captivated.
The current maga.ans is a MAGA hat, it comes up slowly but
otherwise identically to the others like mask/tp etc.
If you take the MAGA hat, the adult puts it on, discards any mask
it's wearing, and the controls become inverted. Any subsequent
mask pickups attempted simply discard the mask and continue
maskless. Once in MAGA mode, there is no exiting MAGA mode until
death.
|
|
The delay primarily serves to prevent accidental keypresses from
the gameplay at death bleeding into the high score wait state,
which would immediately leave the high score.
But a full second delay on the losing game over is kind of long,
esp. when you're agitated and just want to immediately restart.
The delay is also overloaded a bit in the winning game over
state, as it governs the TP explosion duration which occurs
within this debouncing-like delay. So this commit diverges the
two and leaves the winning delay at 1s, while turning the losing
delay to .5s.
|
|
I'd added SPACE and RETURN, but as those aren't used anywhere
else in sars it's unintuitive to require those spuriously, and
there's a good chance someone will reach for ESC first which will
quit the game instead of restarting.
|
|
Until now _any_ keydown would leave the wait state and reset the
game, making it challenging to do things like create screenshots
of your score+playfield.
With this commit only enter or space will leave these wait states
and reset the game. Escape still immediately quits from every
state.
|
|
There can be assets/talk/[0-9].wav now, one of which will be
played along with adult-captivated.wav
Intended to match the new talking head .ans
|
|
The mask is rectangular, the quick-n-dirty scale I used was square.
|
|
The original scale used here was just pulled from thin air in the
blender weekend rush. The actual ansi doesn't have this aspect
ratio making it a bit too stretched wide.
This overall makes the tv slightly larger, which may affect the
gameplay but hopefully not enough to matter.
|
|
Sometimes you randomly have mask invisibly coincide with tp, and
the only indication is when you pick them up you get two "mine"s
played simultaneously.
Since the mask will always be more sparse and smaller than the tp
at least layer it above the tp to help visibility, though it
might need a shadow or outline in its .ans too.
|
|
This plays whenever a baby dons a mask as a hat.
|
|
This plays whenever the adult gets hit by a virus while masked,
without running out of masks.
|
|
currently this just overrides teepee quantities to always be 128
128 is used instead of 256 so you can still exercise the teepee
boost _without_ winning event, and it doesn't take long to
collect two teepee boosts so iteration still isn't bad.
|
|
This plays whenever the adult runs out of masks
|
|
This plays whenever the adult attempts to pickup TP while holding
a baby.
|
|
Play a celebratory song after winning
|
|
Preparatory commit for GAME_STATE_OVER_WINNING music.
|
|
When navigating tight situations the existing instantaneous 0-100
is difficult to control. By introducing a small bit of
acceleration, one can pulse the controls to make small movements.
Note this doesn't introduce a deceleration curve, movement still
stops immediately upon release of the controls. It's not
anything like a physics simulation, it's just a few frames worth
of ramping up to 100% movement speed for the adult, plain linear
ramp for now.
Now it feels like pixel-accurate collision detection might be
worth adding...
|
|
tv-attracted babies that contact non-corpse viruses should reset
the virus, but they never reset viruses until now.
This commit introduces a corpse flag to the virus entity and sets
it on infection-produced viruses.
Now the tv-attracted baby<->virus infection resets the virus when
the virus isn't a corpse, instead of letting the animated
virus continue on unimpeded.
The corpses should be allowed to propagate infections to
eachother while accumulating, hence why it can't be an
indiscriminate reset of the virus.
|
|
Now that respawns can get immediately infected, things get crazy
as they should - so make it a bit easier to hoard all the teepee.
I'm pretty sure you can just hide off-screen at the top and
collect teepee and masks without ever touching a baby and just
dodging animated viruses as a way to cheat and "win". But that's
kind of allegorical for the pandemic, isn't it? Ignore the needs
of others while hoarding teepee and masks FTW!
|
|
Nothing functionally changed, just naming some magic numbers and
putting them somewhere more organized.
|
|
This looks like a harmless copy paste bug in 55b7b49, but it's
pointless to do twice.
|
|
Dunno why PabloDraw omitted the SAUCE info when creating this
originally, but it was producing an 80 column rendering of the
mask which is more like 43 columns. This resulted in the
collision box/aabb being far larger than the actual mask as
rendered.
Now with the fixed rendering the mask's scale factor needed some
tweaking as well to preserve the same visual size more or less.
|
|
Previously respawned babies could respawn on a virus without
becoming infected, and this actually had a calming effect on the
late stage of the game which is the opposite of what should be
happening as the field fills up with viruses.
What would happen is eventually most of the active set of babies
would be sitting on viruses and isolated by viruses so they
wouldn't likely be resuced, but they also weren't becoming
infected despite being on viruses.
With this change, baby respawning is handled strictly by a timer,
currently every .5s. In that timer handler the number of babies
off from the GAME_NUM_BABIES (10 presently) are attempted to be
respawned. Any of those which are immediately respawned onto
viruses are immediately infected. Then the same thing is
revisted on the next timer expiration.
So it doesn't try very hard to maintain GAME_NUM_BABIES as alive
at all times - this actually becomes impossible when the field is
too crowded to even find spots to respawn without infection.
Instead, what will happen, is in the end game you just have
constant babies respawning and dying every .5s.
The gameplay is dramatically different now, and it's potentially
too difficult now to actually manage to hoard 256 rolls of
TP before dying. I haven't managed it in my testing so far...
so the probabilities may need to be revisited again.
However, the end game /feels/ much more _right_ after this
change. You end up with just tons of viruses and death, and if
you've managed to hoard a bunch of toilet paper, it's a grim
satirical scene of zero living babies, viruses everywhere, but a
happy pile of TP icons. I can only imagine how ridiculous it
looks if you manage to actually win and get the animated
celebratory wall of TP over the sea of death.
Now the dead babies turned viruses just need their own unique
sprite showing actual infected corpses instead of the same virus
sprite. So it's actually visibly a sea of infected bodies...
|
|
(entity_t.flashes_remaining == 0) was being misused to indicate
an entity wasn't on any of the flashers lists.
At some point during the feature's development that was actually
true, but as the code evolved that was no longer the case and
entities would sit in the flashers_off list with
flashes_remaining at 0 before flipping back on for a cycle at
which point they'd be found with 0 flashes_remaining and dropped
from any flashers lists.
This is a problem because flash_entity() would come along and
use the flashes_remaining == 0 state to see if the entity needed
to get on a flashers list before resetting the flashes_remaining
count.
Furthermore, when adult->holding gets cleared (baby drop off) the
flashes_remaining gets zeroed to ensure the reset baby doesn't
start out with residual flashing at its new location. This just
created more opportunities where the flashes_remaining is zero
while still on a list, since the holding reset was just
expediting the list removal - not actually doing it.
This commit simply introduces a discrete flag for flashing vs.
not flashing to indicate flashers_{on,off} list membership,
independent of the flashes_remaining count.
Fixes infinite loop / apparent freeze bug reported by Tara and
Phil during some play testing. Thanks guys!
|
|
Emscripten integration will want this function.
A few mechanical changes required to catch up with upstream
libplay API changes as well.
|
|
- flash masked adult when hit by virus
- flash held baby and teepee when teepee pickup blocked by held
baby (and block teepee pickup when holding a baby)
|
|
This just adds a basic flashing entity mechanism, but doesn't
make anything actually flash yet.
The intention is to make the adult flash briefly when hit by a
virus while masked, and to flash a held baby and teepee when
attempting to pickup the teepee while holding the baby.
|
|
It might make sense to have a separate .wav for this, but since I
don't currently have anything to put there just use the same
wav.
|
|
The icons grid was shifted left slightly...
|
|
Until now keyboard movements could "cheat" by moving faster on
the diagonals. Instead put all the movements through the same
normalizing introduced by the touch handling.
|
|
lower likelihoods of the >1 quantities to make it a bit more
difficult
|
|
This makes hoarding 256 rolls explode the rolls then infinitely
scroll+rotate them while showing the high score and waiting for
keypress.
|
|
just adding an explicit cast
|
|
|
|
For now this just does the same thing as dying, I need
to either animate something interesting or add a .ans
to show something celebratory like the monkey sitting on
a mountain of TP.
|
|
This shows the teeepee quantity alongside the TP sprite, with
a little fade+wiggle animation when the TP is collected.
|
|
In the interests of making it realistically possible to
completely fill the 256 spots of teepee icons as a winning
condition, there's now mega packs of rolls.
There will need to be some visible indication of qty added,
either numerically or with different graphics. I'm leaning
towards just adding numeric quantity values like +3 or +36
over the roll which floats away when you take it.
|
|
for now toilet paper is simply picked up by the adult and
accumulates as a pointless icon starting at the top left corner,
potentially filling the entire screen with enough hoarding;
obstructing the player's view of what's going on.
There's no points added for hoarding, it's completely pointless
and counterproductive.
|
|
- make mask protection additive rather than absolute, so you can
accumulate mask hit points
- raise the mask stage_t.layer 3->4 so it's less obscured
|
|
baby vs. mask: baby steals and wears mask as useless hat,
adult vs. mask: adult wears mask for 3 hits of virus protection
virus vs. masked adult: decrements mask hit points
virus vs. hatted baby: same as virus vs. unmasked baby
TODO:
- visible indication of how many remaining hits mask has
- maybe blink mask when one hit remains
- sfx for adult mask wearing and loss, baby mask stealing?
- sfx for virus vs. mask?
|
|
also s/frozen/captivated/ for consistency with sfx
|