- The free/restricted axis distinction is gone; the joystick always
operates in "free" mode.
- Added direction snapping functionality to help aid exact movement in
cardinal and/or diagonal directions. The snapping angle can be
adjusted from 0% (disabled) to 100% (similar to the old "restricted"
mode). The snapping angle can also be biased towards cardinals or
diagonals.
- When the maximum zone is less than or equals dead zone, moving
the character will always move at maximum speed (as in the old
"restricted" mode).
- Most of these settings are now visualized in the options menu and can
be tested there.
Not included by default, intended for custom distributions (for DoKomi
in particular)
Also improve the upgrade mechanism by ignoring settings that were not
changed in the config being parsed.
* Use correctly scaled radial deadzones instead of naive per-axis
deadzones
* Option to adjust the "maximum zone" (upper deadzone)
* Option to remap square input into circular. Unfortunately there's no
nice way to detect which type the controller reports. We assume
circular by default.
* A more sensible sensitivity setting
* Use a larger minimum deadzone when emulating key presses (e.g. in
menus)
* Adjusted key repeat to be less aggressive
SDL_WINDOW_ALLOW_HIGHDPI is now used. On platforms where SDL supports
this flag, the window size units are interpreted as abstract scaled
points rather than raw pixels, and may not match the underlying
framebuffer resolution if the display scaling factor is not 1. The
scaling factor and the effective framebuffer resolution are now
displayed in the options menu to reflect this fact.
In addition, the hidden "fullscreen_desktop_mode" setting has been
removed and the behavior is now always as if the value was "1" (the
default). Exclusive fullscreen with modesetting is not very useful,
and does not work well on some platforms (X11 in particular). That code
is not worth maintaining together with the frankly ridiculous complexity
of dancing around with the DPI scaling shenanigans of various operating
systems.
On platforms that do not support SDL_WINDOW_ALLOW_HIGHDPI, the window
size is assumed to correspond to raw pixels, and an effort is made to
disable the operating system's DPI upscaling mechanism, when possible.
This commit also fixes the Windows manifest, broken by
dc57f78d89 thanks to microshaft's amazing
documentation.
Closes #211
* Major refactoring of the main loop(s) and control flow (WIP)
run_at_fps() is gone 🦀
Instead of nested blocking event loops, there is now an eventloop API
that manages an explicit stack of scenes. This makes Taisei a lot more
portable to async environments where spinning a loop forever without
yielding control simply is not an option, and that is the entire point
of this change.
A prime example of such an environment is the Web (via emscripten).
Taisei was able to run there through a terrible hack: inserting
emscripten_sleep calls into the loop, which would yield to the browser.
This has several major drawbacks: first of all, every function that
could possibly call emscripten_sleep must be compiled into a special
kind of bytecode, which then has to be interpreted at runtime, *much*
slower than JITed WebAssembly. And that includes *everything* down the
call stack, too! For more information, see
https://emscripten.org/docs/porting/emterpreter.html
Even though that method worked well enough for experimenting, despite
suboptimal performance, there is another obvious drawback:
emscripten_sleep is implemented via setTimeout(), which can be very
imprecise and is generally not reliable for fluid animation. Browsers
actually have an API specifically for that use case:
window.requestAnimationFrame(), but Taisei's original blocking control
flow style is simply not compatible with it. Emscripten exposes this API
with its emscripten_set_main_loop(), which the eventloop backend now
uses on that platform.
Unfortunately, C is still C, with no fancy closures or coroutines.
With blocking calls into menu/scene loops gone, the control flow is
reimplemented via so-called (pun intended) "call chains". That is
basically an euphemism for callback hell. With manual memory management
and zero type-safety. Not that the menu system wasn't shitty enough
already. I'll just keep telling myself that this is all temporary and
will be replaced with scripts in v1.4.
* improve build system for emscripten + various fixes
* squish menu bugs
* improve emscripten event loop; disable EMULATE_FUNCTION_POINTER_CASTS
Note that stock freetype does not work without
EMULATE_FUNCTION_POINTER_CASTS; use a patched version from the
"emscripten" branch here:
https://github.com/taisei-project/freetype2/tree/emscripten
* Enable -Wcast-function-type
Calling functions through incompatible pointers is nasal demons and
doesn't work in WASM.
* webgl: workaround a crash on some browsers
* emscripten improvements:
* Persist state (config, progress, replays, ...) in local IndexDB
* Simpler HTML shell (temporary)
* Enable more optimizations
* fix build if validate_glsl=false
* emscripten: improve asset packaging, with local cache
Note that even though there are rules to build audio bundles, audio
does *not* work yet. It looks like SDL2_mixer can not work without
threads, which is a problem. Yet another reason to write an OpenAL
backend - emscripten supports that natively.
* emscripten: customize the html shell
* emscripten: force "show log" checkbox unchecked initially
* emscripten: remove quit shortcut from main menu (since there's no quit)
* emscripten: log area fixes
* emscripten/webgl: workaround for fullscreen viewport issue
* emscripten: implement frameskip
* emscripter: improve framerate limiter
* align List to at least 8 bytes (shut up warnings)
* fix non-emscripten builds
* improve fullscreen handling, mainly for emscripten
* Workaround to make audio work in chromium
emscripten-core/emscripten#6511
* emscripten: better vsync handling; enable vsync & disable fxaa by default
* WIP some projectile effects
* fix segfault
* Laser smoothing and glow via post-processing blur magic
TODO: make it optional
* fix memory corruption
* fix memory corruption for realsies now
* fix color_get_hsl for out-of-range colors
* some more bullet flare tweaks
* some lame clear effect workarounds
* spawn bullet flares after frame 0; looks better and fixes some problems
* New baryon explosion; fix petal_explosion; leanify everything
* Add missing bullet flare sprite, rebuild main atlas
* improve batching efficiency with bullet spawn flares
* forgot git add
* Group projectiles/particles by shader where possible
* Another take on baryon explosion; make fg framebuffers 16bit
* WIP some settings for toasters
* remove stupid debug log
* microoptimization that probably does nothing anyway
* somewhat more intuitive quality settings
* Whitelist more particles (MarisaB is on hold)
* Whitelist (and fix) some more stage6 particles (mostly ToE)
* Add a spell name background
* Experimental radial healthbar for bosses
* healthbar tweaks
* thiccer healthbars in response to feedback
* remove healthbar survival timer; just fade out on survivals
* Add linear healthbars option; WIP other boss HUD tweaks
* Use the proper spell card name format
* New font and some random garbage to go along with it
* Generate static font outlines for use in text shaders
* Use outlines in overlay text shader
* Complete boss HUD/healthbar fading logic
* fix boss timer limit
* stage5 bombs explosion effect
* split PFLAG_NOSPAWNZOOM into PFLAG_NOSPAWNFLARE and PFLAG_NOSPAWNFADE;
introduce PFLAG_NOSPAWNEFFECTS which disables both (it's just the two
values OR'd together)
simplify vampiric vapor bullet spawning effect
* Remove spawn fade-in from super-fast stage5 fairy projectiles (limiters)
* lower particle density in v.vapor in minimal mode
* graze effect tweaks
* fix text shortening, tweak replay menu layout
* stupid debug spam
* revisit grazing effects again
* dumb debug spam again
* improve boss attack timer
* overlay effect for boss deaths (similar to the player one)
* spice up spellcard declaration (HUD)
* don't spawn boss death overlay if fleed
* modify Exo2 font to use tabular figures
* adjust replay menu for the font change
* draw timer & power with standard font (phasing out the numbers font)
* WIP new HUD; random fixes/tweaks
* hud: move difficulty indicator
* hud: move debug stuff around
* preloads, mostly
* fix youmuA batching conflict
* shitty workaround for the shitty screenshake shit
* remove extraspell lag by stopping to draw stagebg sooner
which is possible because extra spells have a different spellcard_intro timing. Fun fact of the day: the duration of spellcard_intro is always ATTACK_START_DELAY_EXTRA even for normal spells!
* new stain particle
* i disabled background rendering…
* "batch" marisa_b masterspark draws
* remove these once a new atlas is generated
* make toe quick again
* hopefully fix all occurences of changed stain and ScaleFade behavior
* tweaking reimu_a and toe boson launch effects
* make lhc fast again
* softer involnerability effect
* fix stage 1 snow on the water bug (and improve performance)
translated the time to the future a bit because it only seemed to be an issue for small time values
* remove unnecessary spawnflare from toe
* tone down extra spell start effect
* experimental ReimuB gap shader optimization
* fix python3 shebangs
* generate simple blur shaders w/ hardcoded kernels
* New loading screen
* lasers: fix incorrect draw hook registration
* add webp support for atlas generator
* Use ImageMagick for atlas composition (adds 16-bit support)
* Atlas maintenance
* make the vampiric vapor bullets less prone to invisibility
* Revert a few particles to the quadratic fade curve
* experimental baryon effect
* improve baryon sprites
* disable the baryon effect on minimal postprocessing setting
* Renderer: rename render targets to framebuffers
* Refactor framebuffer pair helper and some of the video API
* Remove hardcoded dimensions from draw_framebuffer_tex
* Make viewport a per-framebuffer property rather than a global one
* Handle config updates via the events system. React to viewport fg/bg quality change requests.
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)
Still, this is a ton better than mixing different styles all over the
place, especially within the same file.
* There's no distinction between "temp" and "perm" nodes anymore.
All nodes are allocated with 1 reference belonging to the
vfs_alloc() caller.
* VFSNode pointers retrieved by any API that returns one (most
notably vfs_locate) are guaranteed to have exactly one reference
belonging to the caller. What this means is that you must always
decref them when you're done using them.
If you're implementing such an API (e.g. a custom locate), remember
to incref any persistent nodes you return.
* Passing a VFSNode* to anything that successfully consumes one (for
example, vfs_mount) transfers ownership of the reference to the
consumer. In other words, consumers do not incref your nodes, but
they will decref them once they don't need them anymore. If you want
to keep the node around, then you must incref it first.
* Bunch of other stuff.
"Ownership" is an abstract concept in this context. Basically it just
means "cleanup responsibility".
* Added a versioned upgrade mechanism
* Made values of vsync 66% less confusing
* Defaulted vsync to off, since it seems to cause input delays for
some people.
* Don't shout warnings when the config file doesn't exist, this is
not something to panic about.