EDuke32 2.0 and Polymer! "talk about the wonders of EDuke32 and the new renderer"
#4316 Posted 18 February 2014 - 09:56 AM
That said, we could likely leverage rotatespritea's alpha member, or if we want to avoid a mess, create a rotatespriteb command that has .blend instead of .alpha. On the other hand, screentext would need a new command too which would be sad.
Maybe negative inputs for <alpha> use blending tables instead? A new orientation bit?
#4317 Posted 19 February 2014 - 03:37 AM
I have some sprites in a (thin) rotating sector, and gradually over time the sprite positions are being offset tangential to the path, which isn't practical for a map of course. Dndebug reveals the sprites have definitely moved from their original position and are outside their original sectors. A test map can be provided if necessary (I'd have to make it from scratch but shouldn't take long).
This post has been edited by Micky C: 19 February 2014 - 03:37 AM
#4319 Posted 19 February 2014 - 08:27 AM
Nukey, on 16 February 2014 - 07:56 PM, said:
2] old animation definitions remain active with the new tiles. There doesn't seem to be a way to wipe old animation info. New textures with new animation definitions work fine, but a newly defined (unanimated) texture that happens to land on an old animated texture number will inherit the same animation properties.
dummytile <tile> 65536 65536
animtilerange <tile1> <tile2> 0 0
Hackish, but it does the job...
#4321 Posted 19 February 2014 - 12:12 PM
James, on 18 February 2014 - 09:49 AM, said:
Ah yes, I forgot to propagate the blending table index to all rendering routines. Good catch, once again!
Hendricks266, on 18 February 2014 - 09:56 AM, said:
I'll add the suggestion of packing the blending table index into bits 9..16 of the alpha argument. That way, one won't need to branch on the rendering mode in the CON code if one wants both alpha and blend.
Micky C, on 19 February 2014 - 03:37 AM, said:
Sprite movement effected by rotating sectors is implemented by adding the corrensponding circular arc to its current position in each tic (using rotatepoint). It is expected that roundoff error accumulates when doing this repeatedly. The right way to rotate an object which must stay fixed with respect to the pivot is by saving its original relative position, and rotate that one each time. Passing bit 4 (unnamed, but you could e.g. "define ACTORTYPE_ROTFIXED 4") to useractor's first argument tells the game to do just this kind of rotation and assume that it will never move on its own.
#4322 Posted 19 February 2014 - 03:39 PM
#4323 Posted 20 February 2014 - 09:45 AM
// sprites with these statnums should be considered for fixing
#define ROTFIXSPR_STATNUMP(k) ((k)==STAT_DEFAULT || (k)==STAT_STANDABLE || (k)==STAT_FX || \
(k)==STAT_FALLER || (k)==STAT_LIGHT)
(As can be seen here, "destructible" flat sprites take on STAT_FALLER.)
The assumption here is that such sprites will never move in the x/y plane except by the rotating sector. This may be true when running the vanilla game, but it's a bit unsound when having custom CON code loaded: after all, any code could just come and move any other sprite. For this reason, I prefer having the user specify which actors will never move on their own explicitly.
Probably, what you want is some non-destructible spritework rotating without gradually shifting away, right? I guess it could be arranged that the current hard-coded behavior is augmented in some way (setting an xvel bit on the sprites? Setting some property on the SE?), but I like doing that only when there's no elegant scripting solution.
#4324 Posted 20 February 2014 - 12:58 PM
It's great to have multiple blend tables, maybe I could make benefit from it someday. Can they be implemented by direct editing of Palette.dat file?
Also I've got a little issue to report. I've noticed that since some (2013?) build the rotatesprite command aligns sprites to the top-left corner incorrectly (orientation flag 16): some sprites drawn on the screen are offset to the right by one pixel (actually half a texel) what just fucks up all the precise alignment of my HUD. Any hope to have this fixed?
#4325 Posted 20 February 2014 - 01:51 PM
Fox, on 19 February 2014 - 08:27 AM, said:
animtilerange <tile1> <tile2> 0 0
Hackish, but it does the job...
The first one worked, so thanks for that.
Unfortunately the second one doesn't seem to wipe the old animation definitions. When I try, say for the queen texture:
animtilerange 4740 4740 0 0
or any variation thereof, it doesn't stop her from animating. Maybe the queen isn't "animating" per se but is hard-coded to animate instead? I haven't looked much into it.
Not a big deal anyway, since Plagman reminded me that many picnums are going to have interfering code that can't be wiped so easily, but I figured I'd mention it.
#4326 Posted 20 February 2014 - 02:03 PM
#4328 Posted 21 February 2014 - 10:33 AM
#4329 Posted 21 February 2014 - 11:22 AM
#4331 Posted 21 February 2014 - 04:11 PM
Did you try the usual delete the textures and textures cache files to see if the problem goes away or persists?
This post has been edited by Mark.: 21 February 2014 - 04:12 PM
#4332 Posted 21 February 2014 - 04:36 PM
other option is to leave it at 2 and redelete the cache files every single time you run it
This post has been edited by DanM: 21 February 2014 - 04:37 PM
#4335 Posted 21 February 2014 - 11:52 PM
Helixhorned, on 20 February 2014 - 09:45 AM, said:
Yeah that's right. Although the map is for the AMC TC so there is custom code involved, but the sprite I'm using is just a regular sprite.
#4336 Posted 22 February 2014 - 12:01 AM
This post has been edited by DanM: 22 February 2014 - 12:02 AM
#4337 Posted 22 February 2014 - 12:15 AM
make VC_REV_CUSTOM="-Custom Awesome Build"
and, provided you are building from an active SVN or git-svn checkout, rev.h will automatically be filled like so:
EDuke32 2.0.0devel r4344-Custom Awesome Build (32-bit)
You can use the octal escape sequence "\040" to start with a space.
make VC_REV_CUSTOM="\040Mind the Gap"
EDuke32 2.0.0devel r4344 Mind the Gap (32-bit)
#4338 Posted 22 February 2014 - 01:07 AM
THANKYOU
Damn thats an awesome command so i modded the script made it keep 29 pal but with that command i can tweak up the perfect nighttime fog, and solves my npc problem
This post has been edited by DanM: 22 February 2014 - 01:08 AM
#4340 Posted 22 February 2014 - 03:28 AM
CraigFatman, on 20 February 2014 - 12:58 PM, said:
Yes, the additional blending tables can be packed after the main translucency table, using this format (in pseudo-C):
char magic[12] = "MoreBlendTab";
uint8_t numAdditionalBlendTabs;
struct {
uint8_t blendnum; // the .blend index
uint8_t blendTab[256][256];
} additionalBlendTabs[numAdditionalBlendTabs];
Quote
The current build displays the LNGA2 HUD like this for me:
There's the one-pixel vertical line between the 'bars' noticeable, but nothing that's offset by half a texel here (this is 1680x1050). Also, r3284 (which introduced -rotatesprite-no-widescreen) displays it the same.
Can you provide a small example demonstrating the issue? I created the following one:
onevent EVENT_DISPLAYREST
rotatesprite 0 105 262144 0 2834 0 2 272 0 0 xdim ydim // red dash
rotatesprite 0 0 1048576 0 2822 0 0 16 0 0 xdim ydim // big exclamation sign
endevent
which displays like this:
Passing -rotatesprite-no-widescreen makes the exclamation sign flush to the left border, as expected.
As you can see, screen display is pretty complex and depends on various "environmental" factors. So, an example differing between now and r3284 would be most helpful.
Nukey, on 20 February 2014 - 01:51 PM, said:
animtilerange 4740 4740 0 0
or any variation thereof, it doesn't stop her from animating. Maybe the queen isn't "animating" per se but is hard-coded to animate instead?
You have to distinguish between engine-side animation and game-side animations via actions. The former is defined from ART. Whenever you see something like "Fwd 15" in the status bar in tile selection mode in Mapster32 (e.g. tile 100, atomic health), that's engine-side animation. Actions are of course defined from CON. In the case of the Queen, here's what makes her animate, in GAME.CON:
action ABOSS4WALK 0 4 5 1 30 action ABOSS4DYING 40 9 1 1 20 action ABOSS4ABOUTTOSHOOT 20 1 5 1 40 action ABOSS4SHOOT 25 2 5 1 10 action ABOSS4LAYIT 50 3 5 1 120 action BOSS4FLINTCH 40 1 1 1 1 action ABOSS4DEAD 49
(Well, actually, these only define potential animations. Actually starting them is done with action. EDIT: the game-time command, that is.)
#4341 Posted 22 February 2014 - 03:36 AM
Fox, on 21 February 2014 - 10:33 AM, said:
James, on 21 February 2014 - 11:22 AM, said:
Accessing sound properties such as their flags is planned for Lunatic. For CON, that would amount to adding a new kind of structure, like "getsound[].xxx". I'm not interested in that.
DanM, on 22 February 2014 - 12:01 AM, said:
Is there an easy way to check out the recent DNE development build? (That is, using a version control system.) An example would help in any case.
DanM, on 22 February 2014 - 01:07 AM, said:
You're welcome, but please don't go on hurried mass-modification sprees whenever EDuke32 changes appear to have broken something in your mod, 'kay?
#4342 Posted 22 February 2014 - 03:48 AM
btw is there a way i can def the old duke model back in based on its pal so i can have my edf/cops back but still have the new player model
This post has been edited by DanM: 22 February 2014 - 04:06 AM
#4343 Posted 22 February 2014 - 04:08 AM
Hendricks266, on 22 February 2014 - 02:30 AM, said:
Hail to the King, baby!
Edit: I was wondering if it was also possible to make an extra option for the script, which takes what you've done on the floor (relative heights, textures, shades, slopes), and apply them to the ceiling of the same sectors, and vice versa? I have a feeling that might be more work, so if it's too much then that's ok.
This post has been edited by Mblackwell: 22 February 2014 - 06:22 AM
#4344 Posted 22 February 2014 - 11:32 AM
Micky C, on 21 February 2014 - 11:52 PM, said:
Now that I look at it again, 'normal' static sprites already should be rotation-fixed. STAT_DEFAULT is 0.
As far as other kinds of sprites such as cameras are concerned, I think I'll add a new event, EVENT_ROTFIXSPRITE, that will hook into premap.c:G_SetupRotfixedSprites(). If the camera had its own statnum, I guess I could add it to the list of rotation-fixed ones, but curiously it's changed to STAT_ACTOR on spawn even if there's no actor code for it in GAME.CON.
#4345 Posted 22 February 2014 - 01:45 PM
Helixhorned, on 22 February 2014 - 03:28 AM, said:
char magic[12] = "MoreBlendTab";
uint8_t numAdditionalBlendTabs;
struct {
uint8_t blendnum; // the .blend index
uint8_t blendTab[256][256];
} additionalBlendTabs[numAdditionalBlendTabs];
Glory hallelujah! But can we use this with rotatespritea command? I've put a multiplicative blend table for #1, and it works for sprites, but on-screen graphics behave strange. Doing "setactor[THISACTOR].blend 1" on EVENT_GAME makes all the HUD to use this blend mode too.
Helixhorned, on 22 February 2014 - 03:28 AM, said:
Well, I admit that it's apparently my fault, because LNGA2 works well for me too. Looks like I haven't done sufficient research. I guess I took a way too long break from modding. =) Actually the culprit is my subroutine which dynamically rescales and displaces the HUD graphics. So thanks anyway.

Help
Duke4.net
DNF #1
Duke 3D #1


