- Home /
Game crashes or does not load levels when told to?
Hello! I need to know for the future why this is happening.
So I finished a game (Called Child's Play) and wanted to show my friends. I use a mac, so of course I created a .app file for myself and other mac users, and then I created both 32bit and 64bit .exe files for PC users. Here's the problem: On mac it works perfectly, as you start on the menu (level 0) and click start, it loads the main level (or level 2). If you click on Options, it loads the options level (level 1). Well my friend could not click on start, as it would crash the game. Same with Options. So I uploaded to Kongregate.com to see if it was just bugging out. Also I put the game on my old PC just to test it. The game played perfectly on the pc, but only one level would load for the Kongregate, Google Webstore, or even Dropbox.com. I can definitely post more information, like what my code looks like, and also how I have the levels set up. Also, some of the scripts broke when uploading to a website for online play (In-Browser). I have a script to allow the player to shoot grenades, but it would not work in the browser. This leads me to believe that it is not even there. Also, I have a pause menu script, which allows you to click on "Main Menu" to go back to of course the main menu. It wouldn't work either. I'm not feeling very well right now, otherwise I would say more. Thanks in advance!
Link to game on Kongregate.com - http://adf.ly/XFjbG Link to game on Google Webstore - http://adf.ly/XFnAc
Answer by adrennalinpro · Nov 24, 2013 at 06:08 AM
For anyone with a similar problem, check if you have these issues:
Do levels tend to not work? Then ask this. Are your scripts attached? Inside Unity, I realized that on each object with a script attached, it had said "can't find monodevelop file, missing." in the place of the script. Click the little circle to tell unity what's supposed to be there, and find your scripts.
Still receiving errors and other problems?
Create a Unity3d project. In MonoDevelop, copy and paste each script to a new one in the new project. Make sure your scripts stay in the right folder, and never move them from the "Assets" folder in unity. Also, in monodevelop don't mess with the script locations unless you know what you're doing.
If needed, create a "Scripts" folder inside of Assets. Put scripts in there. Even this, though, could mess up your project. Just a warning! I would back up the project before trying to store scripts in a new folder!
Answer by MarkD · Oct 09, 2013 at 08:20 PM
Well if you are porting to multiple platforms, like you said from mac to pc and browser, you have to take in account what you write in your code, for example I develop on a windows but if I would to create a file system there and port it to mac, mac users won't be able to run the game, because mac does not use the same file system.
This goes for allot of scripting functions wich are platform dependend, maybe you could show the error message given.
Also mac uses an outdated version of openGL because they won't support te latest, so if you use any shaders that require the latest model or differend shaders, that could also give problems.
When building your game keep an eye on the error box below screen, if something should not be compatible with a platform it will spit it out there.
I hope this was of any information.
tip: when writing a text try to make some colloms, alot of people get scared off by a block wall of text and symple won't read it.
greetings
Thank you, I appreciate it. I sort of figured out that somehow all of the scripts had broken inside of unity. Also, all of my scripts are based on learnings from youtube. $$anonymous$$ost everyone uses PC so it would make more sense for it not to work on mac and work on pc.
Your reasoning makes sense though, and I'll keep an eye on it in the future. I'll also work on making things more sightly when posting to Unity Forums, thanks! I wasn't feeling great when I posted, so I wasn't really worried about format.
I am using the free Unity, so I get the simplest of shaders. Also, $$anonymous$$ac is using the most updated OpenGL available, and the only problems it has with is the new DX11. Directx11 is very consu$$anonymous$$g. However despite this it runs it flawlessly. The only time you notice a difference is when you try to run something in addition to DX11 like a game that uses openGL.
$$anonymous$$ac switched to Intel processors long ago, and with it came any supporting OpenGL features to boot. $$anonymous$$ac is trying to invite more and more compatibility offers every day, and will continue to do so. Just a bit of info!
Your answer
Follow this Question
Related Questions
after upgrading to Unity4.2 all levels work in editor, but not in Ouya correctly anymore? 1 Answer
Unity full memory crash, during AssetDatabase.LoadAssetAtPath 0 Answers
Main Scene keeps becoming corrupted randomly. 0 Answers
load level problem when building to ipad 2 Answers
IOS failed to launch in time error 0 Answers