Menu

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.

Show posts Menu

Messages - ttoocs

#1
Support / Re: Black screen? Or, game won't run?
July 21, 2016, 11:24:25 PM
Quote from: e6719039 on July 21, 2016, 10:41:01 AM
-snip-

Final edit!  : finally i got it to work, i deleted the game one more time and reinstalled again, i started it again and was greeted with the pink version of the game again, this is because steam remembered the launch options "-force-d3d11" , i removed the launch options and the game crashed again, so i made a final attempt, i changed "-force-d3d11" with "-force-d3d9" and now finally it seems to be playable, no crash so far and i have textures and all!!

Thanks for the help!

Kind regards,

Heh, that's kinda ridiculous xD, but I'm glad it works now. A+.
#2
Ideas / Animal Incest - ?
July 21, 2016, 08:33:02 PM
So, I was reading somewhere in the wiki, that People can do insest..

However my lovely chickens, once their daddy gets eaten, well, now I get no more chickens, regardless of having plenty of hens/males...

My ideal solution: Make these attributes that can be set (per pawn, or policies), I was looking about the Defs and couldn't find anything (Although, I may have just missed it, at which case, ignore everything I said.)
Bonus points: An 'Operation' for artificial insemination. (A 2-part operation, collect and deposit.)
#3
Support / Re: Black screen? Or, game won't run?
July 20, 2016, 07:40:41 PM
When it's run with -force-opengl there are 373 instances of "null texture passed to GUI.DrawTexture", which is where the pink would be from.. which is strange.. There is another argument that you _could_ try for blind luck, but no idea if it would work: "-force-d3d11"

On the first crash.txt, it looks like it the Spanish language files are messed up, and then it _might_ be crashing because it can't name things..
My best guess from that is to try to get it to run in English, and see if that helps. (if you're already running it in english... well... I guess it's just kinda corrupted? in which case try the registry fix attached to the first post)

Idk how the windows version logs it-self... but the logs seem cut-off... but that might just be how it's run. I'm test that abit.
Nope, windows is just like that.

Edit: The crash_2.txt looks like it's just initializing it... and then exiting properly. The crash.txt just gets cut off, which I guess is the game crashing.
Sorry, no new ideas as to what to do. (other than the two original ones I had, but idk if they work at all.)
#4
Support / Re: Black screen? Or, game won't run?
July 20, 2016, 01:35:17 PM
It doesn't sound like it hampers anything at the moment, "it should just be a matter of new features", so you may as well.  (I'm thinking it'd just be graphical features, but I may be wrong.) But for a fix, it'll solve the problem.

Quote
[11:36] <Tak> it _should_ only affect new features
[11:37] <Tak> well, the legacy renderer will go away in unity 5.5
[11:37] <Tak> at that point, people will need drivers that support core profile 3.2
[11:37] <Tak> (which even mesa on intel does now)
#5
Support / Re: Black screen? Or, game won't run?
July 20, 2016, 01:24:09 PM
So I went and bugged the mesa-dri people, and some people on Steam Linux Users Group about -force-opengl vs -force-glcore. In conclusion:
(-force-glcore) : it's probably referring to core vs compatibility profiles which only exsist in opengl 3.1+ (And only got decent till 3.2) Which explains why it needs opengl 3.2+ (https://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts)
and (-force-opengl) : which is Unity's legacy render, which just needs OpenGL 2.0.
They also say that using -force-opengl shouldn't impact performance. (My caution seems unneeded)
And that it is something you can set in unity's player build settings. - which would fix needing any script at all on mac, and the old script would be fine for Linux (although I still suggest adding a $@ at the end of it)
#6
Support / Re: Black screen? Or, game won't run?
July 20, 2016, 01:59:47 AM
Here is a first-version of my script, that attempts to detect when it needs to run the game with -opengl-force.
This should fix it launching with a black screen and immediately crashing with slightly older hardware.

It does try to do it for mac as well, however, I do not know the structure of steam on a mac, and is hence very limited.

Put it in the directory where start_rimworld.sh is and it should work fine.

Here it is in a code block, but it is also an attachment.

#!/bin/bash
#Ttoocs's Launcher for the Linux (and maybe mac) version of RimWorld

LOGFILE="/tmp/rimworld_log"

#VERSION=1.0

#Due to bash, all functions are defined before their use.

#Code to check if the prior run had an SDL::Logic_error
check_prior_sdllogic_crash() {
if [ -e $LOGFILE ]; then
if grep -q "std::logic_error" $LOGFILE ; then
FORCEGL=" -force-opengl"
echo "Detected a prior crash in logfile due to too low an OpenGL version, Launching game with a fix"
fi
fi
}


#Code to check for OpenGL > 3.2, and set --force-opengl if required
setargs_force_opengl(){
FORCEGL="" #Assume all is okay untill proven not.

if which glxinfo | grep -q glxinfo ; then
OPENGL_VERSION=`glxinfo | grep "OpenGL version string:" | cut -d' ' -f 4`
if [[ (( $OPENGL_VERSION < 3.2 )) ]]; then
echo "Detected OpenGL versoin < 3.2, launching game with a fix"
FORCEGL=" -force-opengl"
else
check_prior_sdllogic_crash
fi
fi

}

rungame(){
#Runs the game, and if it detects a crash from sdl:logic error, where -force-opengl was no set,  re-runs the game"
#Echo's a forceGL string to the logfile at the end, if it didn't crash while running it that way
#

#run the game
./$GAMEFILE $LOG $FORCEGL $@

EXITVAL=$? #Get the exit value

if [[ $EXITVAL != "0" ]]; then #Check if it had an unclean exit
if [[ $FORCEGL == "" ]]; then #Check if -force-opengl was set
check_prior_sdllogic_crash
if [[ $FORCEGL != "" ]]; then #Check for sdlogic crash

echo "Sorry, the game crashed without the fix... trying again with it!"
#MAIN# (A copy-paste)
OS=`uname -s`
if [[ $OS == "Darwin" ]]; then
    runmacstuff
else
    runlinuxstuff
fi

fi
else
echo "Sorry, game still crashed with the -force-opengl fix."
fi
else
#Game exited okay!
if [[ $FORCEGL != "" ]]; then #Check if the fix was used.
echo  "Appending fix to new logfile"
echo  "Ttoocs script crash-saving thing std::logic_error" >> $LOGFILE #If it was, copy a trigger to run it again into the newest logfile
fi
fi
}


#Runs the required mac-stuff
runmacstuff() {
#NOTE: From pk4yahweh's case, this script _WILL NOT_ catch the case where Mac OSX runs the game in software rendering when glxgears is not installed.
#I'm not entierly sure how to fix that.

#NOTE: I'm not sure where it would be if installed via steam on a mac..
If it's possible to ship this script (and make it runnable as osx needs)
# then you can do a simmilar approch to linux.


if [ -d /Applications/RimWorld*Mac.app/Contents/MacOS/ ]; then
#Check if mac hdd install'd
DIR="/Applications/RimWorld*Mac.app/Contents/MacOS/"
else
if ls | egrep -i rimworld | egrep -q -i mac$ ; then #Cheks if it's in the game directory
DIR=`pwd`
else
#TODO: More/better detection of mac folders
echo "Not sure where the game is, sorry!"
exit
fi
fi

cd "$DIR"

#Get's the gamefile
GAMEFILE=`ls | egrep -i rimworld | egrep -i mac$`

#Sets a logfile
LOG="-logfile "$LOGFILE

#Sets the forcegl arg
setargs_force_opengl

rungame

}

#Runs the linux stuff
runlinuxstuff() {

# cd into the directory containing this script
SCRIPT=$(readlink -f "$0")
DIR=$(dirname "$SCRIPT")
cd "$DIR"

#Getting game executable name.
GAMEFILE=`ls | egrep x86$`

OSVERSION=`uname -m`
if [[ $OSVERSION == "x86_64" ]]
    then GAMEFILE=${GAMEFILE}_64
fi

LOG="-logfile "$LOGFILE

export LC_ALL=C #Locale resetting (important for Ubuntu players who are not native speakers of English) and launching the game.

#Sets the forcegl arg
setargs_force_opengl

rungame
}


#MAIN#

OS=`uname -s`
if [[ $OS == "Darwin" ]]; then
runmacstuff
else
runlinuxstuff
fi


[attachment deleted by admin - too old]
#7
Support / Re: Black screen? Or, game won't run?
July 19, 2016, 11:27:11 PM
From how it's phrased on the place I found it:

    -force-opengl: To use the legacy OpenGL back-end
    -force-glcore: To use the new OpenGL back-end. With this argument, Unity will detect all the features the platform support to run with the best OpenGL version possible and all available OpenGL extensions
    -force-glcoreXY: XY can be 32, 33, 40, 41, 42, 43, 44 or 45; each number representing a specific version of OpenGL. If the platform doesn't support a specific version of OpenGL, Unity will fallback to a supported version
    -force-clamped: Request that Unity doesn't use OpenGL extensions which guarantees that multiple platforms will execute the same code path. This is an approach to test if an issue is platform specific (a driver bug for example).

All of those should work/run on Linux, as GL-core is a mesa/Xorg/dri thing: https://dri.freedesktop.org/wiki/GLcore/
For some reason, somewhere, it seems to detect the features wrong... or it might not support pre 3.2 as hinted by the -glcore32 being the lowest value.

I know it helped pk4yahweh's mac which seemed to fall-back to software rendering (My guess is that macOSX can figure out "oh this is doing stuff not supported, to software rendering!")  (He was asking if this can be patched into the mac launcher?)

I'm not sure forcing it in every launch is a good idea though... as I guess unity seems to think there is some benefit of using newer functions, and I remember reading somewhere on their site that it does a fall-back to X software stuff when needed.. so running it this way might reduce performance/increase CPU usage.

I would recommend trying to detect this in some way though.. There is the command "glxinfo", which gives loads of information. And going through the strace's I remember seeing a good chunk of it's output.. I think Unity get's it it-self... In which case https://docs.unity3d.com/ScriptReference/SystemInfo-graphicsDeviceVersion.html might be useful, so you might be able to relaunch the game from itself with -force-opengl when needed. (OpenGL <3.2)

As for linux/mac scripts: 1 way, is to simply launch the game, and see if it crashes due to that error. (Ideally saving this result aswell so only on the first launch you get the crash..
There is also the command glxinfo, but it's not installed on everything by default, so it'd be a hit and miss.
(If it was scripting, I'd probably try to do a hybrid of both, as glxinfo would be more reliable and less jarring when it's available.. and there may be more methods idk of.)

p.s, I think it'd be a good idea to add $@ at the end of the line where the game in launched so that if someone modifies the steam launch options it'll get passed through to the game.

Edit: (Because my script is demanding and kinda complex, I'll try to do it when I get home)
Edit2: It's done, see two posts below.
#8
Support / Re: [A14] Unplayable on Mac
July 19, 2016, 05:35:57 PM
Quote from: ttoocs on July 19, 2016, 03:24:00 PM
I saw your post about it running painfully slow on a mac..
Can you try running it with -force-opengl? (I'm on linux, and this fixed my issue, I'm curious if it might fix yours)

Quote from: pk4yahweh on July 19, 2016, 03:47:42 PM
Can you explain how I run it with -force-opengl?

Quote from: ttoocs on July 19, 2016, 03:54:31 PM
Are you running it via steam, or just clicking it in a folder somewhere?

Quote from: pk4yahweh on July 19, 2016, 04:00:17 PM
I installed it on my harddrive.  I figured Steam was only making it worse.

Quote from: ttoocs on July 19, 2016, 04:12:17 PM
Alright, so if you open up a new terminal, type (or copy-paste)
/Applications/RimWorld1238Mac.app/Contents/MacOS/RimWorld1238Mac -force-opengl
That should run it, to my understanding

If that doesn't work, try
cd /Applications
`find | grep RimWorld1238Mac` -force-opengl
And it _should_ find it and run it.

Alternatively use
find | grep RimWorld1238Mac
to find the directory and cd to it, and then ./RimWorld1238Mac -force-opengl
Quote from: pk4yahweh on July 19, 2016, 05:23:55 PM
Yes - that fixed it!
Is this something I have to do overtime I want to play (open terminal window and type that command) or will they be able to fix this in a patch?
Thanks!

There is a way to create a shortcut to do this:

Create an Applescript with:
do shell script "<whatever you ran that worked>"
And save it as an application.
(I don't know that this works first-hand, this is just what I got from googling it)

As for patch-ability, I'm not entirely sure.
Glad I could help.
#9
Support / Re: Black screen? Or, game won't run?
July 19, 2016, 04:13:25 PM
And... it works now..?
#10
Support / Re: Black screen? Or, game won't run?
July 19, 2016, 03:39:48 PM
https://support.steampowered.com/kb_article.php?ref=1040-JWMT-2947
Tl;dr right click it, add lunch options, add options. (Given, if it runs that startup script.. you'll have to modify the startup script)
I cannot verify that though, steam doesn't run for me.
#11
I have a working (for me, and not slow) native solution as-well now: https://ludeon.com/forums/index.php?topic=4805.msg236329#msg236329

The fact that on some computers it seems to work... hints more to the unity Opengl 3.2.. requirement.. I'll keep looking into this stuff.
#12
Support / Re: Black screen? Or, game won't run?
July 19, 2016, 02:05:35 PM
Found, a working (for me), accelerated (not slow), fix.
Run the game with -force-opengl (A unity argument)
Here is a new start-script implementing it:


#!/bin/bash
#Launcher for the Linux version of RimWorld

# cd into the directory containing this script
SCRIPT=$(readlink -f "$0")
DIR=$(dirname "$SCRIPT")
cd "$DIR"

#Getting game executable name.
GAMEFILE=`ls | egrep x86$`

#Checking if OS is 32 or 64 bits and adjusting the game executable name accordingly.
OSVERSION=`uname -m`
if [[ $OSVERSION == "x86_64" ]]
    then GAMEFILE=${GAMEFILE}_64
fi

#Puts the game executable as... executable if not the case.
if [ ! -x $GAMEFILE ]
    then chmod +x $GAMEFILE
fi

#If this is a dev version, we want to activate logs.
#if [[ $GAMEFILE == *Dev* ]]
#    then LOG="-logfile /tmp/rimworld_log"
#    else LOG=""
#fi

#We always want to activate logs
LOG="-logfile /tmp/rimworld_log"

#Locale resetting (important for Ubuntu players who are not native speakers of English) and launching the game.
LC_ALL=C ./$GAMEFILE $LOG -force-opengl


Note: I was playing with LIBGL_ALWAYS_SOFTWARE=1
and MESA_GL_VERSION_OVERRIDE=3.1 -- Crashes.
MESA_GL_VERSION_OVERRIDE=3.2 -- Works fine.
And reading unity's site: https://docs.unity3d.com/Manual/OpenGLCoreDetails.html
It seems it requires openGL 3.2... (So only older hardware would be effected)
However, for some reason, "-force-opengl: To use the legacy OpenGL back-end" Works! So Horrah! I can play the game!
Sorry for the 3 posts in the thread, almost in a row, but as this one works well, and contains new info, I didn't want anyone to miss it.
#13
Support / Re: Black screen? Or, game won't run?
July 19, 2016, 01:15:12 PM
Oh, wow, my post made it. (The site seemed to have gone down as I was trying to do it)
I made a post on the reddit aswell: https://www.reddit.com/r/RimWorld/comments/4til60/black_screen_linux_issuecause_the_website_is_down/

On this google drive link, I do have an strace of both when it works/doesn't, and the GDB-output of when it crashes (The built-in script to get it doesn't seem to work) And a screenshot of comparing where the game crashes in the strace's.
https://drive.google.com/folderview?id=0B85eUDW66FPNWlAtMFE0b0dqYzQ&usp=drive_web
If there is anymore debugging I can do, feel free to ask away.

On the note of LIBGL_ALWAYS_SOFTWARE=1, If you run it on a lower resolution it does run faster.
#14
Support / Re: Black screen? Or, game won't run?
July 18, 2016, 09:10:59 PM
Running it on Arch Linux,
Getting the above errors, Game shows up as a black box, and then crashes down.
Included in the link the a strace, (it scans /sys! and closes EVERYTHING IT CAN.)

Oddly, running it with LIBGL_ALWAYS_SOFTWARE=1 works, however is slow.
(I will also include a strace going to the menu and exiting)

https://drive.google.com/folderview?id=0B4wyUKnRBUrTc0cwODY4RWhWc28&usp=sharing
https://drive.google.com/folderview?id=0B85eUDW66FPNWlAtMFE0b0dqYzQ&usp=drive_web