Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / ocra deployment, window mode
- - By ? Date 2010-12-27 04:45
Hello,

I'm trying to deploy my game using ocra, everything is working okay except that if I build my .rbw or a .rb with --windows forced, the game never launches. a .rb with no --windows launches just fine, but with a command prompt. Does anyone have any idea how to fix this?

Thanks in advance.
Parent - By ippa Date 2010-12-27 16:15
I've used for a lot of games and never seen this, so I have no idea. I know https://github.com/larsch is good on answering emails though :).
Parent - - By jlnr (dev) Date 2010-12-28 06:12
If you have a puts() statement or *anything* in your code which writes to the console, the game will crash when there is none. Oh, the wonders of Windows. :)
Parent - - By Spooner Date 2010-12-31 16:59
Yep; caused me a lot of trouble before I worked it out. The easy way around this is to forward the output to a file, so it doesn't stop the exe running.

  # You'll want to redirect stdout too
  original_stderr = $stderr.dup
  $stderr.reopen File.join(LOG_PATH, 'stderr.log')
  $stderr.sync = true

  # run the game itself

  $stderr.reopen(original_stderr)

Full example code https://github.com/Spooner/sidney/blob/master/lib/sidney.rbw
Parent - - By banister Date 2010-12-31 23:34
happy new year spooner, where have you been these last days?
Parent - By Spooner Date 2010-12-31 23:35
I've been at my mum's! Happy new year to you too!
Up Topic Gosu / Gosu Exchange / ocra deployment, window mode

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill