Grid Sage Forums

Grid Sage Forums

  • November 22, 2024, 07:28:59 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Author Topic: Cogmind on M1, possible?  (Read 4895 times)

amroc

  • Unaware
  • *
  • Posts: 2
    • View Profile
Cogmind on M1, possible?
« on: November 11, 2021, 07:59:02 AM »

Just wondering if anyone has found a way to make this work on an Apple Silicon machine? I've tried Wine and Crossover, but no luck (it just stays on the black launch screen). FWIW Kyzrati I've read your rant about Apple, and as a dev myself I totally understand.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Cogmind on M1, possible?
« Reply #1 on: November 13, 2021, 12:45:14 AM »

Hi amroc, sorry for the delayed reply, didn't get a notification that this post was in the mod filter.

Luigi on the Discord did do a ton of tests and research into this since he has an M1, and eventually got it running at somewhat reasonable speeds, but there's just so many layers at work there that it can still get slow, and take quite a while to start up, at that. I don't recall what the final final verdict was, other than that he did give up actually playing it that way and stuck to his windows machine.

For the details you could consider hitting him up on Discord. I know he figured out some particular config options to get it working a lot better than what was happening by default. From what I recall it's a not very ideal, though.

(Also sorry about the lack of support there... rant apparently seen xD)
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Cogmind on M1, possible?
« Reply #2 on: November 18, 2021, 06:29:29 PM »

Here's some more info since I was just talking to Luigi about it today:

"All free solutions are terrible. The only acceptable solution to play on the 2020 M1 CPUs is to use the paid solution Parallels. From there install steam (or use standalone) like normal. It’s fine unless you scroll, and the Air has trouble after like 10 minutes due to air cooling. I don’t know how a Pro would do." By "unless you scroll," he means smooth scrolling via mouse, since that causes a lot of redraw calls and the bottleneck on an M1 would be the GPU, so using for example keyboard scrolling to jump around won't slow it in the same way.

Luigi's getting a Pro soon to test that, and added that he still considers it unplayable on the original M1.

...

No, wait... okay here we go with another option we just came up with (he's in the middle of testing right now as I type all this :P). It does seem possible to be much more playable on M1 if you adjust the resolution to get around that GPU bottleneck (if your original screen resolution is quite high to begin with). For example Luigi was using 2560x1600, and switched his VM to 1280x800 desktop resolution since Cogmind will look the same anyway by using a different font size to fill that same physical screen space, and he's got it up to 50fps now. So anyway, it seems fiddly overall, but definitely feasible. He's been playing it normally using this method. (Bonus: Cogmind actually looks pretty cool when you use a lower resolution and it fits one of its smaller fonts into a larger screen!)
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Cogmind on M1, possible?
« Reply #3 on: November 18, 2021, 07:57:50 PM »

Luigi just wrote up a little guide:

Quote
Cogmind on M1

Running Cogmind on the M1 MacBook series (including all 2020 and 2021 models), like any ARM CPU, requires the use of emulation software to work properly. Unfortunately, after many hours of testing various platforms, Luigi from the community has deemed performance on M1 is not acceptable for Cogmind without using a paid solution.

The solution is to purchase and install Parallels Desktop 17 (or later), follow its guidance to install Windows 11 ARM from Microsoft, and then launch steam. Users may experience better performance at half native resolution in Windows display settings on M1 systems without a fan (with little to no visual penalty).

The rest of this explains why.

WINE and related technologies will launch Cogmind but graphics performance will suffer even at the lowest of resolutions when panning the map. Standard macOS and Linux solutions are not fast enough. WINE must go through the Rosetta translation layer which adds a massive performance overhead when drawing pixels on the screen.

It is (strangely enough) faster to run Windows ARM in a virtual machine and use Microsoft’s translation layer instead. Unfortunately, VirtualBox, KVM, and similar free virtualization solutions supported on the M1 do not have fast enough virtual GPUs to render Cogmind at playable speeds.


Parallels Desktop (version 17 as of this writing) has a $99/yr subscription and the fastest virtual graphics available for Cogmind. It plays nearly identically to a Windows desktop on the lowest tier base model M1 MacBook Air 2020, at half resolution (still full screen).
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Luigi

  • Derelict
  • **
  • Kyzrati Patron
  • Posts: 25
  • Numba one numba two
    • View Profile
Re: Cogmind on M1, possible?
« Reply #4 on: November 19, 2021, 07:58:19 PM »

What's up gamer, Luigi here. I wanted to share some more thoughts on how to get this set up:

- The game takes a while to load. I've been playing b11 which has a new loading screen, but on b10 expect to wait 5-10 minutes, literally, before the game responds. It loads all the assets up front and the sound assets can take quite a while. It'll act like it's just plain frozen while it loads. If you're patient, you can load it up in WINE too, but it won't run great like I mentioned X)
- Set parallels to gaming mode when configuring the VM
- Adjust the memory of the VM down to 4GB, with Cogmind running it will have about 300-600MB free/cached to work with. You want all the CPU cores you can give it, for virtualized OS stability IMHO -- YMMV, it only seems to max 2-3 cores while emulating in complex scenes
- The display options for resolution all have quirks. Scaled is the best IMHO, but it breaks your ability to take screenshots with Cmd+Shift+4. Retina is pointless if you're running at half res, and will make your cursor tiny. Kyz assures me I can fix this but I'm lazy -- might be worth a shot to restore the screenshot crop tool. For external displays acts similar to scaled.
- Half (quarter) resolution makes this game playable at a speed that I can't tell isn't 60FPS except once in a blue moon. I'm probably going to be using my laptop instead of my desktop for this now
- There is a weird audio crackling issue if you overload the host OS. I experience it when I'm tabbing out of the VM into Discord to chat sometimes, but it seems to clear itself up when the game is in focus after a few seconds. If you experience this, I'd love help hunting down what causes it.


If you have any more questions, ask away!

EDIT: I fixed the screenshot issue by changing the mouse mode to "Don't optimize for games". The scaling options don't matter other than what effect they have on your cursor and Windows desktop experience. I haven't noticed an issue with the mouse optimization off; I play a mix of keyboard and mouse mode. I'd say on the Mac laptops I prefer keyboard mode. Definitely make sure the keyboard setting is "Optimize for games" -- it makes a noticeable difference in input lag for me when using modifier keys.

EDIT 2: I got some hands-on time with an M1 Pro 2021 MacBook Pro. Cogmind runs amazingly on it. I made a benchmarking suite for myself and put it through its paces. I'm seeing 60-120 FPS easily in the most complex endgame scenarios. I'd say the M1 Pro (or Max, won't make a difference here) is a better option to play. This is all at the 4k native resolution on this machine.
« Last Edit: November 24, 2021, 10:17:13 PM by Luigi »
Logged

amroc

  • Unaware
  • *
  • Posts: 2
    • View Profile
Re: Cogmind on M1, possible?
« Reply #5 on: November 28, 2021, 01:43:20 AM »

Hey guys, sorry for the delay in replying, and thanks both of you for the detailed responses. I stopped short of trying Parallels, but really interesting to know it's possible, I might give it a go.

Just wanted to add Kyzrati that the game is amazing. I never really got into "classic" roguelikes before, but even so I've found Cogmind totally engrossing. I think that's largely because you've done such a good job of making it all so accessible, UI wise. In many ways the game captures some of the magic that certain c64/amiga games created when I was a kid, which is pretty special and something I can't say about many games at all. As a game dev myself I also just find it really inspiring.
Logged

Kyzrati

  • Administrator
  • True Cogmind
  • *****
  • Posts: 4477
    • View Profile
    • Cogmind
Re: Cogmind on M1, possible?
« Reply #6 on: November 28, 2021, 04:33:34 AM »

Glad you're inspired amroc :)

Cogmind has certainly gotten a number of devs out there working on new games or adding similarly useful QoL features to their own works, so that's a nice win for everyone!
Logged
Josh Ge, Developer - Dev Blog | @GridSageGames | Patreon

Luigi

  • Derelict
  • **
  • Kyzrati Patron
  • Posts: 25
  • Numba one numba two
    • View Profile
Re: Cogmind on M1, possible?
« Reply #7 on: December 24, 2021, 03:54:39 PM »

Hey wanted to follow up, Parallels put out an update a week or three ago that increased graphics performance. On my M1 MacBook Air it's playing at 100-150 FPS, never dipping below 60 FPS. It's just about perfect now
Logged

Luigi

  • Derelict
  • **
  • Kyzrati Patron
  • Posts: 25
  • Numba one numba two
    • View Profile
Re: Cogmind on M1, possible?
« Reply #8 on: January 22, 2022, 07:12:40 PM »

Wanted to follow up again, I have built the library Cogmind uses to draw on the screen to include DirectX 9 (technically 5) support.

https://www.gridsagegames.com/forums/index.php?topic=1567.msg9956

The second download in this link works great. Right click your bottle, "Browse C: drive", and overwrite the Cogmind SDL.dll file and drop in the second file next to it.

I'd also like to suggest the ideal Crossover settings:

- First, navigate to "View" >> "show bottles", then right click your Steam (or Cogmind) bottle.
- Select all options under "Settings" except for "Default" (up to you) and "High Resolution Mode" (unless you have a 4k screen and are aware what this does)
- The last option (Enhanced Performance Synchronization) is up to you, but I found it made a difference with how quickly the game actually rendered
- Click on "Install a Windows Application"
- Install "DirectX for Modern Games"

With all of these changes, I hit a solid and unwavering 30 FPS that rises up to 200 FPS sometimes. The experience is rock-solid at 1080p as well as 4k on my M1 MacBook Air (8GB RAM) with CrossOver. No more expensive Parallels!
Logged