Not logged inGosu Forums
Forum back to Help Search Register Login
Up Forum
Topic Gosu on iOS with mruby By jontebol Date 2012-10-28 12:14
I was just going to ask about mruby + Gosu for iOS dev... but I see you beat me to it! :)

My dream for game dev is getting Ruby+Gosu working for iOS, either through RubyMotion or mruby, which both seem like viable options.

Have you made any advances with this? Mruby should be a great fit for game dev in general since it can be embedded and has a more suitable garbage collector etc. It could finally allow for writing and distributing Ruby+Gosu games for any platform (minus web) without the Ruby requirement, just an executable game! :)
Topic Gosu + RubyMotion? By jontebol Date 2012-05-04 11:19
Ok, so this sounds pretty exciting:

If that could be made to work with Gosu (or perhaps it already does?!), writing games in Ruby + Gosu for iOS would be a reality...

What say you Gosu-gurus, can it be done?
Topic Creating a Gosu/C++ iPhone game By jontebol Date 2011-02-15 22:24
Ok, so it seems I must have done some step wrong, because I can't get it to compile for the device (my Iphone 4)...

These are the errors I get:

Build gosutouchtest of project gosutouchtest with configuration Debug

Ld build/ normal armv6
cd /Users/jonte/dev/iosapps/gosutouchtest
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/jonte/dev/iosapps/gosutouchtest/build/Debug-iphoneos -L/Users/jonte/dev/games/gosu-source/lib -F/Users/jonte/dev/iosapps/gosutouchtest/build/Debug-iphoneos -filelist /Users/jonte/dev/iosapps/gosutouchtest/build/ -dead_strip -lgosutouch-sim -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreGraphics -framework OpenAL -framework AudioToolbox -framework AVFoundation -o /Users/jonte/dev/iosapps/gosutouchtest/build/

ld: warning: in /Users/jonte/dev/games/gosu-source/lib/libgosutouch-sim.a, file was built for unsupported file format which is not the architecture being linked (armv6)
Undefined symbols:
  "_main", referenced from:
      start in crt1.3.1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Ld build/ normal armv7
cd /Users/jonte/dev/iosapps/gosutouchtest
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++-4.2 -arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk -L/Users/jonte/dev/iosapps/gosutouchtest/build/Debug-iphoneos -L/Users/jonte/dev/games/gosu-source/lib -F/Users/jonte/dev/iosapps/gosutouchtest/build/Debug-iphoneos -filelist /Users/jonte/dev/iosapps/gosutouchtest/build/ -dead_strip -lgosutouch-sim -miphoneos-version-min=4.2 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework CoreGraphics -framework OpenAL -framework AudioToolbox -framework AVFoundation -o /Users/jonte/dev/iosapps/gosutouchtest/build/

ld: warning: in /Users/jonte/dev/games/gosu-source/lib/libgosutouch-sim.a, file was built for unsupported file format which is not the architecture being linked (armv7)
Undefined symbols:
  "_main", referenced from:
      start in crt1.3.1.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Topic Creating a Gosu/C++ iPhone game By jontebol Date 2011-02-13 12:48
Thanx! :)

Gee... I'd forgotten about that window. I knew there was important runtime information somewhere... :) Turns out, I just had to delete the reference to the MainWindow-xib file from the plist file in order to get it working. I now have a working Gosu Touch project! Wohoo! Totally awesome actually... :)

I noticed however that changing the screen size doesn't seem to have any effect whatsoever. I have an IPhone 4 so I'd like to use a resolution of 960x640 but it doesn't seem to want to do that... Any tips?

Btw, what's the best way of adding resources to the project? I've tried with a png image and got it working just by putting it in the resources folder in XCode... Is that the way to go generally?

Thanks for your help, it's greatly appreciated! And as always... for the lib itself... :)
Topic Creating a Gosu/C++ iPhone game By jontebol Date 2011-02-12 12:08
Ok I'm trying to increase the userbase of Gosu Touch by many percent here... by jumping on the wagon...

I've followed all of the steps above, and gotten so far as getting the simulator up in debug mode. However... I must be missing something vital, because when the simulator starts my app, it just quits it again immediately... Basically, nothing happens... Xcode just tells me "Debugging terminated" without throwing any errors or anything like that... It's almost as if I'm missing a game loop or something, as if the program just finishes running, but Gosu::Window should take care of that for me, right?

I'm using the most recent version of the SDK...

I'm practically a complete noob with both XCode, C++ and Iphone dev... I managed to create a small game demo in Objective-C and cocos2d for iphone earlier (like 2 years ago), but since I'm working on a game in Gosu now (in Ruby, currently), I'd love to be able to get it running...

One thing I was unsure of was what to do with Gosu Touch once I'd built it... Does it matter where it lies? I mean, when I built it, it seems to have ended up in a folder called "build" in the source folder of Gosu. I haven't entered that search path anywhere in my xcode project, so how could it matter that I built it? I've just entered the header search path and lib path... Could this be related to my problems? I mean, doesn't the build need to be included in my project somehow?

Anyways, any help would be greatly appreciated. It would be totally awesome to use Gosu on the IPhone, even if it means I have to learn C++ (which doesn't seem all that daunting actually)...
Topic Mac App Store / gosu and Macruby By jontebol Date 2011-01-25 22:27
Am I the only one who thinks the Mac App Store would be an awesome way of distributing gosu games? :)

And am I incorrect in thinking that if we could only get gosu working with MacRuby, that shouldn't be so difficult?

Anyways, I thought I'd just try it and see if it worked, so I downloaded the latest version of MacRuby, and did a "macgem install gosu". So far so good.

But then it looks for a "gosu.bundle" which it couldn't find, so I got a LoadError... So I just tried putting a symlink there to the "gosu.for_1_9.bundle" bundle... since MacRuby is based on Ruby 1.9.

What I got was this:

dlopen(/Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/Gems/1.9.2/gems/gosu-, 9): no suitable image found.  Did find:
  /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/Gems/1.9.2/gems/gosu- GC capability mismatch - /Library/Frameworks/MacRuby.framework/Versions/0.8/usr/lib/ruby/Gems/1.9.2/gems/gosu- (LoadError)

Ok, so that bundle obviously wasn't prepared for MacRuby... The question is, how difficult would it be to make one?
Topic Idea: Gosu in web browser. By jontebol Date 2010-10-10 21:19
I definitely think WebGL is the way to go for this... not Silverlight or Flash.

I could live with porting my game from Ruby to JavaScript if I had to, If I could run Gosu and in the browser (through WebGL)... JavaScript is actually a quite competent language... 

Now would be a good time for such a project too, since a lot of people are looking for game frameworks to use with HTML5...
Topic Gosu and Rubinius By jontebol Date 2010-05-18 14:17
Ok, sounds good. Rubinius isn't currently working on Windows though, but it's not far away I think.
Topic Gosu and Rubinius By jontebol Date 2010-05-18 07:41
Where can I find the precompiled one? In gosu.rb, you load "gosu.for_macruby.bundle" if NSObject is defined, but there is no "gosu.for_macruby.bundle" in the gem folder with the other bundles. Only the one for Ruby 1.8, and the other one for 1.9.

When testing this in macirb, I managed to get MacRuby to find gosu.rb somehow. I think I tried doing a "gem 'gosu'" first, and then "require 'gosu'" just do see what happened, and then it actually tried to find "gosu.for_macruby.bundle" which wasn't in the folder... So if I could just get a hold of a macruby.bundle, I might be able to move a few steps further...
Topic Gosu and Rubinius By jontebol Date 2010-05-17 18:51
I hope your personal plans involve WebGL then... That's what I would look into if I was maintaining Gosu... :) It would be so cool to throw Flash down the trash, and deploy web games written in Gosu/JavaScript (or whatever) with full hardware acceleration.

I didn't know Gosu was supposed to work with MacRuby yet... I just get a LoadError:

irb(main):002:0> require 'rubygems'
=> true
irb(main):003:0> require 'gosu'
LoadError: no such file to load -- gosu

And of course I have done a "macgem install gosu" first... But it doesn't seem to find it, the error is the same as before I install the gem.

Hmm... there is no "gosu.for_macruby.bundle" in the gem folder... Do I have to build that myself somehow? Please say no... :P
Topic Working title "Futurecop" By jontebol Date 2010-05-17 16:57
He.... why do you think I posted them? ;) I'm not sure if Rubinius is the answer for us or not, but it might be. I'd also love for it to work with MacRuby, but it doesn't... :(

I'll gladly help you test Gosu (and our game) on Rubinius/MacRuby, but I'm afraid doing more than that is a bit out of my scope. Tell me if there is anything I can do on the Ruby side of things though...
Topic Working title "Futurecop" By jontebol Date 2010-05-16 21:23
This is in Ruby, which is why I'm really interested in getting Gosu working on Rubinius or MacRuby, as we want to release it without distributing the source code. So the source code is not for public viewing, at least not at this time... Though I'd be happy to give excerpts if anyone is interested in any specific part...
Topic Working title "Futurecop" By jontebol Date 2010-05-16 19:11
Here are some screens from a game I'm working on together with canadian artist/musician Pete Meadows.

The game features sweet atmospheric music and retro-style graphics, and an impressive number of different weapons (as well as polished game mechanics). And of course, it's all set in the not-so-distant future, where mankind is in desperate need of your help... :)

If it isn't obvious, it's a side scroller in the Metroid/Cave Story-style.... Enjoy the screens!
Attachment: fc1.png - Shooting upwards... (74k)
Attachment: fc2.png - Woho! I got one! (94k)
Attachment: fc3.png - Tricky tricky.... (90k)
Topic Gosu and Rubinius By jontebol Date 2010-03-17 11:47
Hello fellow gosuers,

I'm wondering what the status is of using Gosu with other ruby implementations than MRI. Essentially, there are 2 problems with MRI as I see it:

1. No code obfuscation - not fun to release the source code with every install of the game
2. Performance/Garbage Collector - even if ruby 1.9 is fast enough (at least for my purposes) the GC-hit that comes every now and then can make the otherwise smooth game stutter.

Both are quite important issues I think. As far as I know, Rubinius, MacRuby and JRuby could all possibly solve both those issues. JRuby might be out of the question, unless there is a nice way to get Gosu working with Java (but i would love it if there was!). And I know there's been some work on getting Gosu working with MacRuby, right? The problem with MacRuby is that I want to release the game in a cross-platform way, and that leaves JRuby and Rubinius. What about Rubinius then? I tried it with RC3 today, but got this error:

NativeLibrary::load_symbol(): dlsym(0x2d5db40, Init_gosu.for_1_8): symbol not found (SystemCallError)

           NativeMethod.load_extension at kernel/common/native_method.rb:23
           Requirer::Utils.single_load at kernel/delta/requirer.rb:314
          Requirer::Utils.unified_load at kernel/delta/requirer.rb:98
  Kernel(Object)#gem_original_require (require) at kernel/common/kernel.rb:725

I'm currently working on a game that is starting to look really promising, and thusly, I'm looking at my deployment options, and I'm a bit surprised that there aren't more people interested in getting Gosu working for other Ruby VMs. Gosu is such a sweet library, and Ruby is such a sweet language, I'd hate to have to rewrite the game in C++, just to solve those two issues...

And about the game... we will probably start a blog for it in a while, so you can all see the cool stuff we're doing. :) Just a little teaser. :)

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill