EDuke32 2.0 and Polymer! "talk about the wonders of EDuke32 and the new renderer"
#3380 Posted 05 February 2013 - 05:59 PM
#3381 Posted 05 February 2013 - 06:02 PM
#3382 Posted 06 February 2013 - 03:18 AM
#3383 Posted 06 February 2013 - 03:30 AM
Diaz, on 05 February 2013 - 06:02 PM, said:
Hmmm, it seems to work fine here without a map/vid restart.
#3384 Posted 06 February 2013 - 04:18 AM
No big deal anyways, I just set the default to 1.3 and all is well
#3385 Posted 06 February 2013 - 05:02 AM
TerminX, on 31 January 2013 - 11:38 AM, said:
Have another tab in the startup window that asks for a server to connect to. When connected, a separate folder is set up where the client downloads the modified resources from the server.
#3386 Posted 06 February 2013 - 05:08 AM
Mikko_Sandt, on 06 February 2013 - 03:30 AM, said:
For me it does need the restartvid. That was using polymer though. I think sprites seems to change instantly, however it's the map geometry that requires the restartvid.
Alan, on 06 February 2013 - 05:02 AM, said:
I don't think you'll really have to download anything. At least with map files, when the host starts up a map, you can join it even though you don't have the map yourself. Although I'm not really sure about TCs, but then again you should really have the TC anyway before you start an online game for the actual TC.
#3387 Posted 06 February 2013 - 05:41 AM
#3388 Posted 06 February 2013 - 02:06 PM
Fox, on 06 February 2013 - 03:18 AM, said:
Not really, no. It would need to be an engine feature and would require the model to be UV-mapped a very specific way to work. What do you want to do?
#3389 Posted 06 February 2013 - 02:26 PM
It would solve the problem if the spriteext x or y panning worked for the model textures. And it doesn't need to be a detailed effect, simply a "flat panning" of the texture.
I could reproduce the effect by having a set of multiple texture with a 1-px offset from each other, but that would be a ugly hack and would suck.
This post has been edited by Fox: 06 February 2013 - 02:27 PM
#3390 Posted 06 February 2013 - 06:47 PM
onevent EVENT_SPAWN
ifactor PIGCOP
spritepal 21
endevent
onevent EVENT_SPAWN
ifactor PIGCOP
ifspawnedby RECON
spritepal 22
endevent
The intended effect would be that Pig Cops would have palette 21, except those spawned by a Recon Patrol Vehicle which would have palette 22. However this is not what actually happens, instead all Pig Cops would have palette 21 because the first onevent is called later.
The second problem is with the break command, which run across all the multiple onevent. Example below:
onevent EVENT_SPAWN
ifactor PIGCOP
spritepal 21
endevent
onevent EVENT_SPAWN
ifactor PIGCOP
break
endevent
This sample code is meant to make all Pig Cops have palette 21, but nothing will happen because of the break command in the second onevent. And I don't think this should happen, since when used in a state the break command only affects the code of the state.
#3391 Posted 07 February 2013 - 03:16 AM
Fox, on 06 February 2013 - 06:47 PM, said:
That can be explained by the way they're implemented. When an endevent is encountered but the event was already defined previsouly, a JUMP instruction that points to the beginning of the old one is placed at the end of the new one. So yes, events defined later run earlier. [NOTE: jump shouldn't really be used by user CON code.]
Quote
onevent EVENT_SPAWN
ifactor PIGCOP
spritepal 21
endevent
onevent EVENT_SPAWN
ifactor PIGCOP
ifspawnedby RECON
spritepal 22
endevent
The intended effect would be that Pig Cops would have palette 21, except those spawned by a Recon Patrol Vehicle which would have palette 22. However this is not what actually happens, instead all Pig Cops would have palette 21 because the first onevent is called later.
That code seems pretty artificial to me, and just having that logic in one "ifactor PIGCOP" branch in EVENT_SPAWN is much more readable IMO. The way I see it, event chaining is mainly a mechanism to allow modules to define independent behavior for a particular event. For example because each module needs EVENT_SPAWN for their custom actors.
Quote
onevent EVENT_SPAWN
ifactor PIGCOP
spritepal 21
endevent
onevent EVENT_SPAWN
ifactor PIGCOP
break
endevent
This sample code is meant to make all Pig Cops have palette 21, but nothing will happen because of the break command in the second onevent. And I don't think this should happen, since when used in a state the break command only affects the code of the state.
Now this is interesting, and it can also be explained by what was said above: the two EVENT_SPAWN parts effectively become one block of code. I kind of agree that the expected behavior for break is "jump to end of event" (i.e. what is called "return" in most imperative programming languages). Shall we say that for now, "if a break is used inside an event that is multiply defined, the behavior is undefined"?
#3392 Posted 07 February 2013 - 04:26 AM
Helixhorned, on 07 February 2013 - 03:16 AM, said:
What do you mean? That I should not be opening an event multiple times, or that it's a sort of a mistake of Eduke?
Helixhorned, on 07 February 2013 - 03:16 AM, said:
Fox, on 06 February 2013 - 06:47 PM, said:
You guessed it. But believe me, I have some pratical use for an event being opened multiple times.
Since the code is normally written from the top to the bottom, I think it's just natural to have the first event called first.
Helixhorned, on 07 February 2013 - 03:16 AM, said:
Ehh, since it is a basic function (like "else") can't it be fixed?
This post has been edited by Fox: 07 February 2013 - 04:44 AM
#3393 Posted 07 February 2013 - 05:33 AM
Fox, on 07 February 2013 - 04:26 AM, said:
I mean that jump should be avoided when writing CON code. There are some legitimate uses for what other languages call "goto" when jumping to error handling code forwards, but loops (=backward jumps) should be written using the available looping constructs: whilevarn or whilevarvarn.
Quote
Not immediately.
#3394 Posted 07 February 2013 - 05:55 AM
#3395 Posted 07 February 2013 - 07:26 AM
I mean, for readability as well as the general logic of your code it doesn't seem to make much sense and it can potentially be a lot more lines of code depending on what you need done.
onevent EVENT_SPAWN
ifactor PIGCOP
spritepal 21
endevent
onevent EVENT_SPAWN
ifactor PIGCOP
ifspawnedby RECON
spritepal 22
endevent
vs
onevent EVENT_SPAWN
ifactor PIGCOP
{
ifspawnedby RECON
spritepal 22
else
spritepal 21
}
endevent
The above happens to be 9 lines just as before, but for each further EVENT_SPAWN you'll need an additional 3 lines (onevent EVENT_SPAWN - ifactor PIGCOP - endevent) along with whatever other if conditions you put in place. And all for code that logically should be happening before the actor is executing the rest of its code so it all fits together anyway.
#3396 Posted 07 February 2013 - 10:00 AM
#3397 Posted 07 February 2013 - 03:23 PM
Mblackwell, on 07 February 2013 - 07:26 AM, said:
I mean, for readability as well as the general logic of your code it doesn't seem to make much sense and it can potentially be a lot more lines of code depending on what you need done.
onevent EVENT_SPAWN
ifactor PIGCOP
spritepal 21
endevent
onevent EVENT_SPAWN
ifactor PIGCOP
ifspawnedby RECON
spritepal 22
endevent
vs
onevent EVENT_SPAWN
ifactor PIGCOP
{
ifspawnedby RECON
spritepal 22
else
spritepal 21
}
endevent
The above happens to be 9 lines just as before, but for each further EVENT_SPAWN you'll need an additional 3 lines (onevent EVENT_SPAWN - ifactor PIGCOP - endevent) along with whatever other if conditions you put in place. And all for code that logically should be happening before the actor is executing the rest of its code so it all fits together anyway.
It is just an example. It doesn't need to make sense.
#3398 Posted 07 February 2013 - 04:42 PM
Plagman, on 07 February 2013 - 10:00 AM, said:
Break usually means "do not execute the following code block(s)". For the given example there's no real context other than perhaps order of operations. Unless we can specify that there's really not going to be a good way to do non-additive mutators.
#3399 Posted 09 February 2013 - 08:38 PM
The eduke32.log file displays these lines of messages every time I typed in 'restartvid' if it means anything:
Quote
PR : Board loaded.
PR : FBO #1 initialization failed.
PR : FBO #2 initialization failed.
PR : FBO #3 initialization failed.
PR : FBO #4 initialization failed.
PR : FBO #5 initialization failed.
PR : Initialization complete in 180 ms.
This post has been edited by MusicallyInspired: 09 February 2013 - 08:43 PM
#3400 Posted 10 February 2013 - 03:42 AM
What it looks like now:


What it could be like:

This post has been edited by Fox: 10 February 2013 - 03:45 AM
#3402 Posted 10 February 2013 - 04:22 PM
onevent EVENT_DISPLAYROOMS setplayer[THISACTOR].heat_on 1 setgamepalette 0 setplayer[THISACTOR].heat_on 0 endevent
By setting the game palette to zero, the game was supposed to display always display it regardless of the condition. However, because I changed the value of heat_on the palette is reset to 1 if the player is underwater and using Night Vision Goggles at the same time.
This is not a big issue, I have fixed the problems I was having by simply changing the order of the code... but I think it should at least be mentioned.
#3403 Posted 12 February 2013 - 10:17 AM
I know TROR is unsuported by Polymost. But I made a relatively simple construction that worked all three ways here, and when sent to this other guy he showed me some really ugly HOM screenshots. The only thing of why we think this could happen is the brand of our video cards.
#3404 Posted 12 February 2013 - 11:39 AM
#3405 Posted 12 February 2013 - 07:56 PM
Gambini, on 12 February 2013 - 10:17 AM, said:
I know TROR is unsuported by Polymost. But I made a relatively simple construction that worked all three ways here, and when sent to this other guy he showed me some really ugly HOM screenshots. The only thing of why we think this could happen is the brand of our video cards.
Mhhh I remember having exactly the same problem while working on Metropolitan Starlight, The Big Cheese show me some ugly HOM TROR while I specially designed the area for Polymost and it looked good on my end... So finally we decided to make the map only Polymer playable.
Plagman must know.
#3406 Posted 12 February 2013 - 08:00 PM
#3407 Posted 12 February 2013 - 09:15 PM
#3408 Posted 13 February 2013 - 04:11 PM
I´m willing to take care of all tests needed (as long as it´s something I can do) in order to find where this difference comes from. Come to think of how much this would benefit Eduke32 to have TROR working on all renderers. And being the situation that it seems to work in some systems, we would not be that far of achieving it.
#3409 Posted 13 February 2013 - 04:19 PM
This post has been edited by Fox: 13 February 2013 - 04:20 PM

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


