Not logged inGosu Forums
Forum www.libgosu.org Help Search Register Login
Up Forum
1 2 3 Previous Next  
Search
Topic gosu.NET By Jwosty Date 2012-11-18 01:49
Hmm, oh well, nice to think about anyway. You can already write cross-platform .NET games anyway :P
Topic gosu.NET By Jwosty Date 2012-11-16 23:09
What this that's included in the sdk?
Topic gosu.NET By Jwosty Date 2012-11-16 23:08
Actually, what libraries does Gosu use mainly for drawing and sound anyway? Because if they're not too complex, then one might be able to implement ports of them for XNA, if they don't already exist. If that's practical, then it would run on all Mono platforms as well, using MonoGame.
Topic gosu.NET By Jwosty Date 2012-11-03 14:45
What makes you say that it would run very slowly? (not that I necessarily disagree)
Topic gosu.NET By Jwosty Date 2012-10-28 02:38
Heheh, here's a thought: how about a Gosu port for the .NET platform? That way it could run on all the Microsoft products (Windows, Xbox 360, Windows Phone) and anything that Mono supports (OS X, IOS, Linux, Android [I think]). Just food for thought.

EDIT: That would also mean it could be used from any other .NET Runtime language, like C#, J, and F#!
Topic Gosu game on Steam? By Jwosty Date 2012-05-16 23:28
(also @erisdiscord) Why not? I didn't know that... :/
Topic Gosu game on Steam? By Jwosty Date 2012-05-16 01:31
Wait a minute... How could we have forgotten about JRuby?! It is a reliable solution even for distributing Ruby apps as standalone jars; the end user only has to have Java installed.
Topic Stamp an object? By Jwosty Date 2012-04-20 12:56
Thanks for the reply, but it's been solved on another forum. This was (mostly) my post:

---

Images can be drawn multiple times to the screen; any number of times or not at all. Take this for example:

# Lets say that my_image is a 100x100 size image, and we want to stamp it 10x10 times
for x in 1..10
  for y in 1..10
    w, h = my_image.width, my_image.height
    # Multiply the sizes so the "stamps" don't overlap
    my_image.draw(x * w, y * h, 0)
  end
end


EDIT: Oh also, all the copies will stay until the screen is wiped (after each draw call)

---

The last line was his main issue.
Topic Procedurally generating a background with Gosu By Jwosty Date 2012-04-20 12:53
I suggest having some sort of Tile class, and your window generates them in some clever way. You just have to call each of their update and draw methods.

As for the physics, you could look at CptnRuby as an example.
Topic Ruby Gosu Lighting Library By Jwosty Date 2012-04-18 01:05
I might use this sometime; maybe you should post it as a gem.
Topic Gosu game on Steam? By Jwosty Date 2012-04-17 22:21
I don't see why not, but for it to be cross-platform, you could probably use Ruby2EXE
Topic Stamp an object? By Jwosty Date 2012-04-17 03:21
Check on Coders' shed; I answered it there. ;)
Topic I want to create a new image whenever something happens. By Jwosty Date 2012-02-24 14:01
Also, you can make your conditional shorter if you use:
elsif mouse_x.between?(0, 39) and mouse_y.between?(0, 39)
or this (parentheses only where absolutely necessary):
elsif (0..39).include?(mouse_x) and (0..39).include?(mouse_y)
Topic No Place Like Homeless (UPDATED 6.22.2014) By Jwosty Date 2012-02-05 03:47
[ Totally clicked the wrong button ]

" Jwosty has some error information for me here "
Topic No Place Like Homeless (UPDATED 6.22.2014) By Jwosty Date 2012-02-05 03:38
Ooh, I've been wanting to try this for a while!
Let's see how awesome it is :D
Topic BPA Technical 2012 Entry- Summoning of the Sword By Jwosty Date 2012-02-04 16:19
Yeah, I had to do that... But then again, I didn't use bundler :P
Topic BPA Technical 2012 Entry- Summoning of the Sword By Jwosty Date 2012-02-04 04:21
Wow, this is very impressive! I especially like the dynamic lighting :D
Topic Rad Rex Mayhem Madness By Jwosty Date 2012-01-22 00:02
:)
Topic Rad Rex Mayhem Madness By Jwosty Date 2012-01-16 23:59
I meant the buildings, not the people lol xP

It's not a huge problem, just a little annoying (in my opinion).
---
Still a good game, though!
Topic Rad Rex Mayhem Madness By Jwosty Date 2012-01-14 20:18
Fun game! As for having to draw the shadows in front of the buildings, you could probably fix it by making the latter translucent.
Topic Alpha Channel (LD#18) v1.4.0 By Jwosty Date 2012-01-05 00:38
That doesn't work either... :/
------
Sorry for the long response; my internet got knocked out for a couple days by the wind.
Topic Alpha Channel (LD#18) v1.4.0 By Jwosty Date 2011-12-23 15:49
It didn't show any highscores ingame for me (on any mode). But other than that, I think its still really fun! xD
Topic Windows executable By Jwosty Date 2011-12-15 23:19
Ah, thanks a bunch! This really helps. :D
Topic Super Duper Mario By Jwosty Date 2011-12-09 02:24
mkay
Topic Ruby Libraries in Mac Apps By Jwosty Date 2011-12-08 04:26
Oh, I wrote my own short Ruby script and marked it as an executable; that's that "rubyapp" thing. Yeah, it does just load whatever version of Ruby the user has as their default; it'd be nice to try to control that sort of thing. And I don't really want to package up an entire Ruby interpreter myself; it just takes up extra space, and Macs come with Ruby installed by default.

But I think that gem environment thing is exactly what I need! Thanks; I'll check this out (the GEM_HOME constant, specifically).
Topic Super Duper Mario By Jwosty Date 2011-12-08 04:14
Yeah, I'm getting that too. I wanna try this too! xP
Topic Ruby Libraries in Mac Apps By Jwosty Date 2011-12-08 00:12
Here's $LOAD_PATH:
/Users/alanwostenberg/Desktop/HelloWorld/HelloWorld.app/Contents/Resources/libraries
/Library/Ruby/Site/1.8
/Library/Ruby/Site/1.8/powerpc-darwin10.0
/Library/Ruby/Site/1.8/universal-darwin10.0
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby/1.8/universal-darwin10.0
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/powerpc-darwin10.0
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0
.


And this is the error message (backticks replaced with single quotes):
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in 'gem_original_require': no such file to load -- rubydraw (LoadError)
  from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in 'require'
  from /Users/alanwostenberg/Desktop/HelloWorld/HelloWorld.app/Contents/Resources/lib/main.rb:2
  from /Users/alanwostenberg/Desktop/HelloWorld/HelloWorld.app/Contents/MacOS/rubyapp:13:in 'require'
  from /Users/alanwostenberg/Desktop/HelloWorld/HelloWorld.app/Contents/MacOS/rubyapp:13


And finally, the structure of the package is attached.
Attachment: HelloWorld.appstructure.png (62k)
Topic Ruby Libraries in Mac Apps By Jwosty Date 2011-12-07 03:31
This isn't completely about Gosu, but I've been writing a simple Ruby graphics library (just for fun) (https://rubygems.org/gems/rubydraw) based off of SDL, and I wanted to see how much it would take to be able to package it up into a nice little Mac App that could run on theoretically any Mac. Everything is working fine and dandy, but currently the end user would have to have a few gems installed. I tried adding them to a subdirectory in Resources (entitled "Libraries"), then adding it to $LOAD_PATH. It still wouldn't work; it tries to load the gems from the gem folder. And I know it adds the completely correct directory to $LOAD_PATH; I had it print it once and it was fine. Anyone know how to do this?

Thanks!
Topic Window problemes [ruby] By Jwosty Date 2011-11-26 22:28
Awesome!
Topic Alpha Channel (LD#18) v1.4.0 By Jwosty Date 2011-11-24 22:19
Hmm... Yeah, I really don't know anything about how to fix things like this, to be honest. I would help you more if I could ;)

Also, I can't test it for a while today because I'm on a friend's Windows computer. I will get back to helping you as soon as I'm finished. :P
Topic Window problemes [ruby] By Jwosty Date 2011-11-24 16:55
lol xD
Topic Alpha Channel (LD#18) v1.4.0 By Jwosty Date 2011-11-24 16:51
That's no big deal xP

Hmm... I just followed your instructions, but for some reason it still won't work for me. This is what it says after I build it:
Redirecting output to '/Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/alpha_channel.log'
<internal:gem_prelude>:182:in
path_to_full_rubygems_library': rubygems.rb (LoadError)
  from <internal:gem_prelude>:162:in load_full_rubygems_library'
  from <internal:gem_prelude>:217:in
try_activate'
  from <internal:lib/rubygems/custom_require>:32:in rescue in require'
  from <internal:lib/rubygems/custom_require>:29:in
require'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/lib/chingu.rb:28:in <top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in
require'
  from <internal:lib/rubygems/custom_require>:29:in require'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/alpha_channel/lib/alpha_channel/game.rb:3:in
<top (required)>'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/alpha_channel/lib/alpha_channel.rb:1:in require_relative'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/alpha_channel/lib/alpha_channel.rb:1:in
<top (required)>'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/alpha_channel/bin/alpha_channel.rb:98:in require_relative'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/alpha_channel/bin/alpha_channel.rb:98:in
<top (required)>'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/Main.rb:2:in require_relative'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/Main.rb:2:in
<top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in require'
  from <internal:lib/rubygems/custom_require>:29:in
require'
  from /Users/*****/gosu_wrappers/alpha_channel_v1_2_3_OSX_10_6/Alpha_channel.app/Contents/Resources/gosu/run.rb:11:in <main>'

Not sure who's end it is... Do you want me to upload the app for you to look at?
Topic Window problemes [ruby] By Jwosty Date 2011-11-24 16:34
Ah, then there's the problem. The app hangs because while espeak is talking, your program temporarily stops updating the app. To fix this, you could thread it like so:

def update
  thread = Thread.fork do
    # Changed this part a bit to remove a duplicate for you
    if @val == 50
      $screen.speak("Bonjour")
      Kernel.system('espeak -vfr "bonjour"')
    end
  end
  thread.run
  @val += 1
end


This posees on problem though: It might start speaking before it's finished. But I think you can figure that part out pretty easily. ;)

Hope this helps!
Topic Alpha Channel (LD#18) v1.4.0 By Jwosty Date 2011-11-24 05:41
Oh also, after I rename Alpha_channel.app/Contents/Resources/alpha_channel/bin/alpha_channel.rbw to .../alpha_channel.rb, it spits out:
Redirecting output to '/Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/alpha_channel.log'
/Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/alpha_channel/lib/alpha_channel/game.rb:1:in
<top (required)>': uninitialized constant Object::RbConfig (NameError)
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/alpha_channel/lib/alpha_channel.rb:1:in require_relative'
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/alpha_channel/lib/alpha_channel.rb:1:in
<top (required)>'
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/alpha_channel/bin/alpha_channel.rb:98:in require_relative'
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/alpha_channel/bin/alpha_channel.rb:98:in
<top (required)>'
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/Main.rb:2:in require_relative'
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/Main.rb:2:in
<top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in require'
  from <internal:lib/rubygems/custom_require>:29:in
require'
  from /Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/gosu/run.rb:11:in <main>'
Topic Alpha Channel (LD#18) v1.4.0 By Jwosty Date 2011-11-24 05:21
I'll upload a Mac app for ya :)
-----
Haven't been able to try this for a bit; Ruby 1.9.3 installation doesn't like me and your game doesn't work with anything else. But now I finally got 1.9.3 installing correctly. Now to see if it works... xP

EDIT: Yeah, I can't get it to work at all now... :/
This is what it says when I try to run it from source (plus a nasty warning saying that libyaml isn't installed):
/Users/*****/.rvm/gems/ruby-1.9.3-head/gems/chipmunk-5.3.4.5/lib/chipmunk.rb:6: Use RbConfig instead of obsolete and deprecated Config.
/Users/*****/Downloads/alpha_channel_v1_2_2_SOURCE/lib/alpha_channel/game.rb:29:in
<top (required)>': uninitialized constant EXTRACT_PATH (NameError)
  from alpha_channel.rb:1:in require_relative'
  from alpha_channel.rb:1:in
<main>'
And this is what it says from the Mac app executable, after replacing all the old Alpha Channel files with the new ones:
/Users/*****/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/Main.rb:2:in require_relative': no such file to load -- /Users/******/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/alpha_channel/bin/alpha_channel.rb (LoadError)
  from /Users/******/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/Main.rb:2:in
<top (required)>'
  from <internal:lib/rubygems/custom_require>:29:in require'
  from <internal:lib/rubygems/custom_require>:29:in
require'
  from /Users/******/Desktop/alpha_channel_v1_2_1_OSX_10_6 2/Alpha_channel.app/Contents/Resources/gosu/run.rb:11:in <main>'
Not sure what any of this means.
Topic Window problemes [ruby] By Jwosty Date 2011-11-24 04:51
Could you please attach your full program? It would then be much easier to debug... xP
–––––
I might know why it's doing this. Is that system('espeak... thing the only line of code you use for the text to speech? If so, it might not exit until it is finished talking. There is a very simple fix for this, and I'll tell you if this turns out to be your problem. :)
Topic Song m4a error By Jwosty Date 2011-11-23 05:41
Mm, okay.
Topic Song m4a error By Jwosty Date 2011-11-22 19:36
What about OpenAL?
Topic Nyan Cat (not really a game) By Jwosty Date 2011-11-22 03:16
That looks interesting... I'd really like to see how you programmed the Twitter feed!
Topic Gosu 0.7.39 released By Jwosty Date 2011-11-19 04:18
Ooooh! That record thing sounds pretty nifty. So it's basically like getting a region from the screen and then being able to draw it?
Topic Smash and Grab (Supervillainous heist game) By Jwosty Date 2011-11-16 03:46
I really like those. Awesome work :D
Topic beginner's question By Jwosty Date 2011-11-14 03:00
No problem! ;)

Sorry it took so long to reply though; I've been busy
Topic beginner's question By Jwosty Date 2011-11-12 15:14
Yeah, sure!

Also, when referencing to classes, don't prefix it with @. This means it's an instance variable, like your score. But using CptnRuby.score won't work until you define that method. It isn't defined right now. Fixing this right now for you; I'll attach it when done. Should take longer than a minute total. :)

Well I assume you want to be able to run it by double-clicking on the file like you would an executable. If so and you're on a Windows computer, you should already be able to do just that. If not, then try writing a shell script for it. Need an example?
Attachment: CptnRuby.rb.zip - There we go! (3k)
Topic Smash and Grab (Supervillainous heist game) By Jwosty Date 2011-11-12 14:55
m'kay!
Topic beginner's question By Jwosty Date 2011-11-12 14:54
Tried this and it didn't exit with any errors. When I played it, the collisions were WAY off... Do you want me to attach the fixed file?
Topic beginner's question By Jwosty Date 2011-11-12 14:52
As for the first problem, I figured out that the problem code is in line 226. It happens because you never set @CptnRuby to anything, so it is nil by default. And, you never even define a score method anywhere, so it says that you never defined it for nil. Perhaps you meant to type @score?
----
I'll try this in a second and see what I get.
Topic beginner's question By Jwosty Date 2011-11-12 14:33
Huh, didn't find anything. I'll try looking at it through IntelliJ
Topic beginner's question By Jwosty Date 2011-11-12 14:29
Wow. Twice in a row someone beats me to posting :P
Topic beginner's question By Jwosty Date 2011-11-12 14:28
Awesome, looking for a problem. Also, you know you can attach files directly to your post after you post it. ;)
Topic Smash and Grab (Supervillainous heist game) By Jwosty Date 2011-11-11 23:25
Okay, that clears it up. Progress sounds great!

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill