News for hackers. Stuff that matters.
Re:Valve releases Team Fortress 2 game code by chefandy on Wednesday February 19, 2025 @12:14AM (#43098823)
I wonder how UE manages it. It compiles for consoles but you can download and modify the engine source. The license isn’t open but you can still get the source.
Re:Valve releases Team Fortress 2 game code by arduinomancer on Wednesday February 19, 2025 @01:53AM (#43099340)
Not sure about UE but I’ve worked on other engines and usually you just have an interface that abstracts platform APIs and each platform implements the same interface

The implementations get compiled in based on whatever platform you’re compiling for using a bunch of #ifdef statements

In that case it’s just a matter of not including certain .h/.cpp files

Re:Valve releases Team Fortress 2 game code by jsheard on Wednesday February 19, 2025 @09:41AM (#43102617)
The source you can easily get access to doesn't include any of the console stuff, you have to prove you're licensed to develop on those consoles to get access to that code.
Re:Valve releases Team Fortress 2 game code by chefandy on Thursday February 20, 2025 @12:10AM (#43111339)
Makes sense. Definitely something valve would have to deliberately set up and it probably would be more complicated than it seems at the outset.