summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-11-02game: play talk sfx when TV appears at spatial volumeVito Caputo
Instead of only playing the talk sfx when adult gets glued to the TV, always play it when the TV appears. Also scale the volume with the inverse square of the distance from the TV.
2023-11-02sfx: add volume control to sfx_play()Vito Caputo
Preparatory commit for experimenting with varying volumes based on distance. Impetus is an interest in making the TV clips always play when the TV appears, but vary the volume with distance.
2023-10-14sars,hungrycat: add --wait flagVito Caputo
This tells sars to just wait indefinitely until an ESC is pressed pre-fadein during the opening hungrycat context. The --delay [seconds] flag was added to facilitate screen captures, but it's actually rather annoying to use. This way the sars window will just sit there ignoring any spurious events waiting for an ESC to proceed onto DELAY->FADEIN... Probably not useful but technically this composes with --delay as well, such that if you have --delay and --wait specified, once you hit ESC to leave the WAIT state, the delay will then begin.
2023-10-13hungrycat: don't leave context during delayVito Caputo
Normally on any keypress/finger event the context switch will occur. But when --delay is in effect, you generally want to have tolerance of spurious keypresses and such while getting screencap stuff sorted out. So this commit suppresses leaving the hungrycat context while in the delay state...
2023-08-27libstage,libix2: bump submodules for https depsVito Caputo
These submodules have recursive submodules, and have also been updated to use https for those.
2023-08-27*: switch to https URLs throughoutVito Caputo
The git:// URLs work fine but they're both easier to MITM (however unlikely) and more likely to be blocked if you're on something like a public library or corporate WiFi blocking everything but 80/443 traffic. Also while updating the README URL I made `git clone --recursive` the assumed supported method, anyone using such an old git can deal.
2023-02-02README: correct info about assets/ locationVito Caputo
Since commit 880eee9 the assets must be a sibling of the sars executable, AKA under the sars executable's parent dir.
2022-12-29plasma-node,shader-node: break out maga plasma shaderrev4Vito Caputo
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.
2022-12-29shader: return shader from shader_ref()Vito Caputo
trivial ergonomics improvement
2022-12-27assets: ANSI updates provided by CranksyVito Caputo
The on-TV graphic was ripped from another scener for the Blender compo, but was semi pornographic and created some copyright concerns WRT broader distribution of SARS. This commit replaces tv.ans with one containing a news channel talking head Cranksy whipped up. He also provided a smiling variant of baby-hatted to better align with the corresponding sound effect.
2022-12-27game: conslidate adult<->virus collision handlingVito Caputo
This was unnecessary copy-n-pasta
2022-12-27game: pickup babies when hit due to TV attractionVito Caputo
This case was ignored previously Also made the baby's position update immediate upon pickup rather than potentially delayed until adult moved again...
2022-12-27game: simplify search handlers to always skip inactive nodesVito Caputo
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.
2022-12-27plasma-node: fix gloom broken (oops) by 6a1c411Vito Caputo
This puts back the gloom multiplication for non-maga mode. It seems appropriate to let maga mode be impervious to gloom, ignorance is bliss as they say.
2022-12-18plasma-node: add stars to MAGA plasma modeVito Caputo
Until now the red/white/blue plasma was somewhat ambiguous WRT french/russian flags. This commit adds white stars to the blue.
2022-12-13sars: add --delay [seconds] flagVito Caputo
Defaults to 10 seconds when bare --delay is used This is primarily intended for video capture purposes
2022-12-13plasma-node,game: wire up and implement maga plasmaVito Caputo
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.
2022-12-13game: move maga mode flag from adult_t to game_tVito Caputo
Preparatory commit for exposing maga mode to plasma-node for switching to a nationalistic color palette
2022-12-12plasma-node: link infects_rate_smoothed to plasmaVito Caputo
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
2022-12-12game: maintain an infections rate to drive plasmaVito Caputo
Preparatory commit for tying plasma behavior to infections rate
2022-12-12game: flip the winning adult as a celebratory danceVito Caputo
Dan's idea...
2022-12-12sfx: introduce concept of voices and concurrency limitsVito Caputo
This is a first stab at reeling in the cacophony of noise that develops in the late stages of sars.
2022-12-10game: introduce MAGA powerup and MAGA mode for adultVito Caputo
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.
2022-12-10assets: add preliminary MAGA ANSIsVito Caputo
These are intened to be placeholders, they're not really great - but there are no copyright issues WRT using them.
2022-12-10sfx: introduce sfx_t.adult_maga for adult MAGA-upVito Caputo
2022-12-10{adult-maga,maga}-node: introduce some maga nodesVito Caputo
Preparatory commit for adding a MAGA mode for the adult. This entails a MAGA powerup similar to the mask, and a new adult node wearing a MAGA hat. This commit only adds the nodes, nothing functionally different.
2022-12-10game: shorten game over (loss) delayVito Caputo
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.
2022-12-10v2f: add v2f_invert()Vito Caputo
preparatory commit for inverting controls on adult maga mode
2022-12-10ansr-text: add some debug prints for SAUCE metadataVito Caputo
PabloDraw seems to randomly omit the SAUCE metadata when I save files, so adding some instrumentation for better visibility into these things @ runtime on debug builds.
2022-12-10macros: introduce some debug printing helpersVito Caputo
Conditional on SARS_DEBUG defined (CFLAGS=-DSARS_DEBUG) This commit only adds the helpers, no actual users yet.
2022-12-10game: leave game over waits on WASD and arrow keys tooVito Caputo
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.
2022-12-08game: space or enter keys to leave game over wait statesVito Caputo
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.
2022-12-08sfx,game: introduce sfx_t.tv_talk[10] for talking headVito Caputo
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
2022-12-08game: fixup GAME_MASK_SCALE to match .ans aspect ratioVito Caputo
The mask is rectangular, the quick-n-dirty scale I used was square.
2022-12-07game: tweak GAME_TV_SCALE aspect ratio to better match the ansVito Caputo
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.
2022-12-07game: ensure mask is above tpVito Caputo
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.
2022-12-06plasma-node,tex: GLSL 1 and 1.2 versions of shadersVito Caputo
Emscripten support is strictly GLES2 which is why the shaders were migrated to GLSL 1. I was hoping the already supported desktop operating systems would be able to handle the GLSL 1 shaders and GLES2-constrained API usage on a GL 2.1 context, but MacOS seems to be angry about this, Tara reported testing rev4-rc{9,10}: Fatal error: Error compiling vertex shader: "ERROR: 0:1: '' : version '100' is not supported Which is further than rc8 got, that couldn't even create a window. And since this seems to be at least reaching shader compilation, which is pretty deep into sars as far as exercising GL functionality, I'm just resorting to gross granular #ifdef __EMSCRIPTEN__ fuckery in the shaders to provide GLSL 1.2 shaders on non-emscripten builds (including MacOS), and GLSL 1 shaders on just emscripten. Fortunately in sars there just isn't much shader code, so it's not especially painful. But future titles building upon this codebase and these assumptions may become quite painful if using this approach to support emscripten and desktop GL. Or if sars evolves to make more sophisticated use of shaders, this could introduce substantial development and maintenance overhead. TL;DR: I hate this commit, but it seems like the shortest path right now to make everything happy again in an emscripten supported world.
2022-12-05sfx,game: introduce baby_hatted.wav sound effectVito Caputo
This plays whenever a baby dons a mask as a hat.
2022-12-05sfx,game: introduce adult_maskhit.wav sound effectVito Caputo
This plays whenever the adult gets hit by a virus while masked, without running out of masks.
2022-12-05sars,game: add --cheat flag intended for dev/testingVito Caputo
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.
2022-12-05sfx,game: introduce adult_unmasked.wav sound effectVito Caputo
This plays whenever the adult runs out of masks
2022-12-05sfx,game: introduce adult_armsfull.wav sound effectVito Caputo
This plays whenever the adult attempts to pickup TP while holding a baby.
2022-12-05game: play winning.ogg in GAME_STATE_OVER_WINNINGVito Caputo
Play a celebratory song after winning
2022-12-05game: move game.ogg playback game_enter()->reset_game()Vito Caputo
Preparatory commit for GAME_STATE_OVER_WINNING music.
2022-12-03sars: seed rand() with something randomishVito Caputo
it's noticable that every fresh game starts the same
2022-12-03game: give adult some acceleration steps from standstillVito Caputo
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...
2022-12-02game: differentiate corpse virusesVito Caputo
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.
2022-12-02game: tweak teepee probabilities a bit againVito Caputo
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!
2022-12-02game: move probabilities to named definesVito Caputo
Nothing functionally changed, just naming some magic numbers and putting them somewhere more organized.
2022-12-02game: remove redundant reset_virus() callVito Caputo
This looks like a harmless copy paste bug in 55b7b49, but it's pointless to do twice.
© All Rights Reserved