Closed varoonp123 closed 1 year ago
The problem is that sqlite (in C) uses stdio.h
and we don't have that in the browser. turns out this isnt so easy since sqlite is all about synchronous IO which doesnt go so well in the browser, especially since we also need to compile audio stuff to JS. so ill conditionally compile out the db stuff and the current game metrics are all we get in the browser for now.
I also tried with wasm32-wasi
and wasm32-emscripten
targets.
I busted out some big guns for some large scale refactoring (IntelliJ can do things that neovim can only dream of). Copying and pasting is for poor people, with this many modules.
thetawave_interface
(we can change the name) that basically has "service APIs" that can be used across plugins. Any plugin can refer to these common typedefs. Are we regressing to .h
files?thetawave_storage
behind a feature flag storage
with the sqlite stuff+db mutation plugin. The UI does conditional compilation for defaults if it doesn't have access to its client-side db. We might as well also move the arcade module to a crate so that it can have its own modules and get more complex if needed.
First time I ran Thetawave on Windows with the "storage" feature. I had this error appear. Reporting to you as directed in the message 👍
The "Games Lost" stat seems off.
The "Games Lost" stat seems off.
The next game I played it was in the 20000's.
Both of those errors were caused by me setting the wrong schedule for the system that increments those counters. Fixed 4aa65dd
After running my branch a few times (using the storage feature) after pulling your changes, it looks like the "games lost" isn't being properly saved in the database. It resets every time I re-run the game.
There seems to be a typo in some of the SQL code.
in a local sqlite. Along the way, we refactored arcade+db functionality into separate crates/compilation units to assist platform-specific feature development+conditional compilation.
![Screenshot from 2023-08-01 02-23-23](https://github.com/thetawavegame/thetawave/assets/22409608/86739ee0-bc9b-4e97-95c2-8016ab001d79)
Some help with layout and styling would be appreciated.