bradhannah / Ultima5Redux

A mostly true to the original Ultima 5 remake in C# using the original U5 data files.
https://u5redux.wordpress.com/
MIT License
65 stars 7 forks source link

Linux support? #4

Open neuromancer opened 4 years ago

neuromancer commented 4 years ago

Hi!

I'm following the development of Ultima5Redux and it is looking great, keep up the hard work! Can you clarify if you plan to support Linux (and maybe other platforms like MacOS)?.

Thanks!

bradhannah commented 4 years ago

Apologies - just noticed the question. I am currently writing in Unity so Mac and Linux support should be expected :) That was one of the appeals of Unity for me.

Unfortunately I cannot have a public repo for the Unity portion since I use a commercial voxel importer and would be breaking the license to put it up publicly. I keep hoping that a free and OSS version will come out and then I can re-publicize it.

neuromancer commented 4 years ago

Apologies - just noticed the question. I am currently writing in Unity so Mac and Linux support should be expected :) That was one of the appeals of Unity for me.

No problem.

Unfortunately I cannot have a public repo for the Unity portion since I use a commercial voxel importer and would be breaking the license to put it up publicly. I keep hoping that a free and OSS version will come out and then I can re-publicize it.

That's totally understandable. Is it still possible to publish frequent binary releases to test the game in different platforms? (perhaps uploading them to Github Releases?)

bradhannah commented 4 years ago

Man - I looked everywhere for the message about a Linux release and couldn't find you! But here you are :)

I have uploaded the same pre-alpha build to https://github.com/bradhannah/Ultima5Redux-Demos/tree/master/Feb-24-2020 - but haven't been able to test it.

Unfortunately - at a glance - Github releases doesn't support an automated Unity build. I know Unity offers their Unity cloud for such a thing but it requires a monthly fee which is a big no go on an otherwise free project. I am always up for ideas - but sadly because of the very specialized Unity build process I have been stuck.

bradhannah commented 4 years ago

Well I will eat my words- you put on a great path with your question. I did manage to find some awesome code that someone has put together for building Unity on Github with Actions. I did a manual build and it mostly worked. There are some missing textures and odd behavior but at least it is possible. Will keep you posted, but it would seem I could definitely do nightly builds :)

neuromancer commented 4 years ago

That's great news! (I still need a little of time to test your manual builds, but I will definitively do it)

hackerb9 commented 4 years ago

Any updates on how the Linux build is working (or not)?

bradhannah commented 4 years ago

Once this fairly major code update is done I expect to release new Windows, Linux and Mac pre-alpha builds. If you are keen to test then I can definitely reach out to you directly to work out any kinks. I do work in Linux.... but only on servers ;)

On Tue, Sep 22, 2020 at 2:56 PM hackerb9 notifications@github.com wrote:

Any updates on how the Linux build is working (or not)?

โ€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bradhannah/Ultima5Redux/issues/4#issuecomment-696915457, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKBSVVKSQFEC6W3P4SEAZDSHDXMRANCNFSM4KEAUTPA .

hackerb9 commented 4 years ago

I can wait. Thanks!

bradhannah commented 2 years ago

I have a Linux build up there now! https://github.com/bradhannah/Ultima5Redux/releases

It is untested as I don't have any non server Linux VMs to test on. But please let me know ;)

tanabi commented 2 years ago

@bradhannah Hi :) I tested this out and kind of good news / bad news...

Good news is it loaded, and I got to the title screen.

Bad news is, Linux is case sensitive and most (all?) distro's of Ultima 5 unzip in all upper case file names. I think my files are from an original copy of U5 that I made years ago, but I also have the GoG version and as I recall that's all upper case too (Though I'd have to double check that ...)

Windows and Mac don't care, but Linux does. So it couldn't find something (I think data.ovl) because it's actually DATA.OVL on my file system.

Three ways to fix this; way one, say rough darts Linux users, fix your file names (I could write a script that does this if you want to include it), or way 2, if it fails to load in all lower case, try all upper case. Or way 3, use all upper case file names (though this will make problems if anyone has their ultima5 on linux in all lower case for some reason :) )

bradhannah commented 2 years ago

Amazing, I will take a look over lunch - I am sure there is some kind of magic I do ;)

On Mon, Jan 10, 2022 at 11:08 AM tanabi @.***> wrote:

@bradhannah https://github.com/bradhannah Hi :) I tested this out and kind of good news / bad news...

Good news is it loaded, and I got to the title screen.

Bad news is, Linux is case sensitive and most (all?) distro's of Ultima 5 unzip in all upper case file names. I think my files are from an original copy of U5 that I made years ago, but I also have the GoG version and as I recall that's all upper case too (Though I'd have to double check that ...)

Windows and Mac don't care, but Linux does. So it couldn't find something (I think data.ovl) because it's actually DATA.OVL on my file system.

Three ways to fix this; way one, say rough darts Linux users, fix your file names (I could write a script that does this if you want to include it), or way 2, if it fails to load in all lower case, try all upper case. Or way 3, use all upper case file names (though this will make problems if anyone has their ultima5 on linux in all lower case for some reason :) )

โ€” Reply to this email directly, view it on GitHub https://github.com/bradhannah/Ultima5Redux/issues/4#issuecomment-1009031026, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKBSVUQJPAY44LAUD4B3J3UVL76JANCNFSM4KEAUTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

bradhannah commented 2 years ago

I threw something together super quick, so sorry if it's still broken, but should do the trick.

On Mon, Jan 10, 2022 at 12:37 PM Brad Hannah @.***> wrote:

Amazing, I will take a look over lunch - I am sure there is some kind of magic I do ;)

On Mon, Jan 10, 2022 at 11:08 AM tanabi @.***> wrote:

@bradhannah https://github.com/bradhannah Hi :) I tested this out and kind of good news / bad news...

Good news is it loaded, and I got to the title screen.

Bad news is, Linux is case sensitive and most (all?) distro's of Ultima 5 unzip in all upper case file names. I think my files are from an original copy of U5 that I made years ago, but I also have the GoG version and as I recall that's all upper case too (Though I'd have to double check that ...)

Windows and Mac don't care, but Linux does. So it couldn't find something (I think data.ovl) because it's actually DATA.OVL on my file system.

Three ways to fix this; way one, say rough darts Linux users, fix your file names (I could write a script that does this if you want to include it), or way 2, if it fails to load in all lower case, try all upper case. Or way 3, use all upper case file names (though this will make problems if anyone has their ultima5 on linux in all lower case for some reason :) )

โ€” Reply to this email directly, view it on GitHub https://github.com/bradhannah/Ultima5Redux/issues/4#issuecomment-1009031026, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKBSVUQJPAY44LAUD4B3J3UVL76JANCNFSM4KEAUTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

bunnylin commented 2 years ago

I've tried the Jan 10 build; the directories in the package still say 09 Jan, and there's even a BurstDebugInformation_DoNotShip directory in there, maybe unintentionally? It's still not recognising my DATA.OVL with this build, saying it can't find "data.ovl" (and with that file renamed to lowercase, it can't find further files).

tanabi commented 2 years ago

Doesn't look like there was a commit to the repo, so it sort of begs the question did you commit it, etc.? I also tried the build and did an strace (system call trace) and could see it's only looking for the lower case version.

bradhannah commented 2 years ago

Alright - that was clearly rushed ;)

@tanabi - I did make the change but didn't check in my changes like I normally would have. They are in their now. You can see them in Utils.cs:GetFirstFileAndPathCaseInsensitive()

I have uploaded a new build with more careful checking. Fingers crossed! If it fails, then I will move my unit tests over to my Linux VM and hack at it a bit more.

https://github.com/bradhannah/Ultima5Redux/releases/download/Jan-1-2022-Pre-Alpha/UltimaVRedux-Linux-Jan-10-2022.zip

bradhannah commented 2 years ago

@bunnylin @tanabi Hold off on those downloads actually.. my unit tests failed..

bradhannah commented 2 years ago

Third time is a charm! https://github.com/bradhannah/Ultima5Redux/releases/download/Jan-1-2022-Pre-Alpha/UltimaVRedux-Linux-Jan-10-2022-Take3.zip

bunnylin commented 2 years ago

Ok! Now it gets as far as trying to load castle.tlk (and towne.tlk) before failing to load the uppercased files.

tanabi commented 2 years ago

Bunnylin beat me to trying it out. If you need a trace or something let me know, but you probably know what the next thing to do is :)

bradhannah commented 2 years ago

Can you tell me what the error says?

bunnylin commented 2 years ago

"Failure! Could not find file '/mnt/D/Ultima5/castle.tlk'."

tanabi commented 2 years ago

I'll try it as well just in case I get a different result.

bradhannah commented 2 years ago

I cheated and just made all my constants uppercase...

https://github.com/bradhannah/Ultima5Redux/releases/download/Jan-1-2022-Pre-Alpha/UltimaVRedux-Linux-Jan-10-2022-Take4.zip

I've got to be getting close! lol

tanabi commented 2 years ago

I just tried take4 and I get could not find a part of the path:

/home/sconley/UltimaVRedux/quicksave/save.json

Which is a sensible error because I sure didn't make that directory :) I'll make it and see what happens, but it would be a better user experience if it was auto-created.

tanabi commented 2 years ago

.... and after creating that directory I get could not find file /home/sconley/UltimaVRedux/quicksave/save.json which of course makes sense because the file doesn't exist :D Does this only work with existing save files because I don't think I have one.

tanabi commented 2 years ago

Oh importing from init.gam worked, cool. IT looks like I'm in the game now! (sorry for the spam)

bunnylin commented 2 years ago

Yep, that gets into the game. Very nice!

tanabi commented 2 years ago

It is unbelievably slow for me, BUT my linux machine is plugged into a 2K monitor which the game insists on going full-screen on, and I don't have a video card on it so its using onboard graphics that I can assure you are not geared for 2K full screen rendering :D So I'm going to say that's a combination of me and no doubt this is a development build full of debugging flags and whatnot. Very cool to get to see it, well done! :)

bradhannah commented 2 years ago

@tanabi - any chance you could scale down to 1080p and see if it still runs crappy? I am having major performance issues on MacOS too - I have optimized like crazy but nothing seems to solve it. Maybe I will grab a bootable Linux image to give it a test on... funny I hadn't thought of it before you guys messaged ;) What kind of video card are you using? I have a feeling the issues have less to do with CPU and memory and more to do with Unity being difficult!

@bunnylin - how is the performance for you?

bradhannah commented 2 years ago

Oh importing from init.gam worked, cool. IT looks like I'm in the game now! (sorry for the spam)

That was actually one of the last bugs I fixed - the init.gam is NOT in a playable format without tweaking a few values in game

bunnylin commented 2 years ago

Performance is ok on my 2016-grade hardware. Getting into the game from the menu is a bit slow, presumably building shaders or loading models or something; perhaps darkening the screen slightly during that load time would make it obvious something's being loaded, and you wouldn't have to put in a whole progress bar.

Dialogs with scrollbars seem to nearly ignore the mousewheel, however; even aggressive scrolling barely makes the scrollbar shift at all. Is this a Linux-only problem? Mousewheeling does change game view zoom level pretty naturally, so it works fine there at least.

bradhannah commented 2 years ago

I just tried take4 and I get could not find a part of the path:

/home/sconley/UltimaVRedux/quicksave/save.json

Which is a sensible error because I sure didn't make that directory :) I'll make it and see what happens, but it would be a better user experience if it was auto-created.

That is super odd - the routine I use does automatically create the directories on Windows and Mac. I sense not all .net interpreters are acting identitly.

bradhannah commented 2 years ago

Performance is ok on my 2016-grade hardware. Getting into the game from the menu is a bit slow, presumably building shaders or loading models or something; perhaps darkening the screen slightly during that load time would make it obvious something's being loaded, and you wouldn't have to put in a whole progress bar.

Dialogs with scrollbars seem to nearly ignore the mousewheel, however; even aggressive scrolling barely makes the scrollbar shift at all. Is this a Linux-only problem? Mousewheeling does change game view zoom level pretty naturally, so it works fine there at least.

I do know many of my scroll bars are inconsistent - I can file a bug!

As for load times, I haven't because it's usually so quick - but it couldn't hurt. I can file another one for that.

bradhannah commented 2 years ago

Here is a non debug version: https://github.com/bradhannah/Ultima5Redux/releases/download/Jan-1-2022-Pre-Alpha/UltimaVRedux-Linux-Jan-10-2022-Release.zip

Not sure it will make the difference but fingers crossed!

tanabi commented 2 years ago

@tanabi - any chance you could scale down to 1080p and see if it still runs crappy?

Is that a config file somewhere? If you can tell me the name of the file to look for, I'll hunt for it. I looked in the settings menu and didn't see it (which isn't surprising, that's usually the last thing you build when making a game!)

Re. my video card, it's onboard graphics. My display info command returned:

       description: VGA compatible controller
       product: UHD Graphics 620 (Whiskey Lake)
       vendor: Intel Corporation

I don't usually play games on my linux computer, but I have before -- for ex, I can play Tabletop Simulator which is probably more 3D intense than your game and it works okay. But I also don't run it at 2K :)

Re. bootup it does start really slow. For me it shows the unity logo and then it's a grey screen and even my mouse won't move (the computer isn't lagging, I can see perfectly normal activity in my second monitor, it's just the game captures my mouse and doesn't let go). Then after a few moments of this, it lets go of my mouse, but it's still grey. Then a few moments more, and the title screen comes up. Title screen performance is totally normal as you'd probably expect.

I noticed when I was doing my system call trace to look at your file opens that it's doing a lot of file handle opens to do "something" and then waiting on them. I'm not sure what, I didn't look that closely because that wasn't what Iw as interested in at the time. I wouldn't be surprised if slow bootup is Unity Linux specific and its probably doing something "stupid" that you'd face-palm about if you did. I wouldn't worry about the slow boot for now, if it remains a problem later I can help you debug it.

Re. file opening. The problem might be the order in which I did things.

So when U5R first booted, the first thing I tried to do is Journey Onward, but it complained about the missing data directory. So I picked the data directory. Then, I had the aforementioned upper case problem.

After that was resolved, I went back and I hit Journey Onward again and that's when it complained about the file path not existing -- at that point, I created the file path, and still had the problem.

At that point, I figured out I needed to import a legacy save, so I did so, and it worked. I suspect if I imported the legacy save FIRST, it would have created the directories, and because you wrote the software you've never fallen into this particular pitfall because you know exactly how it works.

Anyway, sorry for the long ramble, I just wanted to address everything that's come up without having to make a million comments. I'll try your non-debug version now and see if it does anything different.

tanabi commented 2 years ago

So - performance in release mode.

The first time I started the release build, it hung on the grey screen forever (?!) -- well, forever is harsh, but I gave it about a minute before giving up. I ran it a second time, no changes, and it started slightly faster than debug mode. It did the thing where it held my mouse cursor for a few moments, but instead of letting go of the mouse cursor and staying gray, it went to the title screen reasonably quickly thereafter. To me, the delay is acceptable on bootup now whereas with debug mode it's a little like ...is this thing on? :)

I suspect that Unity is trying to lock some resource on my computer which is why (a) I got a hang, (b) it grabs hold of the mouse and doesn't let go, and (c) when I was tracing it before I could see it was doing "something" file handle-y that seemed to make it wait. It's probably trying to do something it really shouldn't be doing is my guess :) I wouldn't put too much work into figuring this out though, seriously, it feels like a rabbit hole and you don't have to do that right now.

The game itself also performed MARGINALLY better ...it's still not "playable". Basically you move over grass at about the speed the avatar would move over hills. Really slow and chunky. But one thing that was happening in debug mode, is the graphics rendering wasn't always keeping up. Like, the Avatar would move, and I'd see a brief moment of graphics out of alignment or something -- I have a really hard time explaining it, but it was obviously a "your computer is really not up for this" kind of thing.

However, in the release build, I didn't get any of that. The motion was smooth, the animation seemed correct, its just actually moving and scrolling the screen is very slow.

So it doesn't fix the problem, but it does improve it. I think Release build + running at a reasonable resolution and NOT 2k (which my computer is definitely not up for) would probably resolve my slowness issues (fingers crossed)

bradhannah commented 2 years ago

When it ran poorly on MacOS I thought it was a just a temp thing - but now with Linux too... I am going to test reverting to a simpler rendering pipeline (URP) and see if that helps. I only upgraded to the heavy HDRP because URP limited the number of lights that could be lit at once in a scene, which broke some rooms likes blackthorne, but they have upped the number and I have some new optimizations that will reduce the number too.

@tanabi as for the workflow when starting - I will tweak that for sure. Journey Onward should basically be disabled if there are no save game files. Maybe a temp "start new game" which snarfs in the init.gam may do the trick. Maybe even automatically saving the first quicksave once it's loaded for simplicity!?

bradhannah commented 2 years ago

Also thanks 10000000x for the thorough testing so far! It's super scary, but I've been in my dang bubble too long :)

Next up in my milestone is an automatic build process that builds these regularly automatically.

tanabi commented 2 years ago

Also thanks 10000000x for the thorough testing so far! It's super scary, but I've been in my dang bubble too long :)

Next up in my milestone is an automatic build process that builds these regularly automatically.

No problem -- I am glad to finally have something to contribute. Unfortunately, U5R is in a language I don't know (though certainly its encouraging me to learn it) otherwise I would have offered more in-depth help. It's a project I'm really excited about and thank you for trudging on so valiantly on your own here :)

hackerb9 commented 2 years ago

Trying it out on an old Haswell laptop. Sometimes when I run it I just get a gray screen after the Unity logo, sometimes I get the menu, but I am not able to choose any of the options. It is not using much CPU at all. Perhaps it's a GPU issue? After successfully opening the GPU and compiling the shaders, the end of ~/.config/unity3d/WellThisIsFunSoftware/Ultima5Redux3D/Player.log says this:

MESA-INTEL: warning: Haswell Vulkan support is incomplete

VULKAN DEBUG: ERROR:  [anv, 0]: ../src/intel/vulkan/anv_device.c:3313: GPU hung on one of our command buffers (VK_ERROR_DEVICE_LOST)
MESA-INTEL: error: ../src/intel/vulkan/anv_device.c:3313: GPU hung on one of our command buffers (VK_ERROR_DEVICE_LOST)

Other Unity games have played fine on this laptop, but that was years ago. I'll have to try U5R on a newer machine.

bradhannah commented 2 years ago

I should have a new lighter build tonight to try if you guys are keen to compare. Fingers crossed.

On Tue, Jan 11, 2022 at 10:41 AM hackerb9 @.***> wrote:

Trying it out on an old Haswell laptop. Sometimes when I run it I just get a gray screen, sometimes I get the menu, but I am not able to choose any of the options. It is not using much CPU at all. Perhaps it's a GPU issue? After successfully opening the GPU and compiling the shaders, the end of ~/.config/unity3d/WellThisIsFunSoftware/Ultima5Redux3D/Player.log says this:

MESA-INTEL: warning: Haswell Vulkan support is incomplete

VULKAN DEBUG: ERROR: [anv, 0]: ../src/intel/vulkan/anv_device.c:3313: GPU hung on one of our command buffers (VK_ERROR_DEVICE_LOST) MESA-INTEL: error: ../src/intel/vulkan/anv_device.c:3313: GPU hung on one of our command buffers (VK_ERROR_DEVICE_LOST)

Other Unity games have played fine on this laptop, but that was years ago. I'll have to try U5R on a newer machine.

โ€” Reply to this email directly, view it on GitHub https://github.com/bradhannah/Ultima5Redux/issues/4#issuecomment-1010087568, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKBSVSJ6VMWWTBDMBBY77TUVRFSBANCNFSM4KEAUTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>

hackerb9 commented 2 years ago

๐Ÿคžแšดแšขแ›แ›แ›–แ›ซแ›ฑแ›แšพ

bradhannah commented 2 years ago

Hey guys, here are some kinda broken early URP conversions. https://github.com/bradhannah/Ultima5Redux/releases/tag/Jan-11-2022-PreAlpha

They SHOULD be much faster! There is lots of broken stuff still, so I'm more curious about the performance if you wouldn't mind checking.

tanabi commented 2 years ago

The URP version boots up quickly and runs totally fine for me even at 2K :) So, for me it works great.

bradhannah commented 2 years ago

Trying it out on an old Haswell laptop. Sometimes when I run it I just get a gray screen after the Unity logo, sometimes I get the menu, but I am not able to choose any of the options. It is not using much CPU at all. Perhaps it's a GPU issue? After successfully opening the GPU and compiling the shaders, the end of ~/.config/unity3d/WellThisIsFunSoftware/Ultima5Redux3D/Player.log says this:

MESA-INTEL: warning: Haswell Vulkan support is incomplete

VULKAN DEBUG: ERROR:  [anv, 0]: ../src/intel/vulkan/anv_device.c:3313: GPU hung on one of our command buffers (VK_ERROR_DEVICE_LOST)
MESA-INTEL: error: ../src/intel/vulkan/anv_device.c:3313: GPU hung on one of our command buffers (VK_ERROR_DEVICE_LOST)

Other Unity games have played fine on this laptop, but that was years ago. I'll have to try U5R on a newer machine.

Hoping the new URP build takes care of this issue. It's a far less GPU taxing renderer.

hackerb9 commented 2 years ago

Crossing fingers seemed to have worked! I was able to run Redux on that old Haswell laptop. Huzzah!

A few notes

On UNIX systems, it is considered impolite to write files directly into the user's home directory (/home/bradhannah, but often just abbreviated to ~). In the past, apps would make hidden "dotfiles", but in the last ten years the XDG Base Directory standard has become common. Unity already uses that standard for its own cache and config files. (For example, ~/.config/unity3d/WellThisIsFunSoftware/Ultima5Redux3D/prefs contains Unity's preferences for the game, such as resolution and which monitor to display on.)

I see that other Unity games correctly use ~/.local/share for their save files, so I would not be surprised if Unity provides some way to get the correct savefile directory for any OS. For example, this is what I see for Lovers in a Dangerous Spacetime:

$ ls ~/.config/unity3d/AsteroidBase/LoversInADangerousSpacetime/
Player.log  prefs
$ ls ~/.local/share/LoversInADangerousSpacetime/
save.dat  settings.dat

All those minor issues aside, I'm happy to be able to see Ultima V in 3D. Great work!

bradhannah commented 2 years ago

Just a heads up, you can turn off "Free Move" in the F2 menu, which will enforce boundaries :)

Thank you for the details - will take a look tonight to absorb them properly!

On Wed, Jan 12, 2022 at 11:56 AM hackerb9 @.***> wrote:

Crossing fingers seemed to have worked! I was able to run Redux on that old Haswell laptop. Huzzah!

A few notes

  • It started up quickly and (unlike before) I could see that flames were animated.
  • The Player.log still shows the warning that Haswell Vulkan support is incomplete, but no longer has the "GPU hung" error.
  • It appeared to be single threaded, using up 100% CPU on one core, but leaving the others idle.
  • After importing from a legacy save, my avatar does not change position until I exit Iolo's hut, making me seem invisible.
  • When I reenter Iolo's hut, the avatar moves correctly.
  • I presume my ability to walk on water is due to this being a debug build, right?
  • As others have pointed out, the quicksave directory had to be created manually.
  • The location of quicksave in ~/Ultima5Redux/quicksave/ is incorrect. It should be in ~/.local/share/Ultima5Redux/ (see below)

On UNIX systems, it is considered impolite to write files directly into the user's home directory (/home/bradhannah, but often just abbreviated to ~). In the past, apps would make hidden "dotfiles", but in the last ten years https://news.ycombinator.com/item?id=4331969 the XDG Base Directory standard has become common. Unity already uses that standard for its own cache and config files. (For example, ~/.config/unity3d/WellThisIsFunSoftware/Ultima5Redux3D/prefs contains Unity's preferences for the game, such as resolution and which monitor to display on.)

I see that other Unity games correctly use ~/.local/share for their save files, so I would not be surprised if Unity provides some way to get the correct savefile directory for any OS. For example, this is what I see for Lovers in a Dangerous Spacetime:

$ ls ~/.config/unity3d/AsteroidBase/LoversInADangerousSpacetime/ Player.log prefs $ ls ~/.local/share/LoversInADangerousSpacetime/ save.dat settings.dat

All those minor issues aside, I'm happy to be able to see Ultima V in 3D. Great work!

โ€” Reply to this email directly, view it on GitHub https://github.com/bradhannah/Ultima5Redux/issues/4#issuecomment-1011254608, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKBSVUFGPB6MADJP733BW3UVWXCFANCNFSM4KEAUTPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>

bunnylin commented 2 years ago

Yep, build looks to run fairly well.

My view about config and data files is that they should first go in the program's own directory and never touch anything outside it, so it's neatly contained. Like in the good old DOS days! But if the directory is write-protected for security, then stick runtime-modified files in .config/programname/ or %APPDATA%\programname. Not exactly what the standards recommend, but easy to grok.

hackerb9 commented 2 years ago

Hoping the new URP build takes care of this issue. It's a far less GPU taxing renderer.

Just for fun, tried out the HDRP build ("take4") on a newer Linux system and it worked fine. No noticeable slowness. (Threadripper 3960X 24-Core Processor, Radeon RX 580).

Bunnylin wrote:

My view about config and data files is that they should first go in the program's own directory and never touch anything outside it, so it's neatly contained. Like in the good old DOS days!

While that makes some sense โ€” especially for a retro-remake like this โ€” I've never seen a Unity program do that. They all seem to follow the standards. I notice that Unity's PlayerPrefs system saves to the correct directory automatically. It looks like you can also call Application.persistentDataPath to get a directory where persistent data may be stored in an OS agnostic way.

...

[Minor update: Bug where it looks like one is invisible until leaving Iolo's hut still occurs when using the HDRP build. Possibly it's something with how I'm initializing the game. I'm using "Import from Legacy Save" and then choosing INIT.GAM.]