Game different in editor/web player and Windows stand alone.

Hey all! This forum has already been a great help and resource. So thanks a lot for that!

I've been searching the forums for an answer, but i cannot fix the problems with the suggestions i found. I apologize if I'm missing an obvious answer (don't want to be that guy...)

I've been working on my game, testing it in the editor. And every week or so i upload a new build to my site.

These both work fine, but when i build a windows stand alone version, my friction is totally different and my fading in textures only jitter faintly (they are currently used for a placeholder tutorial).

the web player version can be seen here: http://www.theoddworks.com/?p=244

the game runs at about 350fps in the editor on my dev pc, and seemingly consistent on different computers within a browser (dont know those fps values).

there are no errors in the Console when playing or building. Except for 1 seemingly random error when i build a web player(pasted below).

I've tried the following:

exporting a unity package with all assets to a new project building in different directories added a space to all the scripts and re-saved them added a splash screen scene so my game was scene 1 instead of 0

Any help is really appreciated!

Thanks!

Vincent Bonefaas www.theoddworks.com

// web player building error:

IOException: Win32 IO returned 1224. Path: C:\Users\Vincent\Desktop\gfs urboeuh.html System.IO.FileStream..ctor (System.String name, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) System.IO.FileStream..ctor (System.String name, FileMode mode, FileAccess access, FileShare share) (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding) (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool,System.Text.Encoding) System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding enc) System.IO.File.WriteAllText (System.String path, System.String contents) UnityEditor.PostprocessBuildPlayer.ReplaceText (System.String path, System.String[] input) [0x00000] UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions) UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions) UnityEditor.BuildPlayerWindow:OnGUI() System.Reflection.MonoMethod:InternalInvoke(Object, Object[]) System.Reflection.MonoMethod:InternalInvoke(Object, Object[]) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) UnityEditor.HostView:Invoke(String) UnityEditor.HostView:OnGUI()

Few ideas:

  • Have you checked the windows standalone logfile (*Data/output_log.txt*)?

  • A possible reason for different behaviour on different platforms is that initialisation order can differ. To give an example it could be that in editor A.Start() is called before B.Start() but in standalone B.Start() is called before A.Start(), so if B uses vars from A that are modified in Start things will differ.

  • Tried to play the webdemo, but got stuck in 5 seconds, how do I jump? I noticed however that the fadeout of the jumping hint did wrap occasionally (so after fading out it started to flicker), especially after switching to full-screen. Are you using an == on floats that can have a slight mismatch or jump over the wanted value if framerate is lower (and Time.deltaTime has higher values?).

Ok, i think i found the problem. I used this: Script to check my framerate in the standalone verion, and by doing so i noticed that in the editor the game runs at 30 fps. (the stats say 350+ though, is it locked at 30 in the editor?). so i looked at the standalone version and it was running at 500 fps.

conclusion, i have some framerate dependant stuff in my code..? or to high frame rates is a problem?

Sorry for the inconvenience, but i assumed the stats window showed me the actual fps.

Thanks again!