Duke4.net Forums: EDuke32 2.0 and Polymer! - Duke4.net Forums

Jump to content

  • 213 Pages +
  • « First
  • 177
  • 178
  • 179
  • 180
  • 181
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

EDuke32 2.0 and Polymer!  "talk about the wonders of EDuke32 and the new renderer"

User is offline   TerminX 

  • el fundador

  #5341

It's used for setting up a new palette, appropriate blending table, and alternate palettes with .def instead of with palette.dat, etc.
1

User is offline   Jblade 

#5342

Oh cool - by alternate palettes, do you mean the whole screen palettes like water and night vision? Does this mean I can use many more full screen palette replacements now, or is it just the pal numbers like 21 and stuff? Having many more full screen palette options is something I've been waiting for a long long time.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#5343

It's for everything. Palettes for the whole screen, pal numbers, shade tables, fancy effects with fogpals, etc.
0

User is online   Hendricks266 

  • Weaponized Autism

  #5344

 Jblade, on 27 September 2015 - 05:55 AM, said:

Oh cool - by alternate palettes, do you mean the whole screen palettes like water and night vision?

Basepalettes are included, and I have raised the cap from 7 to 256. I am going to write a wiki tutorial explaining how everything works once I write a new Buildtool to apply our tilefromtexture color match algorithm to an input file (because I've found IrfanView, GIMP, and Photoshop to all suck at this particular task).

If you want a taste, this is the code to load everything from PALETTE.DAT and LOOKUP.DAT:

basepalette 0 { raw { file "PALETTE.DAT" shiftleft 2 } }
palookup 0 { raw { file "PALETTE.DAT" offset 770 } }
blendtable 0 { raw { file "PALETTE.DAT" offset 8962 } }

palookup 1 { raw { file "LOOKUP.DAT" offset 2 noshades } }
palookup 2 { raw { file "LOOKUP.DAT" offset 259 noshades } }
palookup 6 { raw { file "LOOKUP.DAT" offset 516 noshades } }
palookup 7 { raw { file "LOOKUP.DAT" offset 773 noshades } }
palookup 8 { raw { file "LOOKUP.DAT" offset 1030 noshades } }
palookup 3 { raw { file "LOOKUP.DAT" offset 1287 noshades } }
palookup 4 { raw { file "LOOKUP.DAT" offset 1544 noshades } }
palookup 5 { raw { file "LOOKUP.DAT" offset 1801 noshades } }
palookup 9 { raw { file "LOOKUP.DAT" offset 2058 noshades } }
palookup 10 { raw { file "LOOKUP.DAT" offset 2315 noshades } }
palookup 12 { raw { file "LOOKUP.DAT" offset 2572 noshades } }
palookup 13 { raw { file "LOOKUP.DAT" offset 2829 noshades } }
palookup 15 { raw { file "LOOKUP.DAT" offset 3086 noshades } }
palookup 16 { raw { file "LOOKUP.DAT" offset 3343 noshades } }
palookup 18 { raw { file "LOOKUP.DAT" offset 3600 noshades } }
palookup 19 { raw { file "LOOKUP.DAT" offset 3857 noshades } }
palookup 11 { raw { file "LOOKUP.DAT" offset 4114 noshades } }
palookup 14 { raw { file "LOOKUP.DAT" offset 4371 noshades } }
palookup 17 { raw { file "LOOKUP.DAT" offset 4628 noshades } }
palookup 20 { raw { file "LOOKUP.DAT" offset 4885 noshades } }
palookup 21 { raw { file "LOOKUP.DAT" offset 5142 noshades } }
palookup 22 { raw { file "LOOKUP.DAT" offset 5399 noshades } }
palookup 23 { raw { file "LOOKUP.DAT" offset 5656 noshades } }
palookup 24 { raw { file "LOOKUP.DAT" offset 5913 noshades } }
palookup 25 { raw { file "LOOKUP.DAT" offset 6170 noshades } }
basepalette 1 { raw { file "LOOKUP.DAT" offset 6426 shiftleft 2 } }
basepalette 2 { raw { file "LOOKUP.DAT" offset 7194 shiftleft 2 } }
basepalette 4 { raw { file "LOOKUP.DAT" offset 7962 shiftleft 2 } }
basepalette 3 { raw { file "LOOKUP.DAT" offset 8730 shiftleft 2 } }
basepalette 5 { raw { file "LOOKUP.DAT" offset 9498 shiftleft 2 } }


Note that I don't recommend concatenating multiple datasets in a single file for anything new.
2

User is offline   Jblade 

#5345

Any reason why the wall colours have changed in the latest mapster snapshots? A blocking wall is red now.
0

#5346

 Jblade, on 11 October 2015 - 11:54 PM, said:

Any reason why the wall colours have changed in the latest mapster snapshots? A blocking wall is red now.


There is a bit of purple - it is flashing between red and purple instead of being pulsating purple as it should be. If it's not an accident then I have to ask the question why change something that was fully functional previously.

I suspect it is a bug though, as I just drew a square, divided it diagonally and got a white wall. Clearing blocking bit made the line red, setting it again made it pulsate red/<->purple.

TTFN,
Jon

Attached thumbnail(s)

  • Attached Image: white-wall.png
  • Attached Image: red-blocking-wall.png

0

User is offline   Jblade 

#5347

Quote

-Cstat 1024 now activates a special drawing mode that indicates a sprite should be drawn without depth after all other sprites have been drawn. The previous cstat 1024 functionality, an internal hack for shadows cast by models in Polymost, has been moved to bit 1 of a new graphical effects bitfield stored in a tsprite's .extra member.

I saw this in the changelog, and testing it ingame it works great and will help fix a lot of ugly flickering we had with glow sprites and stuff. Thanks a lot for adding it in!
2

User is offline   TerminX 

  • el fundador

  #5348

The cstat bit that activates it may change, so keep on the look out for that if it happens. It's also not working correctly in Polymer, which means Polymer itself isn't working correctly currently since the new flag is applied to the built-in stuff like explosions. Damn it, if it's not one thing it's another. :)
5

User is online   Danukem 

  • Duke Plus Developer

#5349

Thanks for the warning -- I've finally learned my lesson about using unfinished features (don't).
0

User is offline   NightFright 

  • The Truth is in here

#5350

I wanted to give a big thumbs-up to the EDuke32 coding team for implementing the latest Polymer menu feature that allows you to toggle dynamic lighting (among other things), including a "smart" way of keeping hidden switches hidden by deactivating lights in such cases. A very useful feature, especially for those who don't like to use console commands!

This post has been edited by NightFright: 26 October 2015 - 06:45 AM

3

#5351

Didn't think this was worthy of it's own topic, so I'll post it in here. In eDuke 5400 lately I noticed that the laser tripmines are the solid red color instead of the more fancy looking translucent color. I remember from looking in the con file of a mod recently that you can change that in the con settings. I don't have any con files in my eduke folder, so is there a console command to change that, or some other way to fix that setting back to the better looking way? Thanks.
0

User is offline   Mark 

#5352

If you know which lines of code are needed from that modded con file you can copy / paste them into your own new con file. Call the new file tripmine.con and put it in the main Eduke folder. Then edit the duke3d.def file and add the line " include tripmine.con " without the quotation marks. If all is well with the code you copied it should do what you want. If you get an error message it means you didn't grab all the proper code from that modded con file. You may have a problem if that original con file tries to use a new texture that you do not have in regular Eduke.

This post has been edited by Mark.: 29 October 2015 - 11:19 AM

2

#5353

 Mark., on 29 October 2015 - 11:16 AM, said:

If you know which lines of code are needed from that modded con file you can copy / paste them into your own new con file. Call the new file tripmine.con and put it in the main Eduke folder. Then edit the duke3d.def file and add the line " include tripmine.con " without the quotation marks. If all is well with the code you copied it should do what you want. If you get an error message it means you didn't grab all the proper code from that modded con file. You may have a problem if that original con file tries to use a new texture that you do not have in regular Eduke.

Am I mistaken or was the translucent look the default before? I wonder why it's no longer the default for me, if so?

To be honest I did try making a con file last week messing with various stuff, and it didn't work, it would always say there was a bunch of mistakes when trying to load. And I'm sure there were. :)

Is there a default template somewhere? I read the wiki page on con editing didn't quite get me there.

This post has been edited by PsychoGoatee: 29 October 2015 - 11:49 AM

0

User is offline   Mark 

#5354

Looking at the wiki, other people's mods, asking questions and LOTS of trial and error has gotten me to the point of knowing enough con coding to do a bunch of the "easier" things in my projects. Keep at it. I gave up a few times before it finally started to sink in. It would be fantastic if there were lots and lots of code "snippets" or examples to go along with the technical info in the wiki. There are already some very useful ones in there but many more are needed. Sometimes it seems that the wiki was written assuming basic knowledge of cons and you can get lost if just starting out. Like most others here with the knowledge to add some examples, I'm so busy with upcoming projects that adding to the wiki is a low priority for me. I would like to contribute some day.

This post has been edited by Mark.: 29 October 2015 - 01:00 PM

1

User is online   Danukem 

  • Duke Plus Developer

#5355

 PsychoGoatee, on 29 October 2015 - 09:05 AM, said:

Didn't think this was worthy of it's own topic, so I'll post it in here. In eDuke 5400 lately I noticed that the laser tripmines are the solid red color instead of the more fancy looking translucent color. I remember from looking in the con file of a mod recently that you can change that in the con settings. I don't have any con files in my eduke folder, so is there a console command to change that, or some other way to fix that setting back to the better looking way? Thanks.


There are 3 CON files that come with Duke 3D. They are GAME.CON, USER.CON, and DEFS.CON

You should definitely have copies of these in the same folder that contains DUKE3D.GRP. Note that the copies that are loose in your folder will override the copies that are zipped inside of DUKE3D.GRP
I believe that the Atomic edition comes with those files outside of the GRP and ready to edit.

The tripbomb settings, and many other settings can be found in USER.CON
Here is the relevant part:

define TRIPBOMBLASERMODE        1     // 0 = always visable
                                      // 1 = transluscense
                                      // 2 = invisible w/o IR goggles
                                      // 3 = totally invisable


Again, even if you don't intend to do much with the CON files, it is good to have them handy.
3

User is offline   ReaperMan 

#5356

 Mark., on 29 October 2015 - 01:00 PM, said:

It would be fantastic if there were lots and lots of code "snippets" or examples to go along with the technical info in the wiki. There are already some very useful ones in there but many more are needed. Sometimes it seems that the wiki was written assuming basic knowledge of cons and you can get lost if just starting out.

Mark that is a great idea and would help immensely.
0

#5357

 Trooper Dan, on 29 October 2015 - 01:37 PM, said:

There are 3 CON files that come with Duke 3D. They are GAME.CON, USER.CON, and DEFS.CON

You should definitely have copies of these in the same folder that contains DUKE3D.GRP. Note that the copies that are loose in your folder will override the copies that are zipped inside of DUKE3D.GRP
I believe that the Atomic edition comes with those files outside of the GRP and ready to edit.

The tripbomb settings, and many other settings can be found in USER.CON
Here is the relevant part:

define TRIPBOMBLASERMODE        1     // 0 = always visable
                                      // 1 = transluscense
                                      // 2 = invisible w/o IR goggles
                                      // 3 = totally invisable


Again, even if you don't intend to do much with the CON files, it is good to have them handy.


Much thanks. I've only been copying Duke.grp and Duke.rts into my eduke folders since I read those were all you need. I haven't played Vanilla DOS Duke in a long time. But I do have those .cons there in the classic folder in Megaton, so I don't have to dig out the ol' CD, right on.
0

#5358

 PsychoGoatee, on 29 October 2015 - 11:45 AM, said:

To be honest I did try making a con file last week messing with various stuff, and it didn't work, it would always say there was a bunch of mistakes when trying to load. And I'm sure there were. :)


Well the error messages should point you in the right direction, but if it was the sheer quantity of error mesages that put you off just bear in mind that, just like the 'C' language, CON files are such that just one mistake can generate an absolute shed load of error messages all over the place including other files.

My top two errors these days are 1) using "var" instead of "varvar" e.g. setvar instead of setvarvar, doesn't always give an error message that is obvious but once you've seen it a few times you know _exactly_ what you feck'd up :) The other is getting { and } to balance, can lead to quite a bit of head scratching but using notepad++ with a CON-specific plug in can really help there.

I agree with Mark, plenty of trial and error needed, you learn lots that way.

I am toying with a tutorial on getting started with CON files. Not put much time in as, well, didn't think there'd be anyone to read it so currently it is in the form of Mechanic-with-a-head-like-a sieve notes.

The Wiki has all the info but, agian, as Mark said it kinda assumes you are already up to speed and indeed some information just isn't easy to find - I've asked a few questions only to get a (helpful) direct link to a relevent page that I swear never turned up via Google or starting with the scripting page of the Wiki.

TTFN,
Jon
1

User is offline   TerminX 

  • el fundador

  #5359

View PostMark., on 29 October 2015 - 01:00 PM, said:

Sometimes it seems that the wiki was written assuming basic knowledge of cons and you can get lost if just starting out.

It was! There are a few older 1.3D/1.5 CON tutorials that have been on the wiki for years that everyone is expected to read before getting started with the more complicated stuff. It's mentioned pretty early on in the basic page about scripting you reach via the wiki's front page. :)
0

User is offline   Mblackwell 

  • Evil Overlord

#5360

View PostThe Mechanic, on 29 October 2015 - 02:52 PM, said:

My top two errors these days are 1) using "var" instead of "varvar" e.g. setvar instead of setvarvar, doesn't always give an error message that is obvious but once you've seen it a few times you know _exactly_ what you feck'd up :) The other is getting { and } to balance, can lead to quite a bit of head scratching but using notepad++ with a CON-specific plug in can really help there.


If you format your tabs as 4 spaces and always do your code with indentations keeping track of brackets isn't very hard since you have a visual line to go from (and can always move down the lines and see if it's there).

These days I always write like this:
useractor notenemy MYACTOR
    ifvare SOMEVAR 0
        state dostuff
    else
    {
        getactor[THISACTOR].extra SOMEVAR
        ifvarg SOMEVAR 10
        {
            ifvarg SOMEVAR 20
                state domorestuff
            else
            {
                mulvar SOMEVAR 100
                getactor[THISACTOR].xrepeat SOMEOTHERVAR
                divvarvar SOMEVAR SOMEOTHERVAR
                state doevenmorestuff
            }
        }
    }
enda


Blame TerminX for always enforcing fairly strict style guidelines when you code with him.
0

#5361

View PostMblackwell, on 29 October 2015 - 07:24 PM, said:

If you format your tabs as 4 spaces and always do your code with indentations keeping track of brackets isn't very hard since you have a visual line to go from (and can always move down the lines and see if it's there).


Yes - and no. The issue usually arrises when I modify a function such as commenting out blocks whilst trying to get my crap to work. It also takes me a few hours to switch between c#/c++/php/javascript mode and CON file mode during which time I do some real dumb things like

state my_really_cool_function
{
}


which I then compound replacing the trailing '}' with ends. I hate getting old.

View PostMblackwell, on 29 October 2015 - 07:24 PM, said:

These days I always write like this:
useractor notenemy MYACTOR
    ifvare SOMEVAR 0
        state dostuff
    else
    {
        getactor[THISACTOR].extra SOMEVAR
        ifvarg SOMEVAR 10
        {
            ifvarg SOMEVAR 20
                state domorestuff
            else
            {
                mulvar SOMEVAR 100
                getactor[THISACTOR].xrepeat SOMEOTHERVAR
                divvarvar SOMEVAR SOMEOTHERVAR
                state doevenmorestuff
            }
        }
    }
enda



Wot no comments ? Shame on you :)

View PostMblackwell, on 29 October 2015 - 07:24 PM, said:

Blame TerminX for always enforcing fairly strict style guidelines when you code with him.


Yes, and that is good. We differ on very few - I could write an essay on why you should ALWAYS follow an if statement with curley braces even for single statements and why I am obviously right :) But it's irrelevent, I've learnt over the years that it is far better to have a common standard whatever that standard is. I've asked if there is one of the Eduke source files that could be used as a suitable style reference.

Anyhow, it sounded like PsychoGoatee was put off playing with CON files because of getting a bunch of errors, just wanted to highlight that just one actual error can lead to a shed load of errors but not to panic it may well just be the first error that is important.

TTFN,
Jon
0

User is offline   Mblackwell 

  • Evil Overlord

#5362

Yeah, the first error you find is the most important. Everything is caused by it generally.

BTW I avoid { } for single statements because in CON it prevents the code from branching internally (and saves resources). Which is why things like nullop exist.

Also comments are only for when code is unclear on its own*. That code clearly says to do lots of stuff!

Spoiler

0

User is offline   Kyanos 

#5363

I came across a modelling trick from an old game. They mapped the uv coordinates to the bottom left corner, 1 pixel. The engine is then told to ''float'' the pixel around the texture, using numbers pulled from the angle of the camera, it makes the object look flat and shiny.

Would you guys duplicate that in EDuke32?

This post has been edited by Drek: 11 November 2015 - 09:37 AM

1

User is offline   Mark 

#5364

I can't picture in my head what that looks like or what it's use would be. Do you have a link to a screenshot or video of that old game?

This post has been edited by Mark.: 11 November 2015 - 10:48 AM

0

User is offline   Kyanos 

#5365

It's from turok actually, I've started helping duke64 with his turok mod. A few HUD models (auto shotgun barrel) and the keystone stands (gold metal trim) Extra life triangles, and health pickups are good examples of the effect.

This post has been edited by Drek: 11 November 2015 - 12:06 PM

1

User is offline   Mark 

#5366

I'll check out a youtube vid of Turok then......

I guess I was wrong about something. I was mistaking an older game called Trespass with Turok. Anyway, I saw in Turok 2 the spinning pickups you mentioned. I would just create the spinning model ( or voxel if that's your thing ) and not worry about modifying the game engine.

BTW, was it Diaz that had screenshots of a fantastic looking jungle in his unfinished mod? Team up with him if he's still around.

This post has been edited by Mark.: 11 November 2015 - 01:02 PM

0

User is offline   Kyanos 

#5367

I'm ripping the models, they come like that it's how I even figured it out. I have no problem changing them to a static skin, I just thought is was a cool feature and it would be a better mod if the effect worked the same way here.

added a video:


This post has been edited by Drek: 11 November 2015 - 04:00 PM

1

User is offline   Tea Monster 

  • Polymancer

#5368

View PostDrek, on 11 November 2015 - 09:35 AM, said:

I came across a modelling trick from an old game. They mapped the uv coordinates to the bottom left corner, 1 pixel. The engine is then told to ''float'' the pixel around the texture, using numbers pulled from the angle of the camera, it makes the object look flat and shiny.

Would you guys duplicate that in EDuke32?


Correct me if I'm wrong, but that doesn't sound like best practice - that is what smoothing groups are for. As Mark says, if you can link to a vid or a tutorial, that would be great.

One big problem with EDuke and MD3 models is that NPherno's MD3 tool tends to babber up smoothing groups, placing them at UV seams, which is really bad.

One technique they use nowadays is vector normals. They used it in Alien Isolation and Star Citizen. You make your model so that the normals of the object hold all the shape. That way, the only normal maps that you need are textures (like rusty metal,worn paint, leather, etc. You can create all your spec and normal maps without doing any baking at all. Things like table tops and flat surfaces are easy to have looking 'flat' so that reflections behave as they should do. You still have to bake character details down from a high poly sculpt, but an awful lot of props can be made using this technique.

EDIT: Blender tut:



This post has been edited by Tea Monster: 11 November 2015 - 04:19 PM

0

User is offline   Mark 

#5369

OK Drek. Now I see what you're after.
0

User is online   Hendricks266 

  • Weaponized Autism

  #5370

For the Duke 64 mod, I'm going to connect the spriteext members xpanning and ypanning to the UV coordinate of models.
1

Share this topic:


  • 213 Pages +
  • « First
  • 177
  • 178
  • 179
  • 180
  • 181
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options