|
Post by ketmar on Aug 8, 2023 10:14:32 GMT -5
experimental: i implemented very simple "corpse on the ledge" fix. if corpse origin is not on the floor, the engine will add some velocity to the corpse, so it will eventually slide away. so no more cacos suspended in the air because hitbox corner touched the floor.
downside: the corpses sometimes slide quite far away, and sometimes it looks funny. yet i consider this a feature.
|
|
Lobo
Doomer
Posts: 594
Member is Online
|
Post by Lobo on Aug 8, 2023 13:50:11 GMT -5
lol you should see our sliding corpses: sometimes they even seem to jump at you
|
|
|
Post by ketmar on Aug 8, 2023 14:04:03 GMT -5
and with mine one can build perpetuum mobile. ;-) if there is not enough place to make mobj origin to rest at the floor, the corpse would never stop sliding.
we should combine our bugs features, i believe! ;-)
|
|
|
Post by ketmar on Aug 9, 2023 22:27:55 GMT -5
so far i am happy with sliding corpses. ;-) of course, everything looks absolutely unnatural, as it should be. i feel that proper physical solution is not only possible, but should be quite easy, but alas, i cannot force my brain to work. so we'll go with something that works most of the time. ;-)
applying gravity forces to all 4 corners is definitely not enough, and i could never understand how physics engines calculate torque force.
implementing PoC physics based on verlet integration would be interesting, tho. then ask Cheello to make corpse models without embedded blood pools, and have bodies rolling around, lol.
|
|
|
Post by ketmar on Aug 11, 2023 9:43:55 GMT -5
heh. at the end of the day i implemented school textbook physics algo to determine if a body is "stationary". if we collect all contact points, and then create convex hull with them, we can check if center of the mass is in that hull.
choosing sliding vector is still somewhat arbitrary. (i have to calculate torque forces on contact manifold, and use that, but meh… too much for me yet.) so sometimes bodies can slide into the support sector, not out of it (i.e. backwards). one day i'll fix that, but for now it looks funny, so i'll let it stay.
|
|
|
Post by camper on Aug 12, 2023 13:09:29 GMT -5
|
|
|
Post by ketmar on Aug 13, 2023 8:03:46 GMT -5
i don't know how it should work. i see nothing wrong with it after quck testing. please, be more specific with your reports: describe what you expected, what you got instead, and how to trigger the bug.
|
|
|
Post by camper on Aug 13, 2023 10:16:25 GMT -5
I tested the monster in gzdoom and k8vavoom (latest public build), in freedoom phase 1. I made a video for it. Video for gzdoom: streamable.com/iqnoiiVideo for k8vavoom: streamable.com/pxg1yhAs you can see, in gzdoom the monster is more mobile, his teleport jumps easily reach the player. In k8v, the monster is unable to make a long teleport jump to the player and is very melancholy.
|
|
|
Post by ketmar on Aug 14, 2023 1:34:40 GMT -5
it runs (i mean movement here) ok in my latest build. the only problem is that it teleports to the exactly same place where it was. ;-) anyway, i already made some tweaks in decorate compiler, and will make some more.
thank you for your report! i'll try to find out why it cannot properly teleport.
|
|
|
Post by ketmar on Aug 14, 2023 1:53:49 GMT -5
ohlol. the teleport code will DEFINITELY not work as it is written. it is using zero-duration states to call chasing code, and that is WRONG. the problem is that chasing code is allowed to run only once per tic (otherwise it could loop infinitely due to state jumps. it works in GZDoom because GZDoom is much less strict about bad code, but the code itself is invalid nevertheless.
i'll try to workaround it, tho, because i suppose that there are quite a number of such broken decorate out there.
|
|
|
Post by ketmar on Aug 14, 2023 2:05:30 GMT -5
ok, teleporting seems to work now too.
|
|
|
Post by camper on Aug 14, 2023 5:07:50 GMT -5
i'll try to workaround it, tho, because i suppose that there are quite a number of such broken decorate out there. It's good to know broken code because fixes like this encourage bugs. those. I still fix what I can, for example fixing the Tesla coil (there was an elementary well-known confusion between the spiral and the direct particle beam), or reverting the old code instead of the z-script
|
|
|
Post by camper on Aug 14, 2023 5:11:58 GMT -5
I still don't understand the complex logic of the decorate, "I'm not a magician, I'm just learning" like in a movie about Cinderella. Just such examples and communication help me understand what's what.
|
|
|
Post by ketmar on Aug 14, 2023 14:25:54 GMT -5
do not worry, nobody properly understand DECORATE. ;-) there are so many quirks there that the only way to write something complex and workable is to tweak it until it works. ;-) many DECORATE warts are never explained anywhere, you just have to know how the engine works internally.
anyway, don't be afraid to experiment and ask questions. just provide full info with them, so i could test the things without guessing what is wrong. ;-)
|
|
|
Post by ketmar on Aug 14, 2023 14:40:50 GMT -5
and btw. saved games are now in VWAD format too. ;-) if you think that i am little obsessed with my New Shiny Format… well, you are prolly right. but besides that, VWAD has a proper file hierarchy inside, so it will be much easier for me to modify or extend saves without huge compatibility problems.
you prolly never noticed it, but VSG save format changed many times. it wasn't designed as very extensible, so most of the time i had to find some byte i can set to invalid value, and use that to detect new features in saves. at the end of the day, VGS becomes a beast, full of hacks like "oh, check this byte, and that byte, and hope that they are wrong because they were used as extension flags".
of course, full conversion is not complete yet: the engine still writes huge lumps of non-extensible map data. but at least i can add new things as new files now, without resorting to ugly hacks.
and don't worry: your old saves still can be loaded (and the engine will use old save format for old saves, because of… eh, the code does it this way). i am not some AAA studio, so i cannot afford the luxury of breaking saved games with each new patch. ;-)
as a side effect, saved games will take slightly less memory now. the engine has to keep the last loaded save in memory, and it creates internal memory-only saves for wads with hubs. now we can avoid unpacking the whole save data before reading it: VWADs can be read with on-the-fly depacking.
in the future i will split monolithic map data to separate files too, and will optimise saved games even more.
the huge problem is that i don't want to make old saves unloadable. of course, it's not that important considering the small k8vavoom userbase, but hey, it's fun challenge!
anyway, to make code more maintenable, i have to split saving code (in several places i didn't touched yet) to separate functions. now, with proper virtual file system in place, it would be much easier to do.
|
|
|
Post by camper on Aug 15, 2023 13:02:23 GMT -5
VWAD sounds quite cryptic, I hope the next build will have instructions and recommendations for transforming from pk3 to VWAD. It will become clearer when I try it in practice. I'm still hesitating with the final structure of pk3 myself. I am waiting for the decision of the center and will hesitate with the "line of the Central Committee of the Party." On the one hand, the old package assembly logic is quite satisfactory, and on the other hand, I'm starting to think about building for individual types of resources and individual things: monsters, weapons, etc. So that each type of thing has a complete set from decorate to resources and be solid inside the package categories:
pk3--->{ |textures |flats |graphics |maps |music |things->{ |monsters |weapons |pickup |mapobject |etc->{ |sound |sptites |decorate
|
|
|
Post by ketmar on Aug 15, 2023 22:45:24 GMT -5
internal file structure of VWADs is the same as in pk3. it is a different container format, slightly better suited for random files access. for the modder, it doesn't matter, tho, you don't need to change your habits. just think of VWAD as "yet another archive format i have to deal with", instead of zip. ;-)
for creating vwads (and pk3s, by the way), i'd recommend to use k8vlumpy tool. it is used to create k8vavoom basepaks, for example, and to build Zan mod. it lacks documentation, of course, but that's where you can look at Zan mod sources, for example, to see how build scripts are written.
|
|
|
Post by ketmar on Aug 18, 2023 4:39:08 GMT -5
so sliding corpses code seems to work. it sometimes fun, but works. now i thrown it away, and rewrote almost completely, as usual. ;-) the new implementation does the same thing, but much, much faster. and it's not only faster, but the code is smaller and more clean.
it now clips only final convex hull against a bounding box, not each subsector. and avoids building convex hull when a body touches only one subsector (because subsectors are always convex, and on many maps this is actually the case). i also switched from gift wrapping algo to Andrew's monotone chain for convex hull building: the algo code is much smaller, and it has no problems with duplicate or collinear points.
the above optimisations doesn't matter much, tbh, because most corpses will be put to rest quite fast, and will never be checked again until their surrounding geometry changes. but PoC code smelled a lot. and besides that, it had a rare bug with collinear points, where hull builder could stuck in endless loop, eat all available memory, and crash.
also, "stability check" is now fast enough to drop mobj Z checking. i don't need to check if mobj origin is on the floor first, "stability checker" will do it for me anyway.
the corpse may be left hanging on a single isolated linedef, though. but this is mapping bug anyway, and BSP builder will get rid of most such lines (because subsectors must be valid convex polys), so i simply ignoring this rare situation. i.e. in the worst case a corpse will stay hanging, as it always did, but in majority of cases it will properly slide.
i also applied the same code to droppped pickups, so now you have to catch them fast if they dropped dangerously close to some cliff edge. it also has a better side effect: sometimes drops from monsters standing on a high pillar may slide away, and you'll be able to pick up items when they fell down. ;-)
|
|
|
Post by ketmar on Aug 18, 2023 4:56:42 GMT -5
p.s.: @dasho, don't you want to steal this code to EDGE Classic? ;-)
|
|
|
Post by camper on Aug 18, 2023 5:29:07 GMT -5
About vwad format. It's not supported by map editors and SLADE, is it? How will it be possible to connect the resources of their vwad file for editors?
|
|
|
Post by ketmar on Aug 18, 2023 6:13:58 GMT -5
simply speaking: you can't. i'm not expecting any editor to support the format, ever (and much less full support, with group tags). use vwads only for public releases, not for development. or spam editor authors with requests for support. ;-)
p.s.: but i will definitly add vwad support to my Eureka fork. i didn't want to add pk3 support, but vwads are much easier to work with.
nope, the fork is not ready for using yet (and will prolly never be). sorry.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Aug 18, 2023 10:36:18 GMT -5
p.s.: @dasho , don't you want to steal this code to EDGE Classic? ;-) The wacky corpse sliding? Lol, we had a similar issue when we were working on vertex slopes. I would kill something and it would slide up and down the mountains until it hit the other side of the map.
|
|
SilverMiner
You're trying to say you like DOS better than me, right?
Posts: 1,344
|
Post by SilverMiner on Aug 18, 2023 10:47:55 GMT -5
p.s.: @dasho , don't you want to steal this code to EDGE Classic? ;-) The wacky corpse sliding? Lol, we had a similar issue when we were working on vertex slopes. I would kill something and it would slide up and down the mountains until it hit the other side of the map. Sounds cool
|
|
|
Post by ketmar on Aug 18, 2023 11:29:49 GMT -5
The wacky corpse sliding? Lol, we had a similar issue when we were working on vertex slopes. I would kill something and it would slide up and down the mountains until it hit the other side of the map. sounds fun! actually, my current code will glitch if the body lies on "spiked land", where it has no room to rest. i have a timer, so the engine will stop trying after some time. yet for "normal" slopes which connected to flat sectors, body will unconditionally slide down the slope. also, i intentionally kept the original Doom "dead man walking upstairs" glitch, i think it is cool. which may lead to a body goes upstairs, find that there is no room for it, and then slide down the stairs. looks fun too. still, i think that sourceports should fix "hanging corpses" glitch. id definitely tried to do this with their corpse sliding code (it checks for dropoffs and keep sliding if there is any), so i believe that improving it is what Carmack would do if he got enough time and computational power.
|
|
DoomKrakken
Doomer
Aspiring game designer and programmer looking for work. https://ko-fi.com/DoomKrakken
Posts: 37
|
Post by DoomKrakken on Sept 13, 2023 14:32:26 GMT -5
Hello ketmar, I am DoomKrakken.
I have been making mods in the GZDoom Engine for over 9 years at this point.
A friend referred me to your engine after I challenged him to show me an engine that would allow me to recreate my mod, Embers Of Armageddon, without any compromises... though of course I'm hesitant to consider moving to a new engine. ZScript has been by far the largest Godsend to my modding experience thanks to its flexibility, but this friend assures me that the "VavoomC" language k8vavoom uses is just as good if not better than ZScript.
Needless to say, my curiosity is piqued...
Can you give me a comprehensive list of differences between VavoomC and ZScript and explain why one is better than the other? I may have other questions later on depending on how this goes.
|
|