ZGE on Mac
Moderator: Moderators
ZGE on Mac
Edit: the latest alpha build is attached here.
----
I'm looking at making the ZGE editor available on Mac. Previously only the runtime engine works on Mac but this is an attempt at making the whole editor working.
The main problem with porting the editor is that it depends on the Delphi VCL which is specific for Windows. However there is a similar library called LCL available in the open source tool Lazarus that use the Freepascal compiler, and that library is cross-platform.
Here is a screenshot at what can be described as a early alpha build. There are many features still missing: OpenGL is only working in separate window, the icons are distorted, there is no script editor yet or any sound. But at least it starts up and is operational which I consider a success for now
I hope to continue working on this so I can provide a download when it has reached a more stable state. The sources are in a "lcl" branch on github if anyone is interested.
----
I'm looking at making the ZGE editor available on Mac. Previously only the runtime engine works on Mac but this is an attempt at making the whole editor working.
The main problem with porting the editor is that it depends on the Delphi VCL which is specific for Windows. However there is a similar library called LCL available in the open source tool Lazarus that use the Freepascal compiler, and that library is cross-platform.
Here is a screenshot at what can be described as a early alpha build. There are many features still missing: OpenGL is only working in separate window, the icons are distorted, there is no script editor yet or any sound. But at least it starts up and is operational which I consider a success for now
I hope to continue working on this so I can provide a download when it has reached a more stable state. The sources are in a "lcl" branch on github if anyone is interested.
- Attachments
-
- ZGameEditor.app_alpha9e.zip
- (7.24 MiB) Downloaded 443 times
-
- Skärmavbild 2022-03-09 kl. 13.27.02.png (1.5 MiB) Viewed 45314 times
Re: ZGE on Mac
It already looks like ZGE! It's even kind of stylish with monotone icons
Re: ZGE on Mac
Here is first alpha build.
I'm posting this mostly to see if rrTea can open it at all
Note:
- This is very early and most things do not yet work.
- This is a Intel build so if using on M1 Mac then it requires Rosetta 2 to be installed.
- You may need to enable running applications downloaded from internet in Mac OS Settings - Security.
What works:
- Opening and saving projects.
- Using the "Project - Build Mac OS binary" option. The generated binary can be run on its own without any SDL dependency. It can read mouse input but not yet keyboard input. It doesn't fully close when closing main window so the attached terminal window needs to be closed manually.
Image shows ZGE running on M1 Macbook Air with a generated binary running CleanseCube example.
I'm posting this mostly to see if rrTea can open it at all
Note:
- This is very early and most things do not yet work.
- This is a Intel build so if using on M1 Mac then it requires Rosetta 2 to be installed.
- You may need to enable running applications downloaded from internet in Mac OS Settings - Security.
What works:
- Opening and saving projects.
- Using the "Project - Build Mac OS binary" option. The generated binary can be run on its own without any SDL dependency. It can read mouse input but not yet keyboard input. It doesn't fully close when closing main window so the attached terminal window needs to be closed manually.
Image shows ZGE running on M1 Macbook Air with a generated binary running CleanseCube example.
- Attachments
-
- Skärmavbild 2022-03-17 kl. 14.48.09.png (2.37 MiB) Viewed 45248 times
Re: ZGE on Mac
Yes I can open and run it! I was able to load CleanseCube and run it both from ZGE and make a build. Some warnings were popping up in the process but I guess it's nothing unexpected (although one of the errors did sound a bit scary, warning me that I might end up with corrupt data). I did take screenshots of all the warnings if that's of any help.
Some of my old and super simple projects (20 lines of code) work too, while some slightly bigger projects failed to load (maybe because I was using some Windows specific features).
Some of my old and super simple projects (20 lines of code) work too, while some slightly bigger projects failed to load (maybe because I was using some Windows specific features).
Re: ZGE on Mac
Great, thanks for testing!rrTea wrote: ↑Thu Mar 17, 2022 4:28 pm Yes I can open and run it! I was able to load CleanseCube and run it both from ZGE and make a build. Some warnings were popping up in the process but I guess it's nothing unexpected (although one of the errors did sound a bit scary, warning me that I might end up with corrupt data). I did take screenshots of all the warnings if that's of any help.
Some of my old and super simple projects (20 lines of code) work too, while some slightly bigger projects failed to load (maybe because I was using some Windows specific features).
If you get weird warnings or crashes then please let me know how to reproduce it or post screenshots.
Perhaps your larger projects that failed to load use external DLLs? Then you need to find Mac versions of those libraries. I might be able to help with that if you tell me what libraries are needed. If they don't require libraries then please send me such a project so I can investigate.
Re: ZGE on Mac
I usually used SunVOX DLL for sound and Windows IME handler (to prevent Microsoft Chinese IME from grabbing focus during the game). So this should not be a problem, I'll just try to turn it off.
After I downloaded ZGE I just left it in the default Download folder and launched it from there. Should I try to move it to a particular folder instead?
Here are some errors I got while testing, let me know if any of these look like I should investigate it further:
After I downloaded ZGE I just left it in the default Download folder and launched it from there. Should I try to move it to a particular folder instead?
Here are some errors I got while testing, let me know if any of these look like I should investigate it further:
Re: ZGE on Mac
I know launching programs with ZGE was not listed under "What works" (so probably too early for that) but I tried running demo projects anyway just out of curiosity, and quite a few of them work (some almost perfectly)! So that's great!
Re: ZGE on Mac
It looks like it has problems saving the settings file. This does not happen here. Maybe try moving the application to Application folder or to desktop and see if it makes a difference.
Re: ZGE on Mac
ok I moved it to desktop, yes this helps!
Re: ZGE on Mac
New alpha on top:
- Fixed possible file corruption when saving projects with binary properties (such as BitmapFromFile)
- F9 now works to build and launch project
Still no keyboard support though, hope to fix that soon.
- Fixed possible file corruption when saving projects with binary properties (such as BitmapFromFile)
- F9 now works to build and launch project
Still no keyboard support though, hope to fix that soon.
Re: ZGE on Mac
Alpha 3 on top:
When generating binary then ZGE will create an application bundle for your project. This is required for an application to receive keypresses.
So if your project is named "test.zgeproj" then it will create the application bundle "test.app". This can be started in Finder as a separate application.
Note that if your binary requires any external files then you need to place those inside the bundle. Right-click on bundle in Finder and choose "Show bundle content". Then browse to Content/MacOS subfolder and place your files there.
When generating binary then ZGE will create an application bundle for your project. This is required for an application to receive keypresses.
So if your project is named "test.zgeproj" then it will create the application bundle "test.app". This can be started in Finder as a separate application.
Note that if your binary requires any external files then you need to place those inside the bundle. Right-click on bundle in Finder and choose "Show bundle content". Then browse to Content/MacOS subfolder and place your files there.
- Attachments
-
- Skärmavbild 2022-03-23 kl. 11.17.09.png (50.91 KiB) Viewed 45178 times
Re: ZGE on Mac
Just to confirm it works on my end. The initial stutter on freshly generated builds is now completely gone (at least the ones I tried) and even the builds that were causing problems (in alpha 2) are now built normally.
Re: ZGE on Mac
Struggling a bit with how to avoid the detached OpenGL windows. There seems to be a problem with LCL, OpenGL and sharing contexts between views. No new alpha this week but trying again next week!
Re: ZGE on Mac
Hi everyone! It was several years ago since I was here last, but I have been following ZGE on Github and noticed the Lazarus branch. Does this mean it would work on Linux too eventually? A native Linux version and I would definitely pick up working in ZGE again.
Re: ZGE on Mac
It would at least make it much easier to port to Linux, yes . But I would need help with the details since I currently do not have a Linux environment configured.