Age | Commit message (Collapse) | Author |
|
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.
|
|
This shows a numeric display with an API for tracking a position
until released. Once released the node self-animates and frees
itself from its own rendering function. Post-release the node
stops accessing the tracking position, intended for allowing the
associated entity to become reused or discarded immediately upon
release. For this to work smoothly the release must be accompanied
by a storing of the last position within the bonus node via the
provided pointer, which the bonus node's render function then uses
as the origin of its self-animating before destruction.
See comment at start of bonus-node.c for more information/issues.
This only adds the node without integrating into the game, a
subsequent commit will integrate into game.c. Initial impetus
for adding this is making teepee quantities visible.
|
|
Newer libstage enables the render_func to free its stage node via
return value. This is useful for fire-and-forget style ephemeral
nodes that make for convenient autonomous stage nodes which
remove themselves after running their course. Think bonus scores
and little visual effects...
Requires some mechanical changes to the existing render funcs,
but nothing functionally has really changed.
|
|
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.
|
|
Windows builds were crashing after not even rendering the splash
screen properly. Experience suggested this was probably the
cause, and testing in WINE has at least seemed confirm the fix.
|
|
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.
|
|
preparatory commit for a toilet paper hoarding game mechanic
|
|
- 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
|
|
simple removal of the now unused embedded assets
|
|
This switches all existing art assets over to
runtime-loaded-and-rendered .ans assets.
gfx/*.h embedded assets will be removed in a subsequent commit
|
|
libansr is used to turn the ansi stream of bytes into an
in-memory representation of the screen's character contents.
From this in-memory representation (ansr_t) an RGBA pixel
rendering is produced in the form of a uint32_t array. This is
then uploaded to the GPU via the existing tex.[ch] api.
The intention here is to replace all the compiled-in gfx/* RGBA
buffers with runtime-loaded-and-rendered .and files read from the
filesystem. This enables faster iteration on the art without
involving recompilation, and smaller distribution of the builds.
Nothing functionally changes with this commit yet. It's only
introducing the functionality to the tree and adding it to the
build.
Subsequent commits will replace the various tex_new() callers in
the various -node.c listings with ansr_tex_new() equivalents.
Afterwards all of the headers in gfx/ will be removed in favor of
.ans assets.
One additional detail is there's now going to be a concept of
mask.ans files for controlling the alpha, since .ans alone
doesn't really suffice here. Some ansi editors use methods like
space-padding from the left to place the actual content, and
there's no obvious way to differentiate those space pads from
desired opaque background color cells vs. just transparent
locators. So a separate mask.ans is supported where every
non-black pixel of the mask.ans will be opaque, and every black
pixel transparent, in the final tex_t output.
|
|
adding the library to autotools
|
|
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?
|
|
gfx-adult-masked: adult wearing mask
gfx-baby-hatted: baby misusing mask as hat
gfx-mask: the mask powerup itself
This is a preparatory commit that doesn't actually change
anything functionally, just to avoid having giant .h files in
the powerup-adding commit.
|
|
This must have been introduced accidentally when rearranging the
function. Fortunately tex_node_new_mem() isn't really used by
anything except hungrycat.c so it's been relatively harmless.
|
|
also s/frozen/captivated/ for consistency with sfx
|
|
splash screen bypasses for the impatient
escape quits splash now as well
|
|
Existing code wouldn't notice when a TV-attracted baby collided
with an existing inanimate infection (previously infected baby)
This commit adds a nested search in tv_search for the affected
baby case, to detect such collisions. Note this required bumping
the max nested search for the ix2 from 1 to 2, comment updated to
reflect that.
|
|
The existing code wouldn't handle when newly infected babies
overlapped with other uninfected babies, creating potential
outcomes where a stationary virus is left visibly touching an
uninfected baby.
This commit puts new infections on a list to be processed like
viruses after performing the per-virus search creating the new
infections. Now when a newly infected baby is touching other
babies, those other babies become immediately infected as well.
|
|
It's possible for babies to overlap and a virus to encounter them
simultaneously. The existing code halted the search on the first
hit. This commit changes things to continue the search and
infect all hits before resetting the infecting virus.
|
|
Now nearby babies migrate towards the TV
|
|
This name already doesn't quite reflect what's happening since
the addition of the TV.
There will be more non-viruses stuff added to this function only
making the existing name even more wrong. Renaming for better
accuracy along with the associated timer's symbolic constants.
No functional changes...
|
|
When a touch is active, the player progresses towards the touch
position.
The scaling of the touch coordinates is a bit oversized so you
can place the adult off-screen to rescue babies, without your
finger actually going off-screen.
|
|
bpc = boxed projection coordinates, this basically comes from eon just
like the pillar/letter boxing code for fullscreen stuff did.
Previously I didn't need this part of that code, but the touch
coordinates are in ndc and those need to get transformed by the
projection transform's inverse.
|
|
I feel like I've re-fixed this a dozen times now in various
projects because I haven't been submoduling m4f*.h
|
|
Having these distinct is vestigial, they're no longer different
so merge them. No functional difference.
|
|
The bulk of this is mechanical wiring up of a projection_x to all
the nodes.
But this also introduces maintenance of the projection_x, with
aspect-ratio preservation in two of the modes: WINDOWED and
FULLSCREEN, with the previously default stretched-to-fill
fullscreen mode now relegated to a third FILLSCREEN winmode.
The default at startup is now an aspect ratio-preserving windowed
mode.
Simply press the 'f' key at any time to cycle through them.
This was mostly done in sars to provide a source-available test
for reproducing a fullscreen SDL2 bug I filed @
https://github.com/libsdl-org/SDL/issues/5139
Otherwise it's pretty silly to bother with doing anything on
sars... but it is a handy little mule for such things.
|
|
Newer libstage cleans up the parent/adopt conf naming a bit, fixup
relevant call sites to reflect that.
|
|
Cosmetic change getting rid of a FIXME from the code
|
|
Even with the MSAA off there were occasional fringes showing up,
turns out it's because of the default GL texture wrap mode.
|
|
This is vestigial from Eon and doesn't benefit sars, and
seems to be introducing corruption on the transparent fringes
of the sprites.
|
|
Never updated the window title after ripping this from the Eon
initialization boilerplate
|
|
Some substitution errors, some stale stuff, some unnecessarily
conversational crap resulting from drunk overnighter coding.
|
|
just some missing whitespace
|
|
Missing comma silently resulted in aabb_any.min.x == -2
Excellent example of how using the same syntax for negative and
the subtraction operator creates opportunity for silent bugs.
This is the first time this particular thing has bitten me, doing
mostly systems programming throughout my life I haven't dealt much
with negative values and certainly not frequently initializing bags
of them as is common in game development.
This bug is why the collision hit boxes seemed so huge, it was only
on the horizontal axis, and actually just the minimum side but in-play
it appears to be both since there's always a minimum involved on a
horizontal collision.
Sigh.
|
|
Missed two first time around
|
|
|
|
The m4f_3dx.h helpers know to give an identity on NULL...
No functional difference, just removing some kruft.
|
|
Rather than a new-then-free dance this avoids creating a new
stage_t altogether by installing the new object into the existing
one via the stage_conf_t.parent pointer combined with adopt flag.
|
|
The theme of this Blender was:
Monkeys / Rescuing / Between Realities
With all the COVID-19 stuff going on, it seemed like a fun way
to lighten things up a bit to make something where a monkey runs
around trying to rescue child monkeys from coronaviruses moving
across the playfield. In keeping with the theme, to rescue the
helpless monkeys you take them to a different reality by carrying
them off the window/screen. As infections increase the field
becomes crowded with viruses until your player becomes infected
through contact, ending your game.
This was written quickly kamikaze style overnight. Some
scaffolding bits came from past projects of mine like the vector
headers, shader and texture node building blocks, and the plasma
effect has been used a few times now and originally was derived
from some gpu programming tutorial if memory serves. I just
wanted to put something in the background for this strange
reality.
This is the first time I've used libplay, in fact, it was
basically slapped together last night at the start of this to
avoid having to do all that SDL initialization all over again.
The unique meat of this work is in game.c, there isn't really all
that much to this game though. It's not pretty code, but it
works well enough and this task served as a useful exercise of
trying to get some quick game dev done using this collection of
facilities.
Most the heavy lifting comes from my reused libraries which are
slowly evolving into something somewhat effective for simple game
development.
Enjoy, and happy hacking!
|
|
Cranksy kindly provided a bunch of graphics for this collaboration,
mostly ANSI-derived but we'll treat them as pixel art.
My understanding is this is a mix of ripped stuff and some original
work, it's nothing crazy - just something usable on short notice
for the 24hr IRC compo this is being made for.
I'm committing all the graphics separately so the big code commit isn't
badly polluted by the gfx bulk
|
|
Just a bunch of shit that doesn't really do much more than produce
an executable yet.
|