givecredits

Hey! Remember to give credits if you are using some info from here! ;)
Showing posts with label Games. Show all posts
Showing posts with label Games. Show all posts

Sunday, January 29, 2023

Gravi port for macOS (Porting a Unity 4 Game from Windows to macOS)

 Another copypaste, this case is from an old post where i got an old version of a game named Gravi running on mac through Rosetta 2, i could not get to run the latest one, however with some research and effort someone could do it...

Anyways, here is the copypaste:


Consider this thread as part of this other


Other unity windows/linux games may work too


I got an old version of GRAVI running on rosetta2 using the guides from here and here, i tested the old and the newer version of the game, but the newer will crash with a black screen (older was based on unity 4.5.5f1 while the newer would be 2020.3.33f1, the how it works for the unityplayer changes a lot at 2020 and i think it would be a LOT of harder making work games made in newer unity versions.)


but well, the thing is basically the same but you need to move some extra folders:


NOTE: FILE PATHS AND RESOURCES MAY CHANGE ON DIFFERENT UNITY VERSIONS, THIS IS AN EXAMPLE FOR A UNITY 4.5.5F1 GAME


To Download the game write in your web browser "steam://open/console" and open steam, then write on it "download\_depot 247310 247311 5524942055625287734" (only do this if you have gravi on steam)



Pick up the UnityPlayer that you downloaded and copy it to somewhere, show package contents


Move the "Gravi\_Steam\_v1.13b\_Data" Folder to inside "Contents" folder and rename it to simply "Data"


now go inside the Data folder and look for the "Plugins" and "Resources" Folder


then do the next: Copy the Plugins Folder to the main "Contents" folder


go inside the "Resources" Folder that you look before and copy everything inside to the Resources folder that is inside the main Contents Folder


Now you can run the game the most "Natively" (Rosetta) way on your mac :)


also, screenshot (it looks like Blogspot lowered the image quality...)




Tuesday, December 6, 2022

Guide to port 32-bits Mac Unity games to run on 64-bits macOS


Some time ago, i have found a linux article to make windows and mac Unity games run on linux, so i got the idea: ¿Why dont try the same thing but for 32-bits unity games on mac?, when i got a game running, i wrote a guide at AppleGamingWiki and requested it to be added to the main page.... but got deleted, good thing that i found a backup for my guide and reposted it on github.

The topic got ignored a bit, however it started to become more relevant when i posted I Am Bread running on modern macOS, from there other people started updating and porting different games.

This is a copypaste of the same guide that i wrote some time ago, THAT WAS ON GITHUB, anyways, BoggyDigital improved my guide and saved it on github, i was also contributing adding compatible games, expanding the guide, and even adding a Windows/Linux to Mac guide for unity games, all of these can be found HERE.

Now... copypaste:


NOTE: THIS GUIDE IS NOT FOR GAME PIRACY, ONLY USE IT FOR GAMES THAT YOU LEGALLY OWN.


Also this guide was based on a (now deleted) guide to make work mac and windows unity games on linux (what is technically possible with some windows and linux games on mac too, but only with few games).


EDIT: found a backup for the original guide somewhere on internet, contains a list of games that could work too

https://uploads.golmedia.net/uploads/Unity%20Games%20Working%20On%20Linux%20%28User%20Ported%29%20-%20Linux%20Gaming%20Wiki.html

---------------------------------



Some very old Unity games on Steam are 32-Bits only, however, since Unity 4.2, they started supporting 64-Bits apps, and these games that are from Unity 4.2 and above were not made with 64-Bits architecture (maybe because developer ignorance, laziness, or problems while converting to 64-bits), so let's do it on our own.


(This guide is just to replace 32bits UnityPlayer with a 64bits one)




##Checking Game Unity Version##


- Download The Game (obvious)


- Get Into the Game Folder


- Right Click the Game and select "Show Package Contents"


- Search the "data" folder, not every game have it in the same place, if you see that the folder have some "level0, level1..." files, then Open Terminal


- Write: "strings", add an space and Drag the "level0" file into the terminal window, then add: "| head -1" and you should already have the Unity version.


- You will see that the version ends with something like "p1" or "f2", this is important, that indicates some specific versions of this version (yeah), "p" is for patch, and "f" is for final (or just normal version), maybe will be a little more harder to find patched versions, betas, and release candidates


- IF THE UNITY VERSION IS BELOW 4.2, YOU CANT PORT THIS GAME (or at least not using this metod)



Well, now you got the Unity version that the game needs... now you need to download THE SAME Unity version, otherwise, the game simply wont launch.


##Obtaining UnityPlayer##


You can get the unity version you want from the official unity webpage, you dont need a license to download and unpack it (only for using Unity app), however, it looks like they updated some old unity packages to have a 2020 UnityPlayer instead of the needed, and it wont work if we want to port a very old game, so, its recommended to search the file you need on the archive.org wayback machine.


- Download correspondent Unity Version (it may be a pkg file or a dmg)


- For pkg files you can install it.. or extract the contents with terminal or The Unarchiver (or just another software for that), in case that there are other pkg files inside, simply Right Click "Unity.pkg" and "Show Package Contents", then search the "Payload" File and change the name to "Payload.zip", now you can access to Unity app without installing it.


- For dmg simply drag Unity.app to somewhere on your computer, but if it is a pkg file, drag and drop it, and see the step above.


- Now that you have access to Unity application, Right Click it and "Show Package Contents", now you can see files inside Unity app.


- Now you need to enter to "PlaybackEngines" Folder, to "MacStandaloneSupport", and "Variations", (however, if you see a "Source" Folder inside "MacStandaloneSupport" and you find a xcode project file, it looks like you downloaded a package with a modern UnityPlayer, it wont work for needed game, you will need to found original pkg on archive.org wayback machine)


- You will see folders like "macosx64_development_mono" you will prefer to use the "x64_nondevelopment", "universal_nondevelopment" or "arm64_nondevelopment" ones but not the "x32_nondevelopment" one (Note: there are two types of universal apps, one that have "ppc","32bits","64bits" support, and other that have "64bits","arm64" support, the first one can be found on Unity 4.2 and above, but the second one only can be found in modern Unity versions along with the "arm64 only" app, so instead of using the first universal app, you may prefer to simply use the "x64" one)


- Copy your selected folder to somewhere in your computer, Right Click the app inside and select "Show Package Contents", go to "Contents", "MacOS", and you will find the UnityPlayer Binary, copy it to some place on your computer, do the same with the content in "Frameworks" Folder so you can have it close for the next steps


##Replacing Game UnityPlayer##


Time of Truth


Make a backup of your game app so, if you do something wrong, you can retry


Right Click the game app and "Show Package Contets", go to "Contents", "MacOS"


Copy your UnityPlayer Binary inside


Go back and go to Frameworks, copy the files that you got before.


Open terminal, drag "UnityPlayer" in the window, add a space, write "-logfile", add another space, and write "~/Desktop/gamelogfile.txt", run this command everytime you want to run UnityPlayer, so if the app crash/bugs, you can see what to do (sometimes some extra libraries is needed, you can found them inside Unity app, and search on internet for the third-party ones)


If you did all in the right way (and the game is really compatible), Congratulations!!, The game now are running on a modern mac!!, you may like to replace the original game binary inside "MacOS" folder with the UnityPlayer binary and change the name.



Featured Posts

Random skins for DDNet