00:00:03 <04d​racoomega> There's also some changes I admit I don't really understand the point of, like replacing C++ you.duration[DUR_DRAGON_CALL] = (15 + div_rand_round(pow, 5) + random2(15)) * BASELINE_DELAY; with C++ int duration = 15 + div_rand_round(pow, 5); // force a sequence point between random calls duration += random2(15); duration *= BASELINE_DELAY; you.duration[DUR_DRAGON_CALL] = 00:00:03 duration; Can someone with perhaps more technical knowledge than me explain how forcing an order of evaluation here could ever matter? 02:27:01 <06m​umra> I definitely think it might be something to do with what you said in a previous comment, that the values are not getting sent because the game doesn't think it needs to because it doesn't think they have changed 02:27:17 <06m​umra> To make data transfer efficient only the changed fields of map cell are transmitted 02:27:38 <06m​umra> However there should be an initial "send everything" that sends all the initial state when the game first loads 02:38:35 <06m​umra> So this should fix it, tileweb.cc in _send_cell: c if (current_sc.flash_colour != next_sc.flash_colour) json_write_int("flc", next_sc.flash_colour); if (current_sc.flash_alpha != next_sc.flash_alpha) json_write_int("fla", next_sc.flash_alpha); If we add a force_full check in those cases: c if (force_full || current_sc.flash_colour != next_sc.flash_colour) json_write_int("flc", next_sc.flash_colour); 02:38:36 if (force_full || current_sc.flash_alpha != next_sc.flash_alpha) json_write_int("fla", next_sc.flash_alpha); Then the initial values will always be sent when the game starts, a new spectator joins etc 02:41:06 <06m​umra> Alternately, fla and flc should just be initialised to 0 on the client side, since the undefined can only be there from an uninitialised value 02:41:45 <06m​umra> But there's no clear place where those are initialised (TypeScript would help here A LOT but that's for another day!) 03:08:55 <06m​umra> Ah ok ... the cell gets initialised here in js: 03:08:56 <06m​umra> https://cdn.discordapp.com/attachments/747522859361894521/1257276745711751258/image.png?ex=6683d1b7&is=66828037&hm=763a1fafc23cd856a84ad232d6fe287dce28cd5c4d44a7c335e438d59472f012& 03:09:10 <06m​umra> in map_knowledge.js 03:11:22 <06m​umra> So updating line 27 there to js val = {x: x, y: y, fla: 0, flc: 0}; Should also ensure those fields are initialised correctly (without having to transfer any extra data) 03:32:57 Experimental (bcrawl) branch on underhound.eu updated to: 0.23-a0-5208-geafff8c3b6 05:25:28 Unstable branch on crawl.akrasiac.org updated to: 0.32-a0-1637-gcffdeba (34) 06:43:18 <05i​coson> order of evaluation for function calls in c++ is undefined, the first code block is just outright wrong if you want deterministic randomness 06:43:23 <05i​coson> that's what a "sequence point" is 06:43:49 <05i​coson> most gameplay code hasn't been audited for this however 06:44:21 <05i​coson> %git cdddf7c89e99 06:44:22 <04C​erebot> advil * 0.24-a0-2-gcdddf7c89e: Sequence many, many random calls whose order was undefined (5 years ago, 32 files, 412+ 145-) https://github.com/crawl/crawl/commit/cdddf7c89e99 06:44:44 <05i​coson> I wrote docs about this which you can see in that commit 06:45:40 <05i​coson> https://github.com/crawl/crawl/blob/master/crawl-ref/docs/develop/rng_guidelines.md 06:46:27 <05i​coson> (though it doesn't really need all the steps broken out, just the two random calls need a sequence point between them) 06:51:26 <05i​coson> on the overall PR, yeah there appears to be a ton of code duplication (or at least near duplication) that doesn't seem ideal 07:01:37 <05i​coson> I can see some easy improvements, like mpr("There is no available space!"); would be used enough it should get a canned_msg, and the output parameter bool is not my favorite design (if there has to be an output param, the coord would be better, but I think this could be done with just coord returns). But I'm inclined to think a bigger refactor to eliminate more of the repeated logic would be better 07:06:31 <05i​coson> better direct link for this issue: https://github.com/crawl/crawl/blob/master/crawl-ref/docs/develop/rng_guidelines.md#31-random-call-evaluation-order 08:01:04 03dolorous02 07* 0.32-a0-1638-gc0d58c9ec9: Properly check if the player has hair. 10(18 minutes ago, 3 files, 20+ 1-) 13https://github.com/crawl/crawl/commit/c0d58c9ec99c 09:23:25 <04d​racoomega> I thought that map generation ran on its own RNG where this was more carefully applied, and outside of that it didn't really matter? We don't have replays that depend on a specific sequence of actions having predictably exact results everytime or everywhere, and there are so many different random calls for most every action that even the tiniest deviation in what a player does would already result in different RNG results. 09:31:36 <09g​ammafunk> well, it would be great if performing the same actions did result in the same outcomes (for the gameplay rng) 09:38:44 <04d​racoomega> Would it? Like, does it actually really matter to anything outside of, say, reproducing specific exact behavior by bots, I suppose. (More realistically, isn't there like... a countless number of places already that break this and are probably not even practical to track down? I feel like undefined orders of random calls are literally everywhere in the codebase.) 09:47:03 <03s​emi_tonal> it would also be useful for e.g. bug repro purposes, presumably? seems like a good thing to gradually aim for even if we very much don't do it consistently at the moment (I remember reading this doc but i doubt i've always remembered to apply it since) 10:40:04 Heavenly storm still looks like a cloud of bis-(2-chloroethyl)sulfide aka mustard gas 10:43:14 <13q​wqwqwqwqwqwqw> from my perspective the thing that would be most useful is eliminating sources of seed instability on a single device (since that helps with working with bots a decent amount) 10:43:36 <13q​wqwqwqwqwqwqw> not sure exactly what the practical concerns are for trying to eliminate sources of seed instability across multiple devices 10:45:03 <13q​wqwqwqwqwqwqw> my understanding from the nice docs that advil wrote (and linked earlier) is that instances of adding the results of two calls to the rng as in the example above are a problem for the latter but probably not the former 11:18:59 03dolorous02 07* 0.32-a0-1639-g5f993c34c6: Fix desc of death-form arms for boneless species. 10(3 minutes ago, 1 file, 6+ 1-) 13https://github.com/crawl/crawl/commit/5f993c34c64c 12:00:06 <09g​ammafunk> To this end, advil has commented that we don't make guarantees about the gameplay rng. But I do think like kate/elliptic are saying, it's good to not add new sources of gameplay rng instability. Also, it's not just qw that this is useful for, but also lua tests (not to mention that an agent like qw can be good for testing) 12:00:36 <09g​ammafunk> elliptic has theorized that we only relatively recently broke the stability of the gameplay rng 12:00:58 <09g​ammafunk> because in his experience with qw in the past, outcomes were stable within a save if qw performed the same actions 12:01:18 <09g​ammafunk> which does suggest that we might get (back) to gameplay rng stability at some point 12:46:55 <05i​coson> yes, imo having replicability for gameplay is better than not, but at the time I did the seeding work getting gameplay to work too was not in scope 12:48:39 <05i​coson> in principle there are no guarantees about call order for those cases on the same device either, but I'm not aware of that ever mattering in practice (all the cases like that I saw were essentially gcc vs clang). But, it would be nice for qw to have deterministic behavior across devices! 12:49:09 <05i​coson> ultimate (impossible) dream would be replay via seed + action sequence 12:50:18 <05i​coson> anyways, I don't think it is wrong to fix cases of unspecified random call order 13:13:29 -!- The topic of #crawl-dev is: Crawl Development | https://github.com/crawl/crawl | Logs: http://s-z.org/crawl-dev/, temporarily http://crawl.akrasiac.org/logs/cheibriados/ | People with +v have commit access, devs on bridged discord as well | General Crawl-related chat to #crawl | Long stuff to a pastebin service, please 13:13:29 -!- The topic of #crawl is: Play Dungeon Crawl Stone Soup online now! Type ??online for instructions, ??lg / !lg for play stats | PM Sequell for long queries | http://crawl.develz.org | FooTV game replays: ??footv for instructions | #crawl-dev for dev discussion, #crawl-offtopic for offtopic 13:25:18 <13q​wqwqwqwqwqwqw> that ultimate dream (of replays of regular human games) would certainly be very cool! I'm actually curious now how far off we would be from that if we had full rng stability 13:26:36 <13q​wqwqwqwqwqwqw> I assume one issue is that there are a bunch of different ways the game gets player input and they aren't all handled by the same CMD_WAIT etc framework? 13:28:26 <13q​wqwqwqwqwqwqw> would also be issues with save transfers of course, but maybe just assume for now that the binary doesn't change between playing and trying to replay 15:13:13 03dolorous02 07* 0.32-a0-1640-g61c9020154: Indicate whether forms have hair. 10(10 minutes ago, 4 files, 48+ 4-) 13https://github.com/crawl/crawl/commit/61c902015470 15:13:13 03dolorous02 07* 0.32-a0-1641-gab78b9c92e: Rename function to match associated variable. 10(6 minutes ago, 6 files, 8+ 8-) 13https://github.com/crawl/crawl/commit/ab78b9c92e34 15:30:27 03dolorous02 07* 0.32-a0-1642-g23c4013377: Indicate whether forms have bones. 10(2 minutes ago, 8 files, 56+ 25-) 13https://github.com/crawl/crawl/commit/23c40133775a 15:38:24 Unstable branch on underhound.eu updated to: 0.32-a0-1639-g5f993c34c6 (34) 16:28:17 03dolorous02 07* 0.32-a0-1643-g611ce37909: Indicate whether species/forms have feet. 10(21 minutes ago, 14 files, 64+ 32-) 13https://github.com/crawl/crawl/commit/611ce379095e 18:16:27 <06d​olorous_84348> Incidentally, I've set it so that bat form has feet. According to what I've been able to find out, a few rare species of bats can walk on the ground, and, if you're in bat form, you're a magical bat anyway. So hair, bones, and feet are now accounted for on both the species and transformation sides of things. (Maybe they should be moved to the player class, so that e.g. player_has_feet() would be player::has_feet(), but I'm not 18:16:27 sure why there's a distinction between the two in this case.) Other stuff like eyes and ears, as regret-index's comment brought up, should be easier to add via similar means. 18:18:13 <06d​olorous_84348> I looked at form_can_bleed(), too, and I wonder whether it would be set up better as a NO_BLOOD species flag instead, since the code currently assumes that bloodlessness is limited to nonliving and certain types of undead. But I think I've overhauled enough today. 18:20:50 <06d​olorous_84348> As for making tentacles no longer assume a lack of feet, maybe that would be helpful on the Makhleb mutation front, if they can mutate you into a tentacled abomination that still, somehow, has feet 🙂 19:00:01 <02M​onkooky> D&D 3.5 has a spell, Fins to Feet and every time I think about that spell I get a whole new disturbing mental image and now I'm also gonna have the image of an octopode with human feet to cope with 19:44:37 all 4 aux slots filled with boots like a poltergeist 19:49:12 <06d​olorous_84348> And just imagine if they could do cartwheels 🙂 19:49:46 <06d​olorous_84348> Although with no hands (gloves?), would it be just rolling over instead? 19:50:54 <04d​racoomega> A poltergeist who has picked up some kind of elaborate metal tubing-based weapon: https://legendary-digital-network-assets.s3.amazonaws.com/wp-content/uploads/2019/10/13081259/Shoe-Bike-Feature-Image-10012019.jpg 22:35:33 Unstable branch on crawl.develz.org updated to: 0.32-a0-1643-g611ce37909 (34) 22:58:59 Windows builds of master branch on crawl.develz.org updated to: 0.32-a0-1643-g611ce37909 23:31:18 Unstable branch on cbro.berotato.org updated to: 0.32-a0-1643-g611ce37909 (34) 23:55:35 Monster database of master branch on crawl.develz.org updated to: 0.32-a0-1643-g611ce37909