Jun 25, 2018: ------------- ### prismelmappers whose rgraphs have n_frames > 1 ### It seems obvious that the resulting n_frames should be the product of mapper & mappee shapes. ...we could make it an attribute of prismelmapper: how to treat animation. Options: - mapper's animation happens once per frame of mappee's animation - mappee's animation happens once per frame of mapper's animation - mapper + mappee animate simultaneously <-- this is the default, cos its easiest?.. ...ah, but "mapper" is not a rendergraph, it's a mapper. We could define mapper's n_frames as the LCD of its rendergraphs' n_frames. Jun 27, 2018: ------------- mapper l.blu_double: we're expecting to see light-coloured prismels turned to white, others turned to light blue. But everything is turned to light blue. Is that because our double_sq, double_tri are defined with dark blue? (performs an experiment) ...YES. Well, ok but why?.. -> because of that recursive step: mappers end up seeing how things are composed, it's up to us to make sure they *behave* as if they only see the colors in their sub-shapes' rendered bitmaps. -> ok, so what's the fix? ...idunno, but take a look at that thing in prismelrenderer.c which says: /* TODO: think about this and make sure it's correct */ ...it's probably not correct, eh. UPDATE: It's not correct. I did abstract algebra at it until its incorrectness was proven. T__T Jun 30, 2018: ------------- WHAT'S NEEDED FOR A PROPER DEMO: - Music + SFX. Almost anything will do for now. - Get rid of hexmap "unit": unit starts as (1 0 0 0) and only mappers change it. Then add a way in the map.fus files to specify mapper cache entries, and that's how tilesets with different units can co-exist within same worldmap?.. Not that simple. There are no "vert", "edge" prismels. ...although we could add them, I suppose. Things get a little annoying, since we have to start adding single-"tri" versions of every tile (and player state??), and each mapper needs to have solid mappings for prismels tri, vert, edge. I guess the fus syntax would be: shapes: "tile1": prismels: # default, one-"tri" version: : "tri" (0 0 0 0) 0 f 2 # ...or even have no prismels at all?.. # But having one-"tri" versions is maybe nice # for e.g. a minimap mappings: "curvy": # We're now defining the shape which # will be used for map ("curvy") ("tile1") prismels: # etc "double": # ... Dec 9, 2018: ------------ Something is weird about the "-2+" etc in the following: "spit_dead": animation: once 12 shapes: : "dead_particle" (0 1 3 1) 1 f 0+ (0 6) : "dead_particle" (0 1 3 1) 3 f -2+ (2 6) : "dead_particle" (0 1 3 1) 6 f -3+ (3 6) : "dead_particle" (0 1 3 1) 9 f -5+ (5 6) ...I think those should all either be "0+" or the non-negative versions of themselves (if you see what I mean). Dec 10, 2018: ------------- Actor recordings: if we get a fus format for ranges of frames, and a half-decent tool for stepping through a recording (e.g. if player->keymap >= 0 then the arrow keys control their recording, maybe left/right is forward/back a frame, up/down jumps to start/end, action pauses/unpauses), then we could specify on which frames the given rules of an actor state should be run. Dec 17, 2018: ------------- Palette transitions which are intended to be "instantaneous" (e.g. if !game->smooth_scroll || game->reset_camera) actually lag behind camera pos by 1 frame. Sep 28, 2019: ------------- MAPPERS: These should be generic. Mapped and mappee should both be void*... And then have mapped_type and mappee_type, with some kind of enum whose values are PALETTE, RGRAPH, MAPPER, etc. Sep 29, 2019: ------------- Don't use raw strdup, malloc, etc -- make sure these things are gonna perror and exit() for you eh. Use more water?.. e.g. in dodecas area?.. Add swimming_rollers... or some kind of water creatures... Oct 3, 2019: ------------ COINS ARE FUN Let's make different kinds of collectibles... Little flies, berries, that kind of thing. And place them on the maps. Nov 2, 2019: ------------ * Slightly extend "big roller" section at bottom-right of dodecas, then point one of its doors at a new "gauntlet" worldmap * Extend spidertown, many "layers" connected by doors, eventually wilderness, on other side is another spider settlement (with houses like the broken ones found in wilderness) * Wilderness: actually non-random, please. Or anyway, non-random version. * Roller follows you if you're a roller. * Use this to collect the rollers in dodecas, getting them to... open a door?.. sacrifice them to the dodecas spiders?.. * If you go all the way up to spidertown as a roller, you can collect rollers up there, for some use or other. So we can hide rollers in various little out-of-the-way places which are currently unused. * If you're a spider and you go near these rollers, they could switch hiding-spots. Also we could stick some coins in some of these hiding spots. * Collecting coins does what? Make some nice "plants" with "berries", and make little "flies"... * Getting past the scary bird... gets you a powerup?.. frees the hermit?.. Nov 3, 2019: ------------ Trees: we have right-slanting trees... now also have left-slanting ones!.. E.g. one at bottom-right of current map. Need to go through the water area at top to come around down other side of the left-slanting tree. Trees: the tiny trangles at top should be leaves, so get them appropriate rgraphs. And maybe branches in a background layer. And also... decide why they exist, where they lead etc. Nov 7, 2019: ------------ water map: walled-in bubbles full of water, connected by tunnels?.. Giant rooms with suspended wall-less water bubbles?.. Inverted rooms filled with water but with suspended wall-less air bubbles?.. An enemy who swims faster than you, but you walk faster. So you need to "land" to escape, and "landing" often involves tricky sequences of jumping, doing some kind of turn while swimming, then landing again. Mar 29, 2020: ------------- * "Firefly" coins which fly around * "Fruit/flower" coins which grow on little plants Jun 15, 2020: ------------- Keep it simple... I want more places to play in Dodecas is probably my favourite, more like that plz. Mix hexas + bigtris, birds + bigrollers. Aug 4, 2020: ------------ * Beef up actors * Better tools for recordings * Ok, we can now get a data dump with list_body. Cool! * How might we go about editing a recording?.. * NOTE: we already have a (self-proclaimedly "ganky") way to start an animation from an arbitrary frame... * body_restart_recording (which looks at body->rec.offset) * Can we turn that into a simple "step forward/backward" feature?.. * And mix that with... ability to scroll through the parts of recording's data (e.g. "+l", "w15") and edit them? * insert/delete/edit recording->nodes * WE DON'T WANT TO EDIT RAW DATA!!! We want to press keys, duhh. * So if you step backwards/forwards through the animation, you can record over it in any spot. * Yeah ok, but what if you want to record over one part and keep the next part?.. * Well that would only work if you ended up in the exact same spot. * So that probably only makes sense for animations which are already split up into actors. Aug 23, 2020: ------------- * MAKE AISPIDER CUSTOMIZABLE * "timid" variant, doesn't make big jumps, can therefore be confined to e.g. left part of spidertown... * The chance percentages could be int vars... * Separate chances for running vs "running off the edge"?.. Aug 23, 2020: ------------- * OMG birdplayer in jungle2.fus is amazing. You can run around & around the cave in the middle. * Add an area full of hexagons and birds. * Make it so when birdplayer is a bird, he's not crushed by birds. * Cheapo way to do it: when birdplayer is bird, he has no hitbox. So he neither crushes nor is crushed. * Future Ben says: modern way is to use a proc, e.g. on "crush": call: "crushed" ...and the "crushed" proc does whatever magic you want to change crushing behaviour based on whether you're a birdplayer or whatever. * Have this area eventually combine with big triangles area. * Is there a "big_trangleplayer"?.. :P * Finish up anim/bubblecar.fus!.. * jungle_aiplayer gets crushed by birds :'( * Add a special "invincible" thing to bodies?.. * (Currently just implicit when body->recording is playing...) Aug 29, 2020: ------------- * roller: after grab, stop until next "wentdown u"?.. Sep 1, 2020: ------------ * aiplayer jumps into walls & explodes sometimes. Not ideal. * after you pass big_roller in triangles world, he goes "crazed" and comes after you?.. * so we... have anim/_big_roller.fus and pass it an IS_CRAZED bool?.. :P Sep 5, 2020: ------------ * Spikeyplayer puzzle!.. there's one already (data/maps/trees/bubbles3-0.fus) where you become rollerplayer, then become spikeyplayer, then can get through a place with 4 deathrollers. If there's only 3 deathrollers, you can get through by waiting for a gap in them so you can safely jump across a little gap & escape. HOWEVER, even when there are 4, you can still escape if you spit at them and confuse them! So that could be used somewhere... * Roller movement: * While extended ("grabbing"), don't grab things on your long sides... that is, All 3 vertices are "sticky": + / \ (+)- + Only the "tip" vertex is "sticky": + - + / / (+)- + ...that still allows e.g. rolling over large gaps of this form: + . + . + Sep 12, 2020: ------------- Saw an aiplayer jump in from left, fly out top right, get stuck somewhere... The AI bug in action?!?! data/maps/wastes/start.fus /exit / enter + . . \ \ . . . + . + + - + + \ + ** Need a way to make actors invincible -- we've got that hardcoded thing with recordings, I want to replace that with an explicit thing, maybe can be set by a recording, but if so, needs to last once recording stops and actor takes over * We already have rec->reacts, is that all we need?.. but make it body->reacts?.. ** Render hexmap submaps' hexboxes for debugging purposes... * Instead of trying to render the outlines, we could e.g. render all tiles a solid colour while some button was held down?.. ** roller: still uses the old "turn" movement style while "u" is held??? (whlie "grabbing") Oct 11, 2020: ------------- * Extend trees worldmap at data/maps/trees/bubbles3-1.fus, going below-right, adding right-sloping tree. * Also: instead of trying to get this bubbles3-1.fus etc area "right", just copy-paste it a bunch (or make a bunch of similar things below it) -- remember why dodecas area is so fun!! Nov 21, 2020: ------------- * minieditor: F8 (reload) should *not* reset editor's properties?.. e.g. current rgraph. * ...but that might be hard, e.g. if you were looking at an rgraph who was dynamically generated (e.g. by a mapper being applied to something). At very least, we'd need to worry about rgraph's index changing, so we'd need to save its name, then reload, then look up that name again. Dec 10, 2020: ------------- Spidertown: current one is small -- "spider fort"? Anyway, the real one should be similar but composed of maany of those circular structures (see data/maps/test/map1.fus). But like... a whole field of them. Randomize it? Enhance collmaptool (or add hexmaptool, submaptool)? Then we can use current random generation stuff, but then *save* the results, and edit them by hand. Hand-curate, if you will. Dec 11, 2020: ------------- LOOK FURTHER INTO EMSCRIPTEN!!! It actually seems to work really well. But how can we e.g. stop window from scrolling when player hits arrow keys?.. And can we map the F* keys to something else?.. The big_roller who guards the entrance to maps/triangles tends to camp on the door. :P Dec 21, 2020: ------------- TINY GIF WRITERS!!! Get yourself some viiiiideoooo https://github.com/nothings/single_file_libs#images * https://github.com/charlietangora/gif-h * https://www.jonolick.com/home/gif-writer Some kind of hexcollmap transformations... similar to mappers for rgraphs: "double": unit: 2 0 0 0 entries: : vert -> collmap: ;; (+) : edge -> collmap: ;; (.)- + - . : face -> collmap: ;; . ;; * ;; . - . ;; *\*/* ;; (.) . . ...can we also map tile_c or whatever?.. the "colours"?.. Maybe: entries: : vert -> collmap: ;; (+) tiles: : "0" -> "1" ...etc... ...? * collmaptool has --rot but no --flip!.. add it plz! Dec 25, 2020: ------------- * A system for changing the tile_c of entire swaths of tiles in a hexcollmap at the same time. * (other than "tilebuckets") * So, continue to create hexcollmaps as we do now, based on how they'll affect collisions... ...but have an easy way to add variety and colour to portions of the map, *independent* of its "shape" (collisionarily speaking). * Present the game as a series of puzzles, similar to tutorial * Overlay that sequence with an open world, totally unexplained, like current demo map * Some interaction between the "two games" (puzzler and open exploration) * E.g. a switch is part of a simple puzzle, but also opens a door in the open world * Or turning into a rollerplayer in open world, using that to blow past a numer of puzzles * Add a door_t property like "noscroll" so camera jumps along with your body! Dec 26, 2020: ------------- * As well as "on" events, add an "always" handler which runs every frame? * Use for things like e.g. affecting the "lighting" (palette) based on distance from camera?.. * Use for things like heat, thirst, etc?.. Dec 30, 2020: ------------- * Currently in test_app_game.c we check if (body->out_of_bounds && !body->state->flying), and display the "You jumped off the map!" message. Instead, maybe add a new value for body->dead?.. (currently there is MOSTLY_DEAD and ALL_DEAD, maybe we want OUT_OF_BOUNDS) Mar 20, 2021: ------------- * When actor dies (or flies off map), should respawn itself after a second or two. (E.g. coin beasts killing themselves by running into walls :P) * player_t has these fields: hexgame_savelocation_t respawn_location; hexgame_savelocation_t safe_location; ...we could maybe move safe_location from player to body?.. ...or we could move {respawn,safe}_location into a new struct, and player & actor can both have one of these structs?.. ...or we could use actor->trf as the place to "reset" an actor to, when body_is_done_for(actor->body). => THIS PROBABLY MAKES THE MOST SENSE. * Add a "gamma" setting or something, so that palette colours are brighter by default. Aug 31, 2021: ------------- * finish tutorial. [*] other tilesets (e.g. wavy fronds of water tileset, and spiky grass of earth, don't hurt you...) [*] other creatures [*] switches [ ] transformations [ ] swimming (?.. or leave it a secret?..) * Where do you go after it?.. * demo. * The new camera scrolling doesn't work so well for certain areas (e.g. zoomed-in portions around jungle5) -- either "fix" those areas (by zooming them out a bit) or allow them to opt into the old scrolling behaviour?.. (or is that behaviour always broken if you fly?..) Oct 2, 2021: ------------ * The current end of water area: this is where the door in hermit's house leads. * He unlocks one side, you unlock the other -- that is, he causes the door to be opened, and you need to travel through water area the regular way to hit a switch, removing some stuff blocking the door. * Add some kind of water animal which chases spiders. * It's slow enough that you can get away, and/or shooting it makes it pause for a second. * Right side of data/maps/demo/jungle5.fus: flierplayer can get trapped in a circle if he flies+lands in from the top-right of the circle O_o * Add rollers to the first water you see in trees area, and to water at start of water area, so players hopefully see it's possible to enter the water. * Water area: bubbles whose contents can be air or water, depending on a switch * You can already shoot while swimming, so the idea will be to swim around and hit switches, positioning yourself so that you land properly when the water you're in turns to air. * SAVEPOINT/DOOR COLLISION: It's weird because they are only this: . * . . ...but they look like they're this: . . *\*/* . - + - . */*\* . . ...this can be weird when a door/savepoint looks like it's "on the ceiling". Then you can't get into it if you're crouching on the ceiling. NOTE: this is fixed if you use anim/door.fus instead of 'D' tiles!.. The anim door is vastly superior in every way. TODO: get rid of 'D' tiles... * VISUAL CLUE SHOWING YOUR SPAWN LOCATION * (At least, showing last-touched savepoint) * You're leading another spider somewhere. At one point you go ahead, other spider waits behind. You come upon an eye, and a switch. The eye says "pssst!". When you hit the switch, eye closes, and other spider comes up. So it's as if... the eyes only open for you, and "hide" by staying closed when other spiders are around. Oct 6, 2021: ------------ MEMORY SAVING MEASURES: * Cache all hexcollmaps by filename + rot * Add properties to "shapes" (the fus structures which are turned into rendergraphs) indicating whether their bitmaps should be cached * See prend->cache_bitmaps (and play with "bin/demo --dont_cache_bitmaps") * Currently runs afoul of out-of-bound check in surface8_get_pixel_ptr, but that only issues a warning... maybe we should just remove the warning? * Also messes up... something... about rendering. prismelmapper->solid, maybe?.. * Collmap parser should "trim" empty space around edge of collmap (E.g. as left by "."s) * Add things spiders can roll?.. * In dodecas area, spiders can be hunting (spitting at some animals till they turn to rollable "food"), or collecting rollable whatevers... and somehow these are transported up to spidertown? * dodecas area: the spiders here should use an "ai" actor which knows how to stay safe from the hexrollers... in particular, this actor should know how to stay inside the dodeca shapes. * Maybe... this actor can use spikey spiders?.. Feels kind of like cheating, but otherwise we need a way for the actor to distinguish the safe and unsafe areas. Nov 3, 2021: ------------ * Sound! Read the ALSA docs: https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#gabc748a500743713eafa960c7d104ca6f ...each function lists example .c files which use it!.. ...from this guy's post on TIGSource: https://forums.tigsource.com/index.php?topic=1733.msg1432473#msg1432473 Dec 13, 2021: ------------- * coinlike things should know how to remove themselves when their key becomes F (or antikey becomes T)?.. * Need this for when mapvar("eyeplayer_vines_ran_away_4") becomes T, then mini_eye should disappear Dec 14, 2021: ------------- Concerning turning into non-spider things, e.g. rollers... That's not gonna interact well with e.g. myvars("carrying"), eh? So we either need to call a certain proc when transforming, or... uh... do something else. => Maybe... switch bodies? => UPDATE: there are now "onstatesetchange" procs. Maaaaybe that could be a solution. Jan 7, 2022: ------------ * Remove hexmap_door_t (and the magic 'D' tile) How many 'D' tile doors are there to replace? $ ack -l '[ /\\]D[ /\\]' data/maps/ | wc -l 10 ...not too bad. :O To find more: $ nano $(ack -l '[ /\\]D[ /\\]' data/maps/ | head -n 1) Jan 27, 2022: ------------- * Change "nosave" to "save" (so, don't save variables by default...) * For "Roll into a corner" in anim/_spider_crawl.fus, need a different anim than "crawl_step" * We need an anim that makes it look like you're rotating in place, not like... teleporting backwards & then stepping forwards. You know? * Make a real "turn" anim for spider (instead of just reusing "step") Jan 30, 2022: ------------- maps/bridges/start.fus: * Coins appearing one at a time as you collect them (somewhat like start of tutorial2), teaching you how to get around by following the "bridges" * Leave "bridges" behind you when you successfully jump??? * To show player what the bridges are supposed to represent Backgrounds: * Add more bg submaps, so the grid can be seen. See jungle5_bg.fus for inspiration... Silkspider: * You pick up little white balls of silk. Each one adds to your silk timer. While you have silk, when jumping, you leave silk behind. Silk eventually disappears. (Rollers roll on it?.. or some other creature?.. which can fly away when it disappears?..) The silk timer counts down... always?.. or just while jumping (each frame you "use" silk)?.. Feb 8, 2022: ------------ * Editor should attempt to switch screens or something... currently when it "clears" the screen, really that just adds a bunch of newlines. So after exiting the editor, you can scroll up and see every "frame" it ever rendered. * Factor out some stuff in hexcollmap.c to properly define the "space" of coordinates into collmap->tiles. This "space" is sometimes referred to as "tile coords"?.. E.g. in hexcollmap_collide_elem, a comment says: /* And now, because we were fools and defined */ /* the tile coords such that their Y is flipped */ /* compared to vecspaces, we need to flip that Y */ /* before calling trf_apply and then flip it back */ /* again: */ index.add[1] = -index.add[1]; ...and in hexcollmap.c there are some trf_t instances which represent coords in vecspace, others coords in... "tile space", as it were. Can we make vecspace_to_tilespace and vice versa?.. Should we?.. If not, how do we make it all clear?.. currently it's too confusing. Jul 1, 2022: ------------ Need a better way to debug recordings, hitboxes. * Need a way to start playing a recording, step through frame by frame, then take control at some point and start overwriting the rest of the recording. * set player->body to recording's body * Currently, recordings have 1 keyframe (followed by playback data). * Could we allow multiple keyframes? And then it would be very easy to have a tool for cutting & splicing recordings together?.. * For creating "actors" with multiple recordings: want to make 1 long recording, then automatically split it into multiple recordings and put conditionals between them... ======================================== Regarding this: * F9/F10: need a way to set the filename used by these * commandline option * console command Currently, we have these 2 functions (methods of test_app) for getting recording filenames: * test_app_get_save_recording_filename (used when recording with F9) * test_app_get_load_recording_filename (used when replying with F10) We could add two new fields to test_app: * save_recording_filename * load_recording_filename ...usually they are NULL, and so the current "recs/xxx.fus" template thing is used. But we could say, *if* they are non-NULL, then use them instead. And also, once you've recorded to save_recording_filename, it's set to NULL, so you don't accidentally overwrite it afterwards. ^ OKAY! We did that. Now the issue is that when you F9, it stops your F10. And I think really, the issue here is that body->recording has an "action" (i.e. a state) which can be PLAY or RECORD, when really we want separate body->playing_recording and body->recording_recording. As it were. typedef struct recording { int action; /* enum recording_action */ bool reacts; bool loop; bool resets_position; /* default: true, if false, looping doesn't reset body's position */ const char *stateset_name; const char *state_name; hexgame_location_t loc0; keyinfo_t keyinfo; ARRAY_DECL(struct recording_node, nodes) int frame_i; int node_i; int wait; const char *filename; FILE *file; int offset; /* Weakrefs: */ struct body *body; } recording_t; ^ Most of that isn't actually used when we start a new recording (which happens in body_start_recording). We call recording_reset, and then manually write some stuff to a file: anim: body->stateset->filename state: body->state->name pos: body->loc.pos rot: body->loc.rot turn: body->loc.turn keys: body->keyinfo.{is,was,went}down[i in KEYINFO_KEYS] data: ... ...so I don't think we really even need to use body->recording when we're recording... where all is it used? In body_key{down,up}, we do: if(body->recording.action == RECORDING_ACTION_RECORD){ body_record_keydown(body, key_i); } Of course F9, F10 check whether body->recording.action == RECORDING_ACTION_RECORD to decide what to do. recording_step does this: }else if(rec_action == RECORDING_ACTION_RECORD){ /* record */ recording->wait++; } ...so recording->wait is used when recording... body_start_recording does this: recording_reset(&body->recording); body->recording.action = RECORDING_ACTION_RECORD; body->recording.filename = filename; body->recording.file = f; ...so that's basically it, eh? We need to store the file we write to, maybe the filename, and the "wait" counter. Jul 2, 2022: ------------ tutorial2's start3b needs to be easier. * Could turn people into spikeyspider * But then we need to teach them how that works first * Could have a "weak" hexroller, which just stuns you or something?.. Jul 3, 2022: ------------ * "@", "=", "o": these don't affect rendergraph's bounds???? ...so they can end up wrapping around the rgraph... ===> IMPORTANT! BUG! FIXME! Oct 9, 2022: ------------ When you record (with F9) it doesn't add your body's vars to the recording. When you touch a death roller who's stuck in one place, and you're a spikey spider, you get stuck there in your shielding animation forever! Jan 1, 2023: ------------ There should be an eye which comes out as some kind of eye-worm. O_o There should be eyes which grab death rollers and hold them for you. The rendergraphs generated from submaps should have a "nocache" bool set, causing their bitmaps to never be cached?.. => MAYBE NOT! I tried adding rgraph->cache_bitmaps, which is true by default, but false for submaps' rgraphs. And it actually seemed to cause my laptop to make little quiet clickly noises, like it had to think a bit harder in order to render everything... => TODO: FIGURE OUT HOW TO PROFILE ANYTHING All cached bitmaps should be forgotten whenever the map changes! ...detecting when the map changes would have to be done, like, with a game->cur_map or something... errr camera->cur_map?.. hmmm anyway. Sep 10, 2023: ------------- Owls & mice. Owls are huge; mice are same width as spider (in the sense of tunnel width... but they may be longer than spider). OH DEAR! Apparently a spider can jump from the left here, and land with just his front foot on the vertex indicated with "^"! -> * + - + ^ Sep 13, 2023: ------------- It's now possible (with "visible") to stand on some ground, jump off it, then have the gound disappear; so that if you hit something ("maybe_dead"), and then press "u" to go back onto the ground, you will appear in midair and repeatedly jump to your doom. Maybe that's okay?.. because you can still press "1". Or we could try to detect it, and have "u" do the same thing as "1". Jan 2, 2024: ------------ MUSIC!!!!!!!!!!!!! Bytebeats. Hell yeah. The way audio works is: * When initializing SDL, we hand SDL_OpenAudioDevice "desired" and "actual" SDL_AudioSpec structs. * Our desired one will be 1 channel, 8000 Hz, AUDIO_U8, etc. * The desired spec includes a callback function and some "user data" for it. Our user data should be some stuff which depends on current camera? The song (the bytebeat program) is set by... the map? But we pass it the submap, and submaps can turn on or off different parts of the map's music. Somehow. (I guess the submap .fus files can have "audio vars"?.. which are set per submap, and inherited like text etc?..) Anyway the userdata includes a snapshot of current map's vars, the submap "audio vars", and anything else which might be useful. (Can we include, like, distance from dangerous things?.. how would we detect what's dangerous or not?.. anything with a hitbox?.. naahhhh...) (Can we have a noise for jumping?.. maybe anims can have "audio vars"?.. but jumping is more of an event -- can we have "audio events"?.. what would those look like, a queue?.. or maybe just booleans, when each boolean is set by the anim, at the end of the hexgame's step function it notifies audio callback somehow, then resets the boolean to false...) The audio callback runs in a different thread, or something; so the userdata shouldn't include live pointers to game data. It should have copies/snapshots of stuff. And we should use a SDL_LockAudioDevice/SDL_UnlockAudioDevice pair while updating the userdata (which can happen each frame). How many different sample rates do we need to support? Looking at the dropdown on https://dollchan.net/bytebeat, there are preset entries for: * 8000 * 11025 * 16000 * 22050 * 32000 * 44100 * 48000 Soooo... we could try and do fancy math for all that... Or we could try to use SDL_AudioStream to do conversion for us?.. See: https://wiki.libsdl.org/SDL2/Tutorials-AudioStream Or we could just 100% standardize on 8000 Hz for now. Wheee! === TODO: vars_get_or_add is using strdup to copy the key. So, vars own their keys?!?! Preposterous! Give them a stringstore for goodness' sake. Feb 3, 2024: ------------ TOWARDS A HEXCOLLMAP EDITOR: Compare these: $ cat data/maps/demo/start2.fus $ bin/collmaptool -d data/maps/demo/start2.fus ...the latter is missing the vars here: parts: "h": recording "data/recs/hotspot.fus" vars: "key": "guide_passed_start" ...so make sure those are supported correctly. Also add support for '!' and '?'. So anyway, once we're able to read & write the text format for hexcollmap, then we can make a visual editor for it. Or do we want to implement a binary format?.. hmmmmmm naaaaaahh. Because then we'll have to make sure it's backwards compatible and all kinds of stuff, it's going to become a time suck. And harder to debug. Easier to just maintain a single human-readable text format. Anyway, we've already started adding an editor! Use `-E` with collmaptool: $ bin/collmaptool -E data/maps/demo/start.fus Mar 30, 2024: ------------- Currently, the way spider's label values are determined is pretty insane. In anim/_spider.fus, there is a proc "update_vars" which is marked `onstatesetchange` and is also called by doors when you touch them. This proc twiddles some vars which were marked `label`, which on the C side of things (via body->vars->callback) causes them to be matched up to body's labels. It's a goddamn mess, is what it is. What if we could move the logic in "update_vars" from anim/_spider.fus into data/_spider.fus?.. i.e. into the prismelrenderer and its shapes?.. Errrrmmmmm but I guess that would mess up our whole "cache bitmaps on shapes" approach. Omfg. Never mind. O_o