Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 24th, 2006, 5:52 AM   #1
Master
Programmer
 
Master's Avatar
 
Join Date: Sep 2005
Location: GA
Posts: 99
Rep Power: 3 Master is on a distinguished road
Any need a game library wrapper of RUDL(rubyese directmedia library)

If anyone want me to post my game library i wrote with the RUDL classes. I think it will be quick useful for making games. just respond with "sure post it"
Master is offline   Reply With Quote
Old Mar 25th, 2006, 9:26 AM   #2
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 639
Rep Power: 4 Jessehk is on a distinguished road
Sure, post it.

*Though it should probably be in Finished Projects*
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old Mar 25th, 2006, 4:00 PM   #3
Master
Programmer
 
Master's Avatar
 
Join Date: Sep 2005
Location: GA
Posts: 99
Rep Power: 3 Master is on a distinguished road
To use it, you need to first install rudl on your computer. I have not made any guide for using it. but once you look at the code, you should be able to manage it. first open the main, you will see something like this
when "Map"
w,h = 1020, 700
win_name = "Map Editor"

the name after the when is used for variable called WINTYPE
w,h are the width and height of the window to use
win_name is the title for the window you are using
when creating a game, it is better to do something like this

template
WINTYPE = "MegamanZero" #name of window type according to main.rb
#required files for api uses such as playing music and video
require "Win32API"
#required for keyinputs
#ex of using keyboard is Keyboard.keyboard($R_Key_Letter)#letter is the key on the keyboard such as A to Z
require "Keyboard2"
#required for mouse inputs
require "Mouse"
#required this file for majority of all the class, such as sprite, color,bitmap
require "Scripts"
#require this when you need to use some function from it
require "Extend"
#you have to require this in your mainruby files
require "Main"
#required for use of your own custom class that you have made
#the one below is an example of what i did, i called the file that have all my classes in the zero folder which i made
require 'Zero/MegamanZero'

#you are required to created a simple class with anyname you wish
class MZ
       #initialize anything you want here
	def initialize()
		@game = Game.new() #this is a class called from my custom class
	end
	
        #the main function is for updated the state of the game.
        #you don't have to put a code here if you are not updating anything
	def main()
		@game.update
	end




end

$main   = MZ.new #call the name of your class for your game.
#you must use the $main variable, because once you call the below code, it looks for '$main'
$engine = MainSystem.new#you can intialized mainsystem with anyvariable #name even local variable, i just chose to use what i feel.


if you have any problem with it or you need to understand something better, you can ask it here

hope you enjoy it ^_^
Attached Files
File Type: zip Engine.zip (23.9 KB, 32 views)
Master is offline   Reply With Quote
Old Mar 26th, 2006, 10:20 AM   #4
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Red face

I downloaded your Engine.zip file. What is a .rar file?
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Mar 26th, 2006, 11:43 AM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
A RAR file is another form of compressed file. Check out WinRAR.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 26th, 2006, 1:25 PM   #6
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Talking

Thanks a lot Ooble!

So, Master zips a RAR file and I am supposed to buy WinRar to decompress it?

I have some thousand year old cheese to sell!
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Mar 26th, 2006, 1:37 PM   #7
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
Quote:
Originally Posted by Dietrich
I have some thousand year old cheese to sell!
I don't get it...

No, you don't have to buy winrar, it's free. The free version is only a trial though, it doesn't expire.
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote
Old Mar 26th, 2006, 1:49 PM   #8
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

Quote:
No, you don't have to buy winrar, it's free. The free version is only a trial though, it doesn't expire.
Oy, I didn't get that notion from the website.

http://www.rarlabs.com/
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old Mar 26th, 2006, 3:04 PM   #9
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
http://www.rarlabs.com/rar/wrar351.exe
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote
Old Mar 26th, 2006, 7:38 PM   #10
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Quote:
Originally Posted by jayme
Thanks jayme, very nice program!

Now if I could only get RUDL to work. Is RUDL for Linux only? It seems to install as Rudl.so instead of Rudl.exe ?? Even the install-on-windows.rb doesn't help much.

RUDL sounds promising, the SDL wrapper for Ruby, similar to Python's PyGame.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:18 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC