Blecki / dwarfcorp

An open-source 3D colony management game for PC, Mac and Linux
http://www.dwarfcorp.com
Other
580 stars 71 forks source link

FNA and the supported development platforms #539

Closed ShalokShalom closed 6 years ago

ShalokShalom commented 6 years ago

See here: https://github.com/FNA-XNA/FNA/issues/152 How do you see this?

Blecki commented 6 years ago

Not sure what this has to do with us... Guy commenting there is right. Fna is definitely not windows specific. Any new project should use monogame anyway.

ShalokShalom commented 6 years ago

Your readme tells it is Windows specific: https://github.com/CompletelyFairGames/dwarfcorp#cross-platform-development

ShalokShalom commented 6 years ago

Your colleague as well: https://github.com/CompletelyFairGames/dwarfcorp/issues/140

Why Monogame instead?

Blecki commented 6 years ago

As far as I know, that's correct - you can only BUILD on Windows. Fna runs everywhere, however.

mklingen commented 6 years ago

FNA is a complete rewrite of XNA for Mono. However it's missing one critical piece of the XNA pipeline: content projects.

We require the use of an XNA content project (DwarfCorpContent). As far as I know, content projects are only supported on Windows using XNA. Here's how our linux builds work:

1) XNA content project is compiled on Windows, producing .xnb files. 2) FNA project copies the .xnb files from the Windows build. 3) FNA project is compiled for Mono and packaged alongside the .xnb files from the content project. 4) The build is distributed for Linux/Mac.

I bet that if you got the xnbs compiled on windows, you'd be able to compile the FNA version of DwarfCorp on Linux or Mac, but I have not tried.

mklingen commented 6 years ago

See this issue for why we can't compile content projects on Linux or Mac:

https://github.com/FNA-XNA/FNA/issues/126

mklingen commented 6 years ago

Updated readme to make this clearer.

ShalokShalom commented 6 years ago

How easy is it to change this content pipeline? I guess there are other obvious benefits as well? http://flibitijibibo.com/xnacontent.html Thanks for changing the README :)

Blecki commented 6 years ago

Actually, a port to monogame - which must happen if I ever want to make my dream of a switch port a reality - would replace it.

ShalokShalom commented 6 years ago

Where are the benefits of Monogame in your opinion?

Blecki commented 6 years ago

Wouldn't need to use xna and fna. Content builds more places. Generally more maintained library. And it runs on switch.

ShalokShalom commented 6 years ago

Do you see any downsides on Monogame?

Blecki commented 6 years ago

Yeah I'd have to port it.

mklingen commented 6 years ago

Ethan is right that the content pipeline is bad, but we don't have the resources at the moment to dedicate to a rewrite of that pipeline. Also a Monogame port would probably be great ... if we could dedicate the time to do it.

Blecki commented 6 years ago

Most of the content pipeline is currently not needed anyway.

a) The engine will load png and jpg images just fine.

b) Almost everything else exists as json or plain text files.

The gap is, I believe, sound - I'm not aware of anything in place to load them if they aren't built to an xnb.

ShalokShalom commented 6 years ago

Well, in order to make it buildable from macOS and Linux?

Blecki commented 6 years ago

Load sounds directly? I dunno what else.

ShalokShalom commented 6 years ago

Ethan sais also that a proper developer can write something new and sane within a week.

Blecki commented 6 years ago

K.

mklingen commented 6 years ago

Biggest headache would be writing a new importer for the shaders. Primary reason I'm using FNA in the first place is that I don't trust Mojoshader.

mklingen commented 6 years ago

If we wanted to, we could restructure the project following something like this: https://github.com/AndrewRussellNet/FNA-Template then it would be mostly possible to build on Linux and Mac and would just require the user to install direct X SDK over Wine.

ShalokShalom commented 6 years ago

I guess a full rewrite to Monogame is critical, since much more work as a simple replacement of content projects? You might like to read this: https://github.com/FNA-XNA/FNA/issues/154

Blecki commented 6 years ago

Switch support in fna pretty much removed my desire to port to monogame.

When I tried a port a year ago, however, the monogame version blew the fna version away performance wise. Much less of an issue these days, but still.

mklingen commented 6 years ago

It's something we should come back to in the future. At the moment cross platform development support is not a huge priority for me. Nor is supporting builds on any platform other than Linux, Mac and Windows PCs.

ShalokShalom commented 6 years ago

Well, I guess that includes there are already enough developers on board?

mklingen commented 6 years ago

If you or anyone else would like to contribute to the project we'd be happy to take pull requests. We might even pay you.

ShalokShalom commented 6 years ago

You are quite aware that the overwhelmingly amount of developers sitting on macOS and Linux based devices?

mklingen commented 6 years ago

Yes obviously I'm aware many developers prefer a Linux or Mac development environment. If you're passionate about developing on Linux, the project is open source and you're free to try to get it compiling yourself. If you share your findings I'd be glad to merge a pull request that makes this possible.

Like I said it's something I may eventually want to do, but other priorities (like "the game is playable and has features") are currently higher.

ShalokShalom commented 6 years ago

The game is playable and has features is probably easier to reach with more developers