EDuke32 2.0 and Polymer! "talk about the wonders of EDuke32 and the new renderer"
#4286 Posted 12 February 2014 - 01:14 PM
#4287 Posted 12 February 2014 - 02:34 PM
Hendricks266, on 11 February 2014 - 11:43 AM, said:
Well, then you'd either have to
* calculate the 128 blending tables at startup, which takes a couple of seconds even in the release build (it's 223 engine.nearcolor() calls, after all), or
* package the extended PALETTE.DAT as part of EDuke32.
Both options have their problems. The central one I see with hard-coding the functionality is that you take away resources from modders. With blending tables 0 + 1..128 taken, there are only 127 more left. What if a mod author wishes to implement 255 levels of blending, but using a different formula than the usual alpha translucency? Keeping the core functionality availble but giving modders its full potential seems to be most in line with the modding spirit of EDuke32.
Besides, when using .alpha, you already commit yourself to having custom scripting code. In that setting, having the few lines of additional code for the alpha -> blend+cstat translation is a non-issue.
Micky C, on 12 February 2014 - 03:51 AM, said:
Oops, riiiiiight. I omitted it from the Lunatic package earlier since I didn't want anyone creating map-text maps yet. Starting with r4330, the synthesis package contains Lunatic Mapster32, but without the ability to save TROR maps.
#4288 Posted 12 February 2014 - 03:23 PM
Helixhorned, on 12 February 2014 - 02:34 PM, said:
* calculate the 128 blending tables at startup, which takes a couple of seconds even in the release build (it's 223 engine.nearcolor() calls, after all), or
* package the extended PALETTE.DAT as part of EDuke32.
It would be completely independent of .blend. That way, users could define those any way they want and have the same range of functionality with 8-bit assets in all the renderers.
The how of it is undecided. I generally use the Wii as my worst-case scenario. 256 colors * 256 colors * 128 degrees of translucence = 8 MiB! That's not acceptable.
Since palettes only use 0-63 anyway, we could limit alpha to intervals of 4. 2 MiB isn't as bad, but it still requires more investigation.
Perhaps the transitions could use some form of RLE...
#4289 Posted 12 February 2014 - 03:36 PM
But can I request that the last day or two of posts in this thread be moved to the eduke32 thread? This thread has been seriously off-topic lately.
#4290 Posted 12 February 2014 - 04:13 PM
This post has been edited by Fox: 12 February 2014 - 04:15 PM
#4291 Posted 12 February 2014 - 09:35 PM
This post has been edited by Micky C: 12 February 2014 - 09:40 PM
#4292 Posted 12 February 2014 - 10:18 PM
- y-flip sprites
- move sprites to the ceiling ([Ctrl]+[PgUp])
- y-flip wall textures
- flip all walls' ceiling/floor alignment bits ([O])
- adjust the wall's y-panning accordingly
- swap floor and ceiling texture attributes
- adjust the relative floor and ceiling heights of all selected sectors that are smaller than the maximum z extent of all selected sectors (i.e. flip sector heights without moving the uppermost ceiling and lowermost floor)
I could probably throw in floor door <--> ceiling door for good measure.
Edit: Would you prefer the sectors to be mirrored or to be rotated 180 degrees? The latter would be harder and would likely require the sectors not to have any red lined-walls with unselected sectors.
This post has been edited by Hendricks266: 12 February 2014 - 10:27 PM
#4293 Posted 12 February 2014 - 10:27 PM
Although it won't move all sprites to the ceiling will it? Sprites should be the same distance from the ceiling when flipped as they are to the floor in the original if possible.
This post has been edited by Micky C: 12 February 2014 - 10:29 PM
#4294 Posted 12 February 2014 - 10:38 PM
Micky C, on 12 February 2014 - 10:27 PM, said:
Yes. final sprite z = final sprite [Ctrl]+[PgUp] z - (original sprite z - original sprite [Ctrl]+[PgDn] z).
#4295 Posted 13 February 2014 - 07:25 AM
Hendricks266, on 12 February 2014 - 03:23 PM, said:
It wouldn't be independent. You'd still have to decide on a precedence between .blend and .alpha in case both are non-zero then. I have a hard time understanding what would be gained by implementing 255-level alpha once more when it already can be achieved with a modest amount of hassle. Earlier, you conditionally compiled out the SPLITSCREEN_MOD_HACKS (which I'm fine with), but now you plan to go by the same pattern: hard-coding functionality that is better off being provided by the system in a general fashion.
What's more productive in my opinion is thinking about how to make the application of the alpha -> blend+cstat translation easier on the user. Right now, EVENT_ANIMATESPRITES is run only when spriteext[].flags (known as sprite[].mdflags from CON) has a certain bit set. That's annoying, since it forces one to write game-time code merely to enable a property of an actor tile. So, maybe it would make sense to add another of these SFLAG_* flags for that. In Lunatic, you can pass them directly to gameactor. (In CON, you can set a few of these flags using directives such as spritenopal).
Also, Lunatic has an experimental feature that allows you to define animation callbacks for a particular time separately (another kind of callback is planned, namely for an actor's initialization). It's currently undocumented because implementing it exposed inconsistencies between renderers in the way sprite animations are handled.
Quote
Any kind of up-front compression would only save memory in case most of the tables are never used at game time, since eventually they have to be decompressed -- at the latest before drawing a translucent object with a particular 'blend'. Think something like the periodically fading liztroop from my example code... Or is your intention to provide smooth alpha fading at the level of the line drawing primitives (tvlineasm* etc)?
#4296 Posted 15 February 2014 - 04:35 AM
Hendricks266, on 06 February 2014 - 11:45 AM, said:
1. demoting per-actor and per-player gamevars to global when it can be determined their per-actor/player status is unused
Are you planning to implement a CON code analysis framework? I think you're underestimating the effort a little...
A sufficient condition capturing the notion of "per-actor variable x is used in a temporary sense" is given is by the conjunction of the two following statements; for the purpose of this post I will call blocks like actor, onevent and eventloadactor collectively "procedures".
A. for each procedure, x is accessed at same index i throughout the procedure (but i may take on a different value each invocation of a procedure)
B. for each procedure, x is not live at entry to the procedure
The first point captures the "temporariness" of the usage of x: if x were accessed at different indices throughout the procedure, then it would in practice likely have some purpose besides its temp usage. Again, that's only a "reasonable assumption", not a certainty: e.g. if the only other access of x is a write to x[mod(i+1, MAXSPRITES)] and assuming that B still holds, that would not change its "temporary" character (since that write is useless), but x would get classified as "non-temp" by the analysis.
Point B makes sure that x is never used (i.e. read) in a procedure without having previously been assigned to -- if it were, then it could have been last assigned to in a procedure (a different one or the same), but at a different index!
The general outlook here is that static code analyses can only ever compute over-approximations of the real circumstances. The question when implementing a particular analysis then is whether the resources (run time, memory) gained by exploiting its results warrant the implementation effort (this is not even considering the resource requirements of the analysis itself). Also, if you want to use the results for code transformations, the analysis must be safe: there must be no false positives!
And this is only the conceptual side, not touching the aspect of how such data-flow analyses could sensibly implemented on top of the existing CON parsers.
#4297 Posted 15 February 2014 - 06:04 AM
#4298 Posted 15 February 2014 - 09:36 AM
Helixhorned, on 15 February 2014 - 04:35 AM, said:
I was thinking about it, but I think it would be wasted effort because of Lunatic and because network CON code would need manual changes anyway.
#4299 Posted 15 February 2014 - 06:08 PM
LeoD, on 15 February 2014 - 06:04 AM, said:
Same error on my side. But only with "Texture cache on Disk" set to "compress".
If set to "on" or "off" it works for me.
#4300 Posted 16 February 2014 - 12:25 AM
#4301 Posted 16 February 2014 - 04:45 AM
I'm experimenting with using voxels for level geometry and it would be great to make them blend in better. Currently, you can see the limited resolution in close proximity and/or certain angles. If implementing that is complicated or not viable performance-wise, don't worry too much about it.
#4302 Posted 16 February 2014 - 12:03 PM
Fox, on 12 February 2014 - 04:13 PM, said:
The recent round of changes introduces various helpers to create and save lookup tables. Refer to the changes of test/shadexfog.lua and the added documentation.
I don't think that the *.DAT files are "obsolete". They're simple binary formats for which it's easy to write reader or writer programs.
Note that a lookup table is simply a color index remapping, which is then used to set up the whole shade table according to the second example here.
So, having additional blending and lookup tables loadable (the latter was already possible before, but then the fog pals numbers would shift upwards), what's left is
* Loading full shade tables. Currently, it's only possible to register them programmatically with Lunatic's engine.setshadetab().
* Loading additional base palettes. LOOKUP.DAT carries five of them, but allowing any number (up to some limit) would need some code refactoring first.
I'm kind of done with the palette stuff for now, though.
#4303 Posted 16 February 2014 - 12:11 PM
really good for hot and underwater settings if it is what iam thinking it is
#4304 Posted 16 February 2014 - 03:16 PM
Cage, on 16 February 2014 - 04:45 AM, said:
I'm experimenting with using voxels for level geometry and it would be great to make them blend in better. Currently, you can see the limited resolution in close proximity and/or certain angles. If implementing that is complicated or not viable performance-wise, don't worry too much about it.
Do you mean in Classic mode? In Polymost voxels are displayed as true cubes.
#4305 Posted 16 February 2014 - 03:17 PM
Roma Loom, on 16 February 2014 - 12:25 AM, said:
Do you have an example of a tile that does this right now? I can take a look.
#4306 Posted 16 February 2014 - 07:56 PM
Concerning 8 bit mode, how is one supposed to completely "wipe" the art files (all texture/animation definitions) in order to start from scratch?
I can only find two options so far:
undeftexturerange 0 6143
this is for "hightile" only, so does nothing for me, the alternative is
dummytilerange 0 6143 1 1
which works, but leaves two issues which render it almost useless:
1] "dummytilerange" doesn't seem to work with (0,0). I am forced to use (1,1), which leaves a small black square in place of any objects which are not redefined with a new texture (i.e. what if I just want to leave some tiles completely blank?).
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.
I've gone through the DEF language page on the edukewiki and have found nothing else for doing this. What am I missing here?
#4307 Posted 16 February 2014 - 08:17 PM
#4308 Posted 16 February 2014 - 08:42 PM
edit: Out of curiousity, are there any plans to implement a DEF language method of wiping animation info and creating truly "blank" tiles? I still think it would be useful.
This post has been edited by Nukey: 16 February 2014 - 08:50 PM
#4309 Posted 16 February 2014 - 08:58 PM
#4310 Posted 16 February 2014 - 11:27 PM
Plagman, on 16 February 2014 - 03:17 PM, said:
That would be recently uploaded tile #389. You can toggle r_glowmapping while looking at any paletted version of it too see what happens.
#4311 Posted 17 February 2014 - 12:02 PM
Plagman, on 16 February 2014 - 03:16 PM, said:
Yes. Polymost display method is the one I'd like to have, I can't use the 32-bit mode since I'm using custom shading/transparency tables in palette.dat, though.
#4312 Posted 17 February 2014 - 12:37 PM
#4313 Posted 17 February 2014 - 01:59 PM
#4314 Posted 17 February 2014 - 02:43 PM
Btw I was wondering, in the classic renderer, how would the performance of voxels be compared to 3D spritework in terms of framerate?
#4315 Posted 18 February 2014 - 09:49 AM
Also related, is there a way to apply it deliberately to rotatesprite stuff? (Like weapon flashes and stuff) Cheers!

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


