Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bryan See on February 01, 2017, 10:50:55 am

Title: Game palette code
Post by: Bryan See on February 01, 2017, 10:50:55 am
Since the release of the FS2 source code 15 years ago, one of the things that is left untouched: the handling of the game palette code. It requires the PCX file gamepalette1-01.pcx to load in. Basically it's the required palette file for all of the games and associated mods.

Ideally, the palette handling functionality could be redesigned so that it could be independent of any game palette PCX file.

I'd like to accept any suggestions on how to keep this up-to-date with modern standards of today's game engines like Unreal Engine 4, CryEngine V, id Tech 6 and of course, Unity.
Title: Re: Game palette code
Post by: The E on February 01, 2017, 10:54:09 am
Bryan, did you use your expertise as a visionary coder to investigate what the gamepalette file is used for?

(That's a rhetorical question btw, I know you didn't. Because, if you did, you'd know it's not actually used anywhere for anything, except as part of the check for whether or not FS2 is installed.)
Title: Re: Game palette code
Post by: Luis Dias on February 01, 2017, 10:54:23 am
You forgot to namedrop Frostbyte.
Title: Re: Game palette code
Post by: The E on February 01, 2017, 10:59:14 am
Seriously though, the only thing the palette code is in need of is ripping out. We haven't done so yet because it basically doesn't harm anything.

Also seriously: As long as you, Bryan, continue to call yourself a "visionary coder", expect to be ridiculed every single time you post something like the above. Had you simply asked what this file is good for, you might have gotten a different, less snippy answer.
Title: Re: Game palette code
Post by: m!m on February 01, 2017, 11:02:25 am
Actually, I tried removing it but then found out that the nebula code does something weird with it and I couldn't understand how it could be properly replaced.
Title: Re: Game palette code
Post by: Bryan See on February 01, 2017, 11:11:22 am
Bryan, did you use your expertise as a visionary coder to investigate what the gamepalette file is used for?

(That's a rhetorical question btw, I know you didn't. Because, if you did, you'd know it's not actually used anywhere for anything, except as part of the check for whether or not FS2 is installed.)
I haven't yet. The game palette PCX file is in sparky_fs2.vp file, I know. I'll let you know when I do.
Seriously though, the only thing the palette code is in need of is ripping out. We haven't done so yet because it basically doesn't harm anything.

Also seriously: As long as you, Bryan, continue to call yourself a "visionary coder", expect to be ridiculed every single time you post something like the above. Had you simply asked what this file is good for, you might have gotten a different, less snippy answer.
All right, then. I noted.
Actually, I tried removing it but then found out that the nebula code does something weird with it and I couldn't understand how it could be properly replaced.
m!m, maybe you could make use of shaders and GPGPUs.
So, I'm considering this (along with particle system additions, improved lens flare support from The E, Vulkan?, OpenCollada support) to be added into my part of my build that will be started as soon as the FSO 3.8 release candidate 1 is out.
Title: Re: Game palette code
Post by: m!m on February 01, 2017, 11:16:43 am
Actually, I tried removing it but then found out that the nebula code does something weird with it and I couldn't understand how it could be properly replaced.
Correction: The_E determined that the code I was referring to is actually unreachable without some weird debug hacking so this isn't actually true.

m!m, maybe you could make use of shaders and GPGPUs.
Do you even know what these words mean? From the way you are using them I would guess not.
Title: Re: Game palette code
Post by: The E on February 01, 2017, 11:19:45 am
So, I'm considering this (along with particle system additions, improved lens flare support from The E, Vulkan?, OpenCollada support) to be added into my part of my build that will be started as soon as the FSO 3.8 release candidate 1 is out.

Are you also planning to do any work yourself?
Title: Re: Game palette code
Post by: Bryan See on February 01, 2017, 11:21:59 am
Yes. I'm planning to implement your lens flare from your github branch, along with my features I've planned for the last two years.
Title: Re: Game palette code
Post by: The E on February 01, 2017, 11:26:41 am
Does that mean that you, singlehandedly, finished Vulkan and Collada support?
Title: Re: Game palette code
Post by: Luis Dias on February 01, 2017, 12:42:06 pm
I'm guessing he kinda envisioned himself doing it. Because... that's what visionaries do, right? They env.... ok ok ok, sorry.
Title: Re: Game palette code
Post by: Bryan See on February 02, 2017, 01:52:34 am
Actually, it's not on the FS2 game code. It's on FRED2 (now FRED2_Open) and also WXFred2. I've got through the GitHub's search (https://github.com/scp-fs2open/fs2open.github.com/search?utf8=%E2%9C%93&q=gamepalette1-01&type=Code).
Title: Re: Game palette code
Post by: AdmiralRalwood on February 02, 2017, 02:54:28 am
So I take it you didn't notice the "#if 0 (https://github.com/scp-fs2open/fs2open.github.com/blob/c6726f10f3e6bca5bf0070cf86dd51656affe7df/fred2/freddoc.cpp#L334)" line that completely disabled the first search result? Thanks for pointing out that other parts of FRED still call palette_load_table(), though.
Title: Re: Game palette code
Post by: Bryan See on February 02, 2017, 06:29:40 am
You're welcome, AdmiralRalwood. This information should apply to wxFRED2 as well.
Title: Re: Game palette code
Post by: AdmiralRalwood on February 02, 2017, 11:57:01 am
This information should apply to wxFRED2 as well.
What? No it ****ing well shouldn't. It won't even apply to FRED2 for very much longer.
Title: Re: Game palette code
Post by: jr2 on February 02, 2017, 03:09:24 pm
.
Title: Re: Game palette code
Post by: z64555 on February 02, 2017, 05:26:59 pm
Actually, it's not on the FS2 game code. It's on FRED2 (now FRED2_Open) and also WXFred2. I've got through the GitHub's search (https://github.com/scp-fs2open/fs2open.github.com/search?utf8=%E2%9C%93&q=gamepalette1-01&type=Code).

With me as the current author and project lead of wxFRED2, I can assert that there is no Vulkan nor Collada support on it.