Grid Sage Forums

Grid Sage Forums

  • May 18, 2024, 07:52:24 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

LINKS: Website | Steam | Wiki

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Luigi

Pages: [1]
1
EDIT: New guide here! Much easier to maintain, features a nice GUI .app wrapper and no command line once installed
https://gist.github.com/aronson/b893fb140245d0f19409ab5617cce750



Hello gamers, I figured it out!
I have figured out how to get crossover working for free:
You may need homebrew if not already installed: https://brew.sh/
You may also need Rosetta installed if on an M1 or M2 device:
Code: [Select]
softwareupdate --install-rosetta
Code: [Select]
brew tap gcenx/wine
brew install --cask --no-quarantine gcenx/wine/wine-crossover
brew install winetricks
winecfg # let it launch and close it with OK when it's loaded to init your bottle
winetricks vcrun2010 # required library for Cogmind, follow the installer

Go to finder, press Cmd+Shift+Period to display hidden files, then navigate to ~/.wine/drive_c/ and copy the Cogmind/ folder into it.
Run
Code: [Select]
cd ~/.wine/drive_c/Cogmind/ && wine ./COGMIND.exe to start! Works with all my performance mods too, almost required on M1 Macs, see here https://www.gridsagegames.com/forums/index.php?topic=1567.msg9990#msg9990

2
Support / [GUIDE] How to stream Cogmind
« on: January 27, 2022, 06:11:52 PM »
How to stream Cogmind (macOS and Windows)
So, you wanna stream the best roguelike out there? Here's my setup on Windows and macOS, I hope it helps you.

Note: Some of this is paid software! I will link free alternatives where I can, but you're on your own to make them work. The internet has a vast wealth of resources :)

The Core: Open Broadcaster Software
Everyone and their grandma is using OBS to stream these days. It's Free (as in beer, not as in puppies) Open Source Software.
https://obsproject.com/

Notes for all users:
Follow the tutorial after install. I suggest using a twitch.tv account. There is a wealth of tutorials on basic OBS mechanics on YouTube.
You'll be put in a studio-like environment where one creates "Scenes" that are composed of "Sources" layered on the "Canvas" in the center of the application.
Users will see what you place on the canvas. I suggest adding a source for "Desktop"
Most users will only need one scene. I personally have three -- one for Cogmind streaming (in Desktop capture mode), one for Window capture, and one for transitions that loops a video by our Discord resident and streamer Runia.
Create at least one source in your default scene that captures your entire screen. Be mindful that others will see everything you can see on that screen.
It is possible to capture just the window on some systems -- your mileage may vary on newer Windows systems.

I highly suggest trying out my GPU support builds of Cogmind -- DirectX for Windows and OpenGL for macOS/Linux.
It can make your streaming experience faster on machines with less power.
https://www.gridsagegames.com/forums/index.php?topic=1567.0

Notes for Windows Desktop users:
NVENC (hardware) stream encoding is often much faster than x264 encoding. It uses your GPU, at the cost of lower graphical quality at the same bitrate.
This is why people turn up their bitrate to 6000 mbps -- the highest twitch.tv will allow. Your mileage may vary.
Auto-Duck is an amazing software I use to both route audio from Cogmind to sound devices live (this is not supported in the retail application) and to add auto-ducking to my streams.
Auto ducking can also be obtained via OBS filters on your audio devices. Your side channel is the microphone.
Play around with delay, attack, and threshold and listen to yourself through the configurable "monitor device" in OBS or Auto-Duck, or take a recording and play it back.
https://auto-duck.com/

Note for users with a NVIDIA RTX series GPU who want a green screen or better audio
NVIDIA broadcast is an amazing piece of software. I use it on my Windows desktop to add a virtual green screen to my streams through a basic webcam.
It can be heavy on the GPU. You may want to use the x264 CPU encoder if using this while gaming with your GPU.
It also supports filtering noise from microphones, it's very useful. And if you have a supported card, it's free!
I've also heard rumors it can be run on older NVIDIA cards without RTX but I don't know how to do it.
https://www.nvidia.com/en-us/geforce/broadcasting/broadcast-app/

Notes for all Mac users
A system-wide audio plugin is required to capture audio on macOS. I have found great success in using Loopback, which retails for $100.
https://rogueamoeba.com/loopback/
It, like Auto Duck above, comes with the added benefit of letting one route Cogmind's audio to any device they choose. You can route to a monitor device live.
Here is an example of my setup:
Spoiler (click to show/hide)
A free alternative is Blackhole as your sink device for Cogmind. You will need to have it selected when you boot Cogmind.
Note there is a subscription wall! I think there are builds on GitHub one can find as well.
https://existential.audio/blackhole/

Notes on green screen for Mac users
I don't have a formal green screen, so when I'm not using my desktop to stream I use the (paid) software XSplit VCam.
Note that they have many other associated apps that are expensive and I can't vouch for.
I just got the virtual webcam connected to OBS, set my background to 0x00FF00, and used a chroma key in OBS.
The free trial isn't too bad either.
https://www.xsplit.com/vcam/

Notes for M1 MacBook users
There are ARM native builds for OBS Studio in the thread below that are much faster. You will have to start from the end and go backwards to find newer builds.
I cannot vouch for the integrity or stability of these builds, though I can say that streaming on my base model M1 MacBook Air with one was a delight.
I suggest you choose the Apple HTV hardware encoder and set it to as high as you can for performance. The same caveats apply as for NVENC on Windows above.
https://obsproject.com/forum/threads/obs-on-apple-silicon.133606/

How do I get those follow and subscribe alerts like other streamers?
Coming soon...

Can you recommend any specific hardware?
I personally use these tools to stream:
  • Ryzen 7 5800X CPU, though my Ryzen 5 2600X worked just fine on Windows
  • NVIDIA RTX 2060
  • Astro A50 Gen 3 headset (PS4 edition)
  • AmazonBasics webcam ($30)
  • Two monitors, one for Cogmind, one for stream interaction
  • The Twitch app on my phone for viewer interaction before I had a second screen

I have also had great luck streaming on my M1 MacBook Air (8 GB model) while using native software and GPU support for Cogmind.
Streaming on an Intel MacBook was an okay experience without GPU support, but I can't recommend it.

3
EDIT: Loading time also improved with separate mod
EDIT 2: You must register for the forum to see attachments on posts (and download them)


The CPU mod can be downloaded here https://github.com/aronson/SDL-1.2/releases

The "GPU" mod can be downloaded here https://github.com/aronson/sdl12-compat/releases

Hello fellow Cogminders, would you like to get anywhere between 20-400+% measurable FPS speedups on your machine?

I can make Cogmind draw on your screen faster (FPS++)!

I have found the source code to and made numerous modifications to the SDL.dll file powering the graphics for the game.

Are you running on an older/slower machine, Wine on Linux, or macOS?
Or might you be streaming Cogmind on Twitch.tv or recording it with a program like OBS or even the built-in Windows recording feature for games?

Do you have a computer that chugs a little bit now and then when you pan the map with shift and mouse aggressively? If it lags in this situation, it probably lags in other situations too. One that comes to mind is those beautiful win animations -- you rarely see them, but on WINE on regular ol' Linux you might have a 15 FPS experience as you hit that lovely high note if you have a computer from around 2014, not 2022, and you have your own reasons for not running Windows.

One can display an FPS counter with Ctrl+F3 in the titlebar and above your core to track FPS as you play, if you feel it's lagging a little bit compared to other video games on your machine.

If any of these situations apply to you, I highly suggest you try out my experimental builds of the Simple DirectMedia Library (SDL) attached to these posts with your copy of Cogmind. You can unzip these files and drop the DLLs contained within next to Cogmind. Note, this will overwrite your original files! Please either rename them to something like SDL.dll.bak first so you can restore them later, or you can click "validate local files" in Steam through the game's properties to return to the official Cogmind CPU renderer.

Please do not run random DLLs off the internet
After half a decade working as a cybersecurity engineer in network forensic analysis for a US department of defense contractor, I urge you, do not run binary files like DLL's and EXE's from sources you don't trust.


Source code is linked here ;)
CPU mod: https://github.com/aronson/SDL-1.2
"GPU" mod: https://github.com/aronson/sdl12-compat https://github.com/aronson/SDL/tree/cog-sdl2
Original sources provided by Kyzrati: https://www.gridsagegames.com/forums/index.php?topic=1566

Don't report new bugs to Kyz if you use this
I'm very interested in new bugs, but if you use this who knows what will happen. I have a pretty good idea -- massive speedups for a lot of use-cases that are outside of Cogmind but make sense in 2022 when we are running operating systems with multi-tasking. If something weird happens, restore the old DLLs and try it again first. If you see a difference, great, feel free to let me know and I'll see what I can do :) If you don't see a difference and it's buggy, well, nothing to do with me!
There is a memory leak of like a few bytes, that's why it's in the archive name. It doesn't compound unless you change the window size or borderless fullscreen/etc. setting as far as I understand, but I have not yet fixed it.

4
Support / How to build Cogmind open source libraries
« on: January 03, 2022, 03:48:46 AM »
What
Recently I have come upon modern understanding (as of this post) of how to satisfy the Lesser GNU Public License clause of Cogmind's associated SDL 1.2.14 binary that was built against an old toolchain many years ago. You should be able to generally apply this to other SDL helper libraries if necessary.
Why
This post is intended for archival in the distant future when historians seeking to plug Cogmind into their latest hyperreality gamestation's graphics layer run into problems because of how Cogmind manages its memory across heaps, at least as of Cogmind b11 X9 (a patreon pre-release build). I believe this is included in Cogmind only due to its use of REX, but I don't really get how it all works in the end.
How
Without further ado, this works on a modern Debian machine, and I was able to apply this on an M1 Macbook Air running the latest macOS and mingw-w64 toolchain. Huge thanks to user Daid of the Roguelikes Discord for putting this together! What a cute cat they have in their profile picture :D

Code: [Select]
$ git clone git@github.com:libsdl-org/SDL-1.2.git
$ cd SDL-1.2/
$ git checkout release-1.2.14
$ ./autogen.sh
$ ./configure --host=i686-w64-mingw32 --disable-directx --disable-assembly --build=x86_64-w64-mingw32
$ make -j 12
$ file ./build/.libs/SDL.dll
./build/.libs/SDL.dll: PE32 executable (DLL) (console) Intel 80386, for MS Windows
$ daid@MSI:~/SDL-1.2$ i686-w64-mingw32-objdump -x ./build/.libs/SDL.dll | grep DLL
        DLL
 vma:            Hint    Time      Forward  DLL       First
        DLL Name: ADVAPI32.dll
        DLL Name: GDI32.dll
        DLL Name: KERNEL32.dll
        DLL Name: msvcrt.dll
        DLL Name: USER32.dll
        DLL Name: WINMM.DLL
        DLL Name: libgcc_s_dw2-1.dll

The last command is demonstrative of the need for this assembly configuration workaround.

Further information
If you are a developer interested and aware of the implications of SDL hooking, I welcome you to join the Roguelikes discord community where I am working on a Cogmind AI/TAS. A later post in this forum somewhere appropriate will link to the sources for this project if and when it is in a state I deem interesting.

Binary Archival
Attached to this post would be a copy of SDL source code that can also be used in the event the git remote specified above goes out of service. But the forum limits me to 1MB. It's a 5MB archive. I'll see what I can do.

Pages: [1]