Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: delt on November 28, 2014, 01:48:35 am
-
Hello everyone!
I just made a small diff patch that adds lighting to the models in the "popup" window that appears when you click a ship icon in the briefings. This had always kind of (just a little bit) bugged me that they were flat and boring, unlike pretty much everywhere else in the game =)
This is the result of adding like 7 or 8 lines + a conditional compile (#ifdef) that gives the option to leave the code unchanged. Hope to see this in the next version :D :D :D
[attachment kidnapped by pirates]
-
Wow.. Nice if we could see this in an AVX build. :D
-
Wow.. Nice if we could see this in an AVX build. :D
There isn't really a significant performance difference between the different automatic compiler optimizations, you know.
-
From what I've heard, you'd be surprised at the jump between some of them in various situations.
-
From what I've heard, you'd be surprised at the jump between some of them in various situations.
From what I've personally experienced, the maximum "jump" between SSE2/AVX is maybe 1-2 FPS, if you're lucky (and that's after correcting the project files to actually use AVX optimizations). That being said, I obviously use AVX builds myself, because even if you're only getting half a frame per second, it's still a performance gain for no actual effort.
-
Hello everyone!
I just made a small diff patch that adds lighting to the models in the "popup" window that appears when you click a ship icon in the briefings. This had always kind of (just a little bit) bugged me that they were flat and boring, unlike pretty much everywhere else in the game =)
This is the result of adding like 7 or 8 lines + a conditional compile (#ifdef) that gives the option to leave the code unchanged. Hope to see this in the next version :D :D :D
Is it possible to use this right now? If so, then how is it done?
-
Is it possible to use this right now? If so, then how is it done?
What OS are you using? Do you have the tools to compile from source? (if you're using a unix system such as linux or freebsd, then you probably do)
I'm sure there's a GUI friendly way to accomplish the same, but i use command-line for 90% of what i do. So, assuming you have the source tarball fs2_open_3_7_2_RC4_src.tgz and the patch briefcloseup-lighting.patch in your home's Downloads directory, from a terminal window just untar the source,
cd /tmp && tar xvf ~/Downloads/fs2_open_3_7_2_RC4_src.tgz
apply the patch,
patch -p0 < ~/Downloads/briefcloseup-lighting.patch
this should tell you:
patching file fs2_open_3_7_2_RC4/code/missionui/missionbrief.cpp
...and finally recompile & install the fs2_open binary =)
cd fs2_open_3_7_2_RC4 && ./autogen.sh && ./configure && make && sudo make install
Then to play, in your launcher browse to the fs2_open_3_7_2_RC4 executable (by default it should be in /usr/local/bin) and then click "Run" or "Play" or however your launcher calls it :D
-
If you're on Windows, you can use Visual Studio Community Edition (http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx) to compile the code, and TortoiseSVN (http://tortoisesvn.net/) to acquire the code, or you can use that src.tgz file linked in the previous post. TortoiseSVN is also useful for applying the patch on Windows via a GUI though.
-
Just thought about it, if you're on a Mac (osx) then you probably need to install the xcode stuff to compile programs, but i haven't tested this on a mac. In fact, my experience in developing/compiling on osx is pretty null.
Compiling on windows is possible, as noted by chief1983, but it's a royal pain in the ass in my personal experience.
-
If you're on Windows, you can use Visual Studio Community Edition (http://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx) to compile the code, and TortoiseSVN (http://tortoisesvn.net/) to acquire the code, or you can use that src.tgz file linked in the previous post. TortoiseSVN is also useful for applying the patch on Windows via a GUI though.
Is this something that anyone can do, even if they have never done anything like this before? I mean, this seems to be way over my head.
-
It looks simple enough that we could probably convert it to a command line option placed under experimental and even get it shipped with 3.7.2, so if you'd want to wait for someone to make that happen, you won't need to worry about it. But we do have some getting started guides that can halfway decently walk you through compiling the code yourself if you can't wait, and the #scp IRC chat room would be very helpful at generally any time of day if you wanted some direction in that regard. Getting your own build running can be kind of rewarding in my experience, tackling the build process after they moved to SVN was what got me into the SCP in the first place :)
-
It looks simple enough that we could probably convert it to a command line option placed under experimental and even get it shipped with 3.7.2, so if you'd want to wait for someone to make that happen, you won't need to worry about it. But we do have some getting started guides that can halfway decently walk you through compiling the code yourself if you can't wait, and the #scp IRC chat room would be very helpful at generally any time of day if you wanted some direction in that regard. Getting your own build running can be kind of rewarding in my experience, tackling the build process after they moved to SVN was what got me into the SCP in the first place :)
Oh. Nah, I'll just wait and see if it gets shipped with 3.7.2.
I'm only here because I couldn't stand not playing FS2 anymore, so I finally searched for "FreeSpace 2 in Windows 7 x64" (which is among the best computer-related decisions I've ever made). So, I'm strictly a user.
-
It looks simple enough that we could probably convert it to a command line option placed under experimental and even get it shipped with 3.7.2, so if you'd want to wait for someone to make that happen, you won't need to worry about it. But we do have some getting started guides that can halfway decently walk you through compiling the code yourself if you can't wait, and the #scp IRC chat room would be very helpful at generally any time of day if you wanted some direction in that regard. Getting your own build running can be kind of rewarding in my experience, tackling the build process after they moved to SVN was what got me into the SCP in the first place :)
I would even tie that same command-line to the lighting in tech rooms. I wouldn't be surprised if someone just decided to change the lighting there and didn't think to copy it to the briefing popup.
Could someone post a screenshot comparison between a briefing popup with delt's patch applied and one without?
-
Without:
(http://www.deimos.ca/miscjunk/fs2open-screenshots/without.png)
With:
(http://www.deimos.ca/miscjunk/fs2open-screenshots/with.png)
/* edit */ Looking at these screenshots again, just a still image doesn't do it much justice.... the difference is a LOT more obvious when you see it moving.
-
I would even tie that same command-line to the lighting in tech rooms. I wouldn't be surprised if someone just decided to change the lighting there and didn't think to copy it to the briefing popup.
What tech room lighting command line option? I seemed to recall there having been one of those as well, but can't find it now.
-
There isn't one. I meant that if someone adds a command-line option to control briefing lighting, he may as well tie it to tech room lighting too.
-
Ah, but I was only suggesting this as something temporary to prevent it from having any adverse effects that we might not catch. By the next release I'd be fine with it being the default behavior as long as it doesn't seem to cause any crashes. That's why I suggested placing it under experimental, where it would hopefully soon move. I'm not trying to add a new flag permanently here, we try to avoid that these days.
-
There are briefing screen models?! =-O
And yes, I agree that looks better :)
-
Delt, any reason why the added Glowpoint_use_depth_buffer = false; line is outside of the #ifdef...#endif block?
-
Oops... yeah, that's a mistake. Sorry about that!
-
Ok, here's my suggested patch that seems to work on my end. Feel free to suggest any other tweaks to it (commenting adjustments, etc) and I'll see that it gets committed.
[attachment kidnapped by pirates]
-
Well, here's one formatted for SVN. Applies much more nicely than the git one with standard patch.
[attachment kidnapped by pirates]
-
Ok thanks, i'll test it later today.
-
FWIW, it should just be your code wrapped in a command line flag, that is found under 'Experimental', instead of wrapped in an #ifdef check.
-
Yeah agreed. Sorry i've been busy with other stuff today, but i'll implement that as soon as i get the chance, and see if i can add the corresponding option in wxlauncher. (can't do anything about windows launchers tho)
-
Yeah agreed. Sorry i've been busy with other stuff today, but i'll implement that as soon as i get the chance, and see if i can add the corresponding option in wxlauncher. (can't do anything about windows launchers tho)
The launchers get the list of flags from FSO; adding the option to the launcher is the point of this line:
{ "-brief_lighting", "Enable lighting on briefing models", true, 0, EASY_DEFAULT, "Experimental", "http://www.hard-light.net/wiki/index.php/Command-Line_Reference#-brief_lighting", },
-
Yeah I mean, I think my patch is ready to commit as is, just making sure there wasn't anything else you wanted to adjust on it.
-
I think it's fine this way, thanks chief1983!