aawadall / Game-Off-2018

a Game Off 2018 project
https://aawadall.github.io/Game-Off-2018/
MIT License
0 stars 1 forks source link

Switch Unity to .NET Core #9

Closed aawadall closed 5 years ago

aawadall commented 5 years ago

To target cross platform, we need to compile using .NET Core

freddiewpayne commented 5 years ago

@aawadall I'm not sure if this is possible. I found this page that describes what profiles Unity can work on:

https://docs.unity3d.com/Manual//dotnetProfileSupport.html

At the moment, I'm using .NET Standard 2.0 for API compatibility. The only alternative Unity gives me is 4.x which doesn't seem to be more compatible (although, I really don't know a lot about this)!

aawadall commented 5 years ago

I found the following link @ Stack Overflow hopefully there is a way to make this work

aawadall commented 5 years ago

@Fredster64 do you think it would be suicide to pivot Client Code to JavaScript? we can keep Game Server running on C#

freddiewpayne commented 5 years ago

@aawadall to be honest I'm not entirely sure what that would entail - I should add that I don't know any JavaScript (and also I can only use C# scripts in Unity) so if it would involve me having to use JavaScript then I don't think I'd be much help.

If not, then I say go for it - what's to lose?

aawadall commented 5 years ago

@Fredster64 or we could compile client code on Windows and forget about Linux for the timebeing

freddiewpayne commented 5 years ago

@aawadall I'd personally be more comfortable with that for now. The Windows build I did (in Unity) on my system came out with no errors so at least we could get something that works. Shall I attach a Windows build (which would come out an an .exe file) to the GitHub project so that you can test it out?

aawadall commented 5 years ago

@Fredster64 that would make sense except that I'll watch the outcome without real contribution from my side (no Windows machine available).
I can do some code review and documentation. And do some sprite design.

freddiewpayne commented 5 years ago

@aawadall I'll do my best to keep you updated, with screenshots and videos and stuff. Are there any platforms (aside from Linux) that I could build to if you wanted to have a look, such as WebGL?

As I said, I'll try and let you know how it's going as much as I can. For now, the thing I need most is probably sprites (for different objects in the lab, and for different creature classes/hybrids). If it's okay I'll probably ask you to make some coding solutions for certain things (just like you did with the creatures, which by the way was great)?

aawadall commented 5 years ago

Thanks if you did not create an account with Appveyor you can create some build on a windows machine, this can make things easier for an auto build backed development

freddiewpayne commented 5 years ago

Okay, so you'd rather I use Appveyor than Unity's in-built tools to make Windows builds?

aawadall commented 5 years ago

it would make better control for the workflow we might have one more unity developer joining us soon

freddiewpayne commented 5 years ago

Okay cool

freddiewpayne commented 5 years ago

https://ci.appveyor.com/project/Fredster64/game-off-2018

I seem to be having the same problem as before - namely, that certain references and packages used by Unity can't be found by the builder. Bringing these packages into the repository doesn't seem like a good solution because it would basically mean having to carry every Unity package...

aawadall commented 5 years ago

@Fredster64 that's the same issue we had with linux you might need to install dependencies first and use their location in your project file or you can create environment variables and use them while compiling your code

laukaho commented 5 years ago

Hi guys, could I know more about the current situation? Is that the Unity build is not workable on Linux platform?

freddiewpayne commented 5 years ago

@laukaho pretty much, as far as I understand it. I made a Unity build for Linux at an early stage in the project (that's still in the repo) and, when we tried to run it on a Linux system, it came up with numerous error messages.

The errors (again, as far as I understand) were that we were missing assembly references for Unity namespaces and objects, etc.

Aawadall tried to build the project with Travis CI but to no avail.

laukaho commented 5 years ago

@Fredster64 I have just fork the repository with latest commit and try to build a linux executable in Unity. It works on my ubuntu without any error.

laukaho commented 5 years ago

screenshot from 2018-11-06 09-06-49

aawadall commented 5 years ago

:clap: @laukaho that's excellent can you create a PR with your change and the commands you used to build?

laukaho commented 5 years ago

@aawadall I did change nothing. I just build it through Unity Build Setting. I have not used Travis CI to build it.

aawadall commented 5 years ago

did you install unity and mono on your machine?

laukaho commented 5 years ago

You mean my Ubuntu?? No, I did not install unity or mono on my ubuntu.

aawadall commented 5 years ago

weird

aawadall commented 5 years ago

@laukaho So how did you build your code? ❓

freddiewpayne commented 5 years ago

@laukaho Excellent news! :)

I tried the same thing a couple of days ago (the build I made is called TestBuild in the repo, in the code directory I think) - out of interest do you have any problems running that Linux build on your machine?

aawadall commented 5 years ago

@Fredster64 so we might skip building unity code and use binaries built directly by unity editor

can you review the pull request so we can merge into master and resume from there?

freddiewpayne commented 5 years ago

@aawadall Just merged :)

I'll work on the Unity Project in the GameDesign branch and merge every so often to keep the master branch updated. Regarding builds, I'm happy to use the Unity editor for that.

laukaho commented 5 years ago

@aawadall The linux binary are build from my Mac which have unity and mono. Then, I just changed the build setting to Linux platform and the Architecture to x86_64 (Universal). After that, I just put thoes binaries files to my ubuntu and it works!

@Fredster64 I did not discover any problem so far.

aawadall commented 5 years ago

I believe we now have some solid solution, we can proceed to other problems. one last request, if there is an automated way to test the validity of this build, so we can add to our CI pipeline

Thanks

aawadall commented 5 years ago

I believe this issue has been resolved, thanks @Fredster64