Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: ScottFreeCapital on April 13, 2015, 08:21:54 am

Title: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 08:21:54 am
Hey all,

I'm a developer during my normal job and over the weekend I got curious enough about FSO to checkout the code from SVN (or for those not familiar with code: I just downloaded the code to see it). Honestly, there are a million questions that I was not able to immediately answer from looking at it, and some of it was vaguely explained just because I know the game. I was most curious about the AI so I took a look and found it's over 15.5 thousand lines long.  :lol:

To the point: have we given any serious consideration to converting the C++ of the FS engine into a form that functions well within Unity or Unreal Engine 4? Unity, in particular, I've been working with for over 2 months with a side project and I've grown to love it, primarily because of the way everything works with components. Granted, you would have a lot of significant challenges, you'd immediately lose FRED2, and C++ does not necessarily just "translate" to C# right away.

But there are a number of huge gains too. Since I'm more familiar with Unity, I'll speak to those advantages:

Having said that, there are a number of disadvantages I could acknowledge right away:

There are probably other things I'm not thinking of as well but considering that Unity/UE4 are totally free and they're both very powerful - I don't think there has ever been a better time to consider such an idea.
Title: Re: FSO to Unity / UE4?
Post by: The E on April 13, 2015, 08:42:00 am
Hi. Yes, I have considered this idea. It's technically possible, but infeasible on the time and money budget that a small hobby project like ours has.

Thing is, FSO is really good at what it does. It has a comprehensive toolset for content creators, it is easy to work with (most of the time, anyway), and there's tons and tons of institutional knowledge of and about it. Switching engines entirely would invalidate all of it, and I wouldn't blame anyone for jumping ship if we did such a thing. Unless, of course, we would produce something that follows the spirit of FSO and can work as a drop-in replacement executable the same way FSO executables do now, but the amount of work required to produce something that can seamlessly and losslessly convert between FSO and Unity/UE is prohbitive.
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 09:54:17 am
It's technically possible, but infeasible on the time and money budget that a small hobby project like ours has.

 :doubt: Oh.

So, what you're telling me is - if I want it to happen I'll have to start on it myself and probably end up making a brand new game in the process. And perhaps spend years on such a project. I might be cool to do that. Maybe.
Title: Re: FSO to Unity / UE4?
Post by: The E on April 13, 2015, 09:57:37 am
Unfortunately, yes.
Title: Re: FSO to Unity / UE4?
Post by: Cyborg17 on April 13, 2015, 10:20:37 am
Fred 2 is a major asset.  It really can't be overstated what a loss that would be to the modding community.  Many Freders can script game events more efficiently than, I've heard, developers with many modern games.
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 10:24:41 am
Fred 2 is a major asset.  It really can't be overstated what a loss that would be to the modding community.  Many Freders can script game events more efficiently than, I've heard, developers with many modern games.

I'm certainly not suggesting getting rid of having a tool like FRED. But it wouldn't be the FRED most people know, I guess, and would be a brand new level design tool built from the ground up (most likely). Or, as E mentioned: you might have a lot of work to do to make everything compatible from older FSO files and things like that.
Title: Re: FSO to Unity / UE4?
Post by: Swifty on April 13, 2015, 12:14:29 pm
I don't think it's worth it. We use Unity at the studio I work at and if you're making a brand new game from scratch, it makes absolute sense to go to Unity.

But Freespace is what it is. It's a game engine with story-driven space combat as it's laser focus. There's no point in using it if you want something else out of it, especially when UE4 and Unity are available for free.
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 12:38:32 pm
I don't think it's worth it. We use Unity at the studio I work at and if you're making a brand new game from scratch, it makes absolute sense to go to Unity.

Yeah, I guess thinking about it a bit more it's kind of like saying "let's make a new space sim in UE4 or Unity" just because FreeSpace is as much its engine as it is its IP, in a way.

Having said that, I think the next thing I'd want to build would be a Unity based space sim game, perhaps as a spiritual successor to FS or something similar. But one project at a time for me, gotta finish this prototype I'm working on first!
Title: Re: FSO to Unity / UE4?
Post by: Swifty on April 13, 2015, 12:55:58 pm
I also found that Unity has been really difficult to work with for large projects. Unity likes to arbitrarily mess with a lot of the variables saved in a scene file so all of a sudden a simple value change in one script component involves like 50 different lines in a scene file being affected. Merge conflicts end up being very frequent the larger your team size gets, not to mention merge conflicts with scene files are very difficult to resolve. At our studio, we had to resort to writing locking/unlocking plugins for Unity. Perhaps they fixed this in Unity 5 but our projects are still on 4 so we have yet to find out.

But yeah, I've thought about making my own commercial space sim with it's own game mechanic twists that couldn't be quickly implemented in Freespace Open because it would break a lot of assumptions the engine is expected to have (Mostly involving mission structure and meta game UI state). At that point, it very well be quicker to just look at the Freespace source for inspiration and code something much more leaner.
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 01:09:05 pm
But yeah, I've thought about making my own commercial space sim with it's own game mechanic twists that couldn't be quickly implemented in Freespace Open because it would break a lot of assumptions the engine is expected to have (Mostly involving mission structure and meta game UI state). At that point, it very well be quicker to just look at the Freespace source for inspiration and code something much more leaner.

Could you elaborate on what you mean by "meta game UI state?"

Honestly, some of the biggest challenges I see being done in an FS like space sim created in Unity and then recreating a bunch of the AI / commanding wingmen, and so on.

And does anyone have any guesses on whether or not UE4 would work easier for larger projects? I know that EVE: Valkyrie, for example, was quickly switched to UE4 from Unity, perhaps because of some of the same reasons.
Title: Re: FSO to Unity / UE4?
Post by: Swifty on April 13, 2015, 01:16:31 pm
When I talk about meta game UI state, I'm talking about main halls, briefing windows, options menus, player select screens. That's all required to have a working Freespace mod. Like say you want to make like a space sim where the missions can be selected with an overworld map like Mass Effect or Destiny. Something like that is braindead simple in Unity or UE4. If you're coding this in Freespace, you have to worry about coding UI state systems that won't screw with the underlying assumptions the engine is expecting about which UI systems and assets need to be resident.
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 01:48:03 pm
I would imagine for Unity and large projects it probably also depends on what kind of game you're actually building. Volition ( :v-old:) in particular has a video on their YouTube channel about constructing good AI that functions efficiently and one of their best tricks is reducing dependency as much as possible. This can be tricky and depending on the gameplay mechanics it can sometimes be downright impossible. With my own RTS design, I actually don't see a way to avoid a fairly thick level of dependency: resource economy, navigation/pathfinding, combat/population levels are all interlinked with each other to form the game itself - damaging one damages everything.

On the other hand - if you have a more modular sort of design and set of gameplay mechanics, this could probably work out well, FreeSpace included. For example, when ships actually have their own mechanisms of navigating instead of a "manager" type code that iterates through objects in the game world to make decisions. This is also easier said than done at times, though, as it usually involves fun things like making raycasts all over the place for each object. If you have a lot going on, that could mean requiring multi-threading to make it efficient. Some of the AI in Saint's Row works this way.

Come to think of it, perhaps such a thing could be used for collision avoidance in FSO. But that's beside the point.

The TLDR of it all: whether Unity works for large projects depends on those individual projects, I'd imagine.
Title: Re: FSO to Unity / UE4?
Post by: AdmiralRalwood on April 13, 2015, 05:26:18 pm
When I talk about meta game UI state, I'm talking about main halls, briefing windows, options menus, player select screens. That's all required to have a working Freespace mod. Like say you want to make like a space sim where the missions can be selected with an overworld map like Mass Effect or Destiny. Something like that is braindead simple in Unity or UE4. If you're coding this in Freespace, you have to worry about coding UI state systems that won't screw with the underlying assumptions the engine is expecting about which UI systems and assets need to be resident.
On the other hand...
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 05:47:00 pm
Does anyone know who did this? This is using FreeSpace assets in a space sim prototype.

Title: Re: FSO to Unity / UE4?
Post by: Phantom Hoover on April 13, 2015, 05:57:28 pm
have you tried actually looking at the profile of the user that uploaded that video
Title: Re: FSO to Unity / UE4?
Post by: procdrone on April 13, 2015, 06:02:05 pm
As far as all of this looks beautiful and Quite optimistic... Won't Interplay rampage on any attempt about FREE game based on their (owned) game?
Title: Re: FSO to Unity / UE4?
Post by: Phantom Hoover on April 13, 2015, 06:03:51 pm
They haven't done so to date and we're already undercutting their sales of FS1 with FSPort, so who knows.
Title: Re: FSO to Unity / UE4?
Post by: AdmiralRalwood on April 13, 2015, 06:09:16 pm
As far as all of this looks beautiful and Quite optimistic... Won't Interplay rampage on any attempt about FREE game based on their (owned) game?
From the video description "...all the ship models and most of the sounds are borrowed from the FS2 SCP Media VPs. I'm using them as placeholders until I get to an advanced enough place where I need to start using my own original placeholders."
Title: Re: FSO to Unity / UE4?
Post by: ScottFreeCapital on April 13, 2015, 06:28:07 pm
have you tried actually looking at the profile of the user that uploaded that video
:lol: :mad2:

I was kind of wondering if it was someone obvious on this forum.

Kind of curious, that's all. I guess if the guy (or gal, I dunno) is making a different game then they're making a different game.
Title: Re: FSO to Unity / UE4?
Post by: burningman2k9 on May 29, 2024, 03:19:46 pm
in case anyone maybe still watching this thread. Im currently working on an ambitious project, part freespace, part 1st person shooter. using unity. i am using freespace as a starting off point, using the space combat kit from the unity asset store. its relatively cheap for what it provides. im working on a way to import freespace mission files right now. then parsing that data to connect to the kits code, like mission objectives and such. not sure if it will work seamlessly (hopeful), but its a start.
Title: Re: FSO to Unity / UE4?
Post by: Colonol Dekker on May 29, 2024, 04:42:41 pm
Although the frewspace engine was released as open source, the game assets are definitely still retail property.
Title: Re: FSO to Unity / UE4?
Post by: burningman2k9 on May 29, 2024, 08:36:27 pm
i know the assets are not free. im testing out using the retail mission files as to make it easier for say anyone that has mods to import or just anyone that wants to use FRED to make missions. as well its also a learning experience for me.