EDuke32 2.0 and Polymer! "talk about the wonders of EDuke32 and the new renderer"
#4261 Posted 02 February 2014 - 02:11 PM
Edit: nm, found it.
#4262 Posted 06 February 2014 - 11:22 AM
This post has been edited by Fox: 06 February 2014 - 11:23 AM
#4263 Posted 06 February 2014 - 11:45 AM
1. demoting per-actor and per-player gamevars to global when it can be determined their per-actor/player status is unused
2. automatically identifying whether individual gamevars need to be transmitted over the network or not
so unused variable removal would fit right in. Anything else you can think of?
#4264 Posted 06 February 2014 - 12:35 PM
#4265 Posted 06 February 2014 - 02:07 PM
Hendricks266, on 06 February 2014 - 11:45 AM, said:
Negative on that one... clients will not be executing CON code in the same way the server does at all, so there's not much identification to be done. Clients will run display events but it's not logically going to work to just flag every variable accessed within a display event. People programming multiplayer mods will be expected to organize their game state data in such a way that small bits can be passed to the client as hints to guide the client's simulation of the server state.
Shit, it's almost like people will be expected to utilize actual programming techniques where EDuke32 doesn't hold your hand and just doing whatever you want will give poor results.
#4266 Posted 06 February 2014 - 02:32 PM
TerminX, on 06 February 2014 - 02:07 PM, said:
Please provide a pratical example, I want to understand how that will work.
#4267 Posted 06 February 2014 - 02:52 PM
This post has been edited by James: 06 February 2014 - 02:53 PM
#4268 Posted 06 February 2014 - 04:55 PM
TerminX, on 06 February 2014 - 02:07 PM, said:
I insist you hear me out.
The identification would happen on the server side. The identification code for network transmission would work much like my idea for per-actor-->global demotion. By default, the transmit status of all gamevars would be false. Gamevars used in display events would be marked true. Then, any gamevar for which its first use in all delimited blocks discards the current value (like a get<struct> or setvar command) is marked false.
I assume the primary issue is keeping the size of packets as small as possible. To that end, gamevars would get a tracker system much like what the map structs have so that they are only transmitted when modified.
If the CON scripts have a fuckton of variables that never change (the ubiquitous make variables for every parameter passed to rotatesprite) then said constants would only be transmitted one time, when gamevars are initialized, even though they would be flagged as "transmit".
A secondary issue is that network transmission may not be sufficient for certain variables, such as weaponcount. However, addressing this issue is separate from automatic gamevar network transmission.
The only circumstance that I can see where my idea would be outright "negative" would be if client screen implementation was redesigned in such a way as to require all-new CON structure (requiring updates for ALL display mods to function over the network), such as an event where variables like weaponcount can be augmented whenever the client performs a "fake" game tic (basically a cut-down "onevent EVENT_GAME ifactor APLAYER { } endevent"), and therefore any and all existing gamevars would be useless to transmit over the network.
#4269 Posted 10 February 2014 - 02:28 AM
Fox, on 06 February 2014 - 11:22 AM, said:
Good idea with finding these. Starting with r4299, LunaCON adds two new warnings, -Wnever-used-gamevar and -Wnever-read-gamevar. They are not enabled by default: many CON mods in the wild contain a spamgenic amount of these gamevars. Also, they are not automatically removed from the code: memory-wise, what matters most are per-actor gamevars in C-CON. In LunaCON, they're implemented in a sparse fashion, meaning that they only use an amount of memory roughy proportional to the number of non-default values stored in it.
Fox, on 06 February 2014 - 12:35 PM, said:
For the occasional global gamevar, you shouldn't feel bad using a 32-bit int even if it's only used in a boolean sense; the memory "waste" is negligibe. Again, if you want an array of booleans, using a CON gamearray (or per-something gamevar) is suboptimal. However, there's a simple trick: just consolidate up to 32 variables into one by using bit-wise operations. Like this:
gamevar tmp 0 0 gamevar actorprop 0 2 // various per-actor boolean properties define APROP_ISAPIG 1 define APROP_CANFLY 2 define APROP_VERYDANGEROUS 4 useractor PIGCOP // ... getactorvar[THISACTOR].actorprop tmp orvar tmp APROP_ISAPIG ifvare sprite[THISACTOR].pal 21 orvar tmp APROP_CANFLY setactorvar[THISACTOR].actorprop tmp enda
(Untested, but you get the idea...)
#4270 Posted 10 February 2014 - 10:11 AM
But I do realize now a problem with what I was asking, here is an example:
getplayer[THISACTOR].random_club_frame shade andvar shade 2047 sin shade shade mulvar shade -1 addvar shade 16384 divvar shade 1024
This is the code I use to make the Shrinker / Expander crystal glowing... while at first I would assume shade is a gamevar that would only require 8-bits, on practice I use it for some calculation that overcome that limit for the sake of not using temporary variables. So the limit on gamevars should be reinforced only at the end of the actor / event, and I am not sure how feasible that is.
This post has been edited by Fox: 10 February 2014 - 10:11 AM
#4271 Posted 10 February 2014 - 08:45 PM
Hendricks266, on 06 February 2014 - 04:55 PM, said:
This is pretty much the case. Nearly every mod will require updates to be usable with EDuke32 multiplayer... it just is what it is. None of them are programmed with any of the restrictions in mind that apply to a client/server setup where updates are actually transmitted, instead of events simply being expected to occur in an identical fashion on all players. Some of the stuff CON lets you do is just not going to be compatible with this.
#4272 Posted 11 February 2014 - 11:29 AM
#4273 Posted 12 February 2014 - 01:22 AM
This post has been edited by Fox: 12 February 2014 - 03:25 AM
#4274 Posted 12 February 2014 - 03:02 AM
#4275 Posted 12 February 2014 - 03:07 AM
#4276 Posted 12 February 2014 - 03:46 AM
Micky C, on 12 February 2014 - 03:07 AM, said:
The only lunatic zips I see are 32bit and 64bit versions, with no mention of a mapster32 version. If there's a direct link I'd love to have it, since if this new additive/blending modes still work with CON than it'll be invaluable.
#4277 Posted 12 February 2014 - 03:51 AM
I have to say, the whole separated-out structure of the SVN is a real mess at the moment, there has to be a better way to organize/present it. There are loads of people on the megaton forums asking "where's mapster32?" since it's not included any more, and there's no indication there's a separate zip(s) on the eduke32 website.
#4279 Posted 12 February 2014 - 10:26 AM
Micky C, on 12 February 2014 - 03:51 AM, said:
I have to say, the whole separated-out structure of the SVN is a real mess at the moment, there has to be a better way to organize/present it. There are loads of people on the megaton forums asking "where's mapster32?" since it's not included any more, and there's no indication there's a separate zip(s) on the eduke32 website.
Nukey, on 12 February 2014 - 09:05 AM, said:
This post has been edited by The Commander: 12 February 2014 - 10:28 AM
#4280 Posted 12 February 2014 - 11:26 AM
Nukey, on 12 February 2014 - 09:05 AM, said:
My original intention was to separate out all of the sample data that 99.999% of users never use... I don't necessarily think separating out mapster32.exe itself was a good idea either.
#4281 Posted 12 February 2014 - 12:04 PM
#4282 Posted 12 February 2014 - 12:10 PM
#4284 Posted 12 February 2014 - 12:40 PM
If the lack of a package containing only eduke32.exe actually bothers any users in practice, we can see about making that available too. Really though, if file size is a concern, it's not that hard to set up your own synthesis.
Packages will still be separated based on architecture (32-bit/64-bit) and release/debug. That will keep the file size mostly down.
#4285 Posted 12 February 2014 - 01:05 PM
This post has been edited by The Commander: 12 February 2014 - 01:07 PM
#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