Forums Archived

The forums are being archived. See this topic for more information.

I have no clue what I'm doing.

Get help and support with Rubygame

I have no clue what I'm doing.

Postby Paul38 » Wed Jan 20, 2010 9:41 pm

Hi Everyone,

I have been trying to get rubygame working for hours with no success, and I've come to accept the fact that I have no clue what I'm doing and that this technology is way beyond what I'm used to (writing simple games with VB 6.0 in the late 90's/early 00's). :cry:

Anyway, I downloaded the various SDL dll files, extracted them, and copied them into the Windows\system32 folder, but for some reason I am still getting the following messages

Warning: Could not load SDL_gfx! Continuing anyway, but some Surface methods will be missing.
Error message was: "Could not load SDL_gfx."
Warning: Could not load SDL_image! Continuing anyway, but image loading will be missing.
Error message was: "Could not load SDL_image."
Warning: Could not load SDL_mixer! Continuing anyway, but audio features will be missing.
Error message was: "Could not load SDL_mixer."
Warning: Could not load SDL_ttf! Continuing anyway, but the TTF class will be missing.
Error message was: "Could not load SDL_ttf."

I know that these particular .dll files are in the System32 folder, but in those original zip files that we download, there are a lot of other files besides those. Where are they supposed to go? Do we need them? The only thing I've done was put the .dll files in said folder like the wiki says.

I'm also working on Windows 7, if that affects anything.

If anyone could help me get this working, it would be awesome... thanks.
Paul38
 
Posts: 2
Joined: Wed Jan 20, 2010 9:15 pm

Re: I have no clue what I'm doing.

Postby jacius » Sat Jan 23, 2010 5:05 am

I'm afraid I'm not sure what the problem is. I'm not a Windows user, so... :(

Paul38 wrote:I know that these particular .dll files are in the System32 folder, but in those original zip files that we download, there are a lot of other files besides those. Where are they supposed to go? Do we need them? The only thing I've done was put the .dll files in said folder like the wiki says.

I'm pretty sure that the DLLs are the only files that you need for Rubygame. If the zip files have other DLLs (I just checked the SDL_image one, and I see that it has jpeg.dll, libpng12-0.dll, etc.), those should also go into the System32 folder.
User avatar
jacius
Site Admin
 
Posts: 131
Joined: Fri Feb 06, 2009 11:13 pm

Re: I have no clue what I'm doing.

Postby Paul38 » Wed Jan 27, 2010 4:49 pm

It's still not working for me, even after installing all of the .dll's.

SDL_gfx has a lot more stuff in there than just .dll files... there's a bunch of stuff in there with .c and .h extensions. But I think whatever issue I'm having is unrelated to that, since even SDL_Image, which consists entirely of .dll files that are all in my System32 folder, is throwing up that error.

I wasn't being realistic... my intention was to learn Ruby by writing a game in it and picking up syntax as I went along, but it's not a language for beginners.

Thanks for the help, though. :)
Paul38
 
Posts: 2
Joined: Wed Jan 20, 2010 9:15 pm

Re: I have no clue what I'm doing.

Postby cgmjr » Thu Jan 28, 2010 3:21 pm

I am also using Windows 7. I noticed a couple of things in my own installation:

1. I can't "see" the dlls in /system32, even though my login has admin rights. But, when I try to unzip them again, I get an overwrite message. So I know they are there, and my install of rubygame finds them.

2. I often forget to turn off "use folder names" in Winzip (or your equivalent), and unzip into directories under my intended target.

I can confirm that you only need SDL_gfx.

Don't give up! Ruby's syntax can be a bit cryptic, but there is SO much online help from the community that you can overcome obstacles.
User avatar
cgmjr
 
Posts: 39
Joined: Mon Jan 11, 2010 6:41 am

Re: I have no clue what I'm doing.

Postby neil » Thu May 20, 2010 2:21 am

Thanks for the hint that it was DLL-related. I had the same problem on Debian Lenny and it was fixed by:

Code: Select all
sudo apt-get install libsdl-gfx1.2-4 libsdl-ttf2.0-0
neil
 
Posts: 1
Joined: Thu May 20, 2010 2:17 am

Re: I have no clue what I'm doing.

Postby Groogy » Thu May 20, 2010 4:18 am

Paul, don't know if you'll read this but you should learn Ruby before attempting to make a game. Ruby is way different from VB.

I recommend that you follow this http://ruby-doc.org/docs/ProgrammingRuby/ guide. It's excellent and it will cover basic stuff of Ruby but also go into things like writing your own extensions for Ruby(you can jump past those if your not interested) and also a quick tour of GUI's in Tk.

You can also find the API for the different ruby versions at http://ruby-doc.org/ which I recommend for you to bookmark.

Hope you'll stay with us and enjoy Ruby, best languages of all times if you ask me. ;)
Groogy
 
Posts: 11
Joined: Tue May 18, 2010 10:57 am

Re: I have no clue what I'm doing.

Postby makkura » Fri Jul 23, 2010 5:30 am

If you have the various SDL dll files downloaded then what worked for loading them for me was adding a path to my script as described in the wiki: http://rubygame.org/wiki/Custom_SDL_load_paths

I put them in a directory 'sdl' directly beneath the directory I am working in.
So something like:
mygame/mygame.rb
mygame/sdl/SDL.dll
mygame/sdl/SDL_*.dll

After that, I also had an error with libfreetype-6.dll which is located in my 'sdl' directory.
I appended the sdl directory to my environment path so it would look there as well.

My code looks like:
Code: Select all
main_dir = Dir.pwd() #using Dir.pwd() instead of File.dirname(__FILE__) due to the latter method returning the /config folder
SDL_PATHS = [ File.join( main_dir, "sdl/" ) ]
ENV['PATH'] += ";#{main_dir}/sdl/"

require "rubygems"
require "rubygame"


If you want them in your windows directory, drop them in c:\windows\syswow64\ as described here:
http://rubygame.org/forums/viewtopic.php?f=3&t=101&start=0

I hope that is clear enough.
Please let me know if you need some clarification.
makkura
 
Posts: 2
Joined: Fri Jul 23, 2010 5:03 am


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron