Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

ARGSS: Remaking of RGSS Player and Library

Hi ! I just found this topic !

I'm really happy to see that you are working on a new game.exe.
I was expecting a lot of things from Youpi / Trebor777 project, and I was really sad when I saw

I was planning to replace game.exe with a complete Ruby graphical engine made with Irrlicht (because of Demonfire's work) or Gosu.
I nearly succeed to do it with RUDL and Rubygame, but these projects are no more updated.

Whatever, your solution is far much better ! :D


Contact me if you can't contact Trebor, I will spam him for you. ;)
France is with you !

______________________


I will not be able to help directly, but I can give you the Roys mail.
He is working on XNA, in order to run RM games with it. Even if he can't give you code, he worked a lot about replace game.exe, so I suppose you could have some help.


______________________

What about the licence ? It's a freeware, but will you choose something like MIT ?
We could use your work, for both commercial and non-commercial purpose, and all we need to do is to credit you ?
Something like that ?
 
Rubygame is still updated, 2.5 came out like a month or 2 ago, it's just the windows version is still at 2.3... because nobody cares about making the compiled version for windows...

vgvgf and me are on msn ^^ since a while ( how long actually xD? ) :biggrin:
 
I want to do something like this with DXLib, a Japanese game library, as well. DXLib use C and DirectX as its back end and the library feature many many game focusing features such as 4 joypads support as well as analog controllers, as well as being able to play video files :D

Could you please direct me to where I should go to learn more about embedding Ruby in C/C++ application? Right now I'm using Lua since it is very easy to embed, but I still can't get over ruby and want to use it XD
 
trebor777":2eb73fdc said:
Rubygame is still updated, 2.5 came out like a month or 2 ago, it's just the windows version is still at 2.3... because nobody cares about making the compiled version for windows...
Oh, yeah ! I was afraid because the last time I saw news, it was because the leader of the project stoped to work on it, and there was nobody to care about the job. Thanks for the news.

trebor777":2eb73fdc said:
vgvgf and me are on msn ^^ since a while ( how long actually xD? ) :biggrin:
I didn't see you a lot recently... or maybe I was the one who wasn't connected ? XD
You're lucky I didn't need to annoy.. well, that I didn't need your super knowledges. :)

I hope you will help Vgvgf a lot, so we will have a running game.exe within a few months (before 2010 will be cool). ;)

__________


I don't know if it will usefull, but I asked one month ago about compiling Ruby 1.9.1 into one exe :
http://www.ruby-forum.com/topic/187340
It's possible thanks to OCRA.

But I know it's not the solution you are looking for. ;)
 
NEW DEMO!

Big news! I am back working on it, now in vacations!!!!

I haven't been working since some time ago, cause I had to study for university, I was working a bit on RPGAE(Yeah, it is still alive now in VB.net), and also I was/am working on my new web(In spanish though).

But I have been working this week a lot and here I bring you a new demostration of ARGSS. Check the first post for downloading and for seeing the progress list.

Remember to look the ARGSS.ini, you can change the resolution from it. Also, there are new methods, checl the progress list.

Remember to report any error, bug, or problem you find.

King Kadelfek":icetwipm said:
What about the licence ? It's a freeware, but will you choose something like MIT ?
We could use your work, for both commercial and non-commercial purpose, and all we need to do is to credit you ?
Something like that ?
I still don't know. But I still have much time for thinking on it, hehe.

King Kadelfek":icetwipm said:
Contact me if you can't contact Trebor, I will spam him for you. ;)
France is with you !
Haha, Trebor is helping me on msn since a while ago.

hima":icetwipm said:
I want to do something like this with DXLib, a Japanese game library, as well. DXLib use C and DirectX as its back end and the library feature many many game focusing features such as 4 joypads support as well as analog controllers, as well as being able to play video files :D

Could you please direct me to where I should go to learn more about embedding Ruby in C/C++ application? Right now I'm using Lua since it is very easy to embed, but I still can't get over ruby and want to use it XD
For embedding Ruby, first of course, download a nice version of it, the one you like(However, I wasn't able to embed 1.9.1 yet). If you are working with MS Visual Studio, I recommend you to download the Ruby Installer 1.8.6, which includes already compiled libraries of it. Then you have to link the ruby libraries, the dinamic one or the static one, and also add the include path for: "ruby\lib\ruby\1.8\i386-mswin32" for example if you have used the windows installer, or "C:\usr\ruby-1.8.6-p386\lib\ruby\1.8\i386-mingw32" if you have compiled it with mingw.
Then, you just need to start ruby:
Code:
    ruby_init();

    rb_load_file("Scripts.rb");

    ruby_run();
And you have ruby running. There are some tutorials around internet also. And, you should also check the "Extending Ruby" from the Programming Ruby guide.
Good luck!

King Kadelfek":icetwipm said:
I don't know if it will usefull, but I asked one month ago about compiling Ruby 1.9.1 into one exe :
http://www.ruby-forum.com/topic/187340
It's possible thanks to OCRA.

But I know it's not the solution you are looking for. ;)
Thanks, I will check that :)
 
Firstly, hats off to you vgvgf! :thumb:

I might have missed it in the first post but I didn't see a Graphics.snap or similar in the list. Could you include the ability to take screenshots in-game? I'm not at all experienced in development at this level but as a casual scripter, I've always wanted that option.
 
First of all fantastic project and if you can pull this off then it will be amazing.

But the only thing that interests me is: will require work? I assume that is what you mean by "full ruby" :) it's the main thing that gripes me about RGSS and halts most of my projects :(

Oh wait you have a demo that is cool

Wow, RMXP generally runs at 27 fps for me; your demo runs at 27 fps when I have 500 sprites. (61 with 100) That's pretty cool. The resolution is definately a plus (in fact, I believe Amanda Fae was paying a hefty sum for a resolution script, you might want to contact her).
 
Fantasist":1ee6kv6e said:
Firstly, hats off to you vgvgf! :thumb:

I might have missed it in the first post but I didn't see a Graphics.snap or similar in the list. Could you include the ability to take screenshots in-game? I'm not at all experienced in development at this level but as a casual scripter, I've always wanted that option.
Thanks Fantasist :)
I will add that option, like the RMVX one. In the progress list I have only added RMXP RGSS methods, I have to update it also with RMVX ones like the snapshot and some others.

Commodore Whynot":1ee6kv6e said:
First of all fantastic project and if you can pull this off then it will be amazing.

But the only thing that interests me is: will require work? I assume that is what you mean by "full ruby" :) it's the main thing that gripes me about RGSS and halts most of my projects :(

Oh wait you have a demo that is cool

Wow, RMXP generally runs at 27 fps for me; your demo runs at 27 fps when I have 500 sprites. (61 with 100) That's pretty cool. The resolution is definately a plus (in fact, I believe Amanda Fae was paying a hefty sum for a resolution script, you might want to ontact her).
Thanks Wyatt.
Actualy, require works in the demo. Add this to the demo, it will change the Scripts.rb file and add the file Win32API.so. It's just some testing script for requiring a .so file and testing some Win32API.
I will see later to include Win32API in the .exe or the .dll.

Also, I have seen that paid request, but this will be free and I don't wan't people pay for it. Maybe I will accept donations later for a new computer and as an incentive.
 
Would this project be released under an open source license?
I remember you saying that you like to work alone, in that case would you be interested in only open sourcing the code while still working on it yourself without other contributors? I understand if you just like keeping your code to yourself, but it's just a very exciting project and I'm sure many people would be interested in learning more about it.
 
Cowlol":2bfan8ni said:
Would this project be released under an open source license?
I remember you saying that you like to work alone, in that case would you be interested in only open sourcing the code while still working on it yourself without other contributors? I understand if you just like keeping your code to yourself, but it's just a very exciting project and I'm sure many people would be interested in learning more about it.
I still don't which license to use. And I won't release to the public the sources of the project without a license. However, I have a quick solution for really interesed people on the project. I have uploaded the project to DropBox, so make an account there if you haven't one already(Use my referral code) and send me a PM with the email you used for registration and I will share the ARGSS codes with you Cowlol, and also other interested and trustable people(If I don't know you, don't expect I will share the codes with you...).
 
I have the Window class, re-written by Sewlyn if you'd like it. It could use some cleanup work, but at the very least it works just like the origional and you can even define the width of the border margins too, which is nice (I never did like the 16 pixel border, I always wanted to reduce it, apparently you can with this...)

Code:
#==============================================================================

# ¦ Window - Hidden RGSS Class

#------------------------------------------------------------------------------

#  by Selwyn

#==============================================================================

 

#==============================================================================

# ¦ Bitmap

#==============================================================================

 

class Bitmap

 #--------------------------------------------------------------------------

 # ? erase

 #--------------------------------------------------------------------------

 def erase(*args)

   if args.size == 1

     rect = args[0]

   elsif args.size == 4

     rect = Rect.new(*args)

   end

   fill_rect(rect, Color.new(0, 0, 0, 0))

 end

end

 

#==============================================================================

# ? SG

#------------------------------------------------------------------------------

#  Selwyn's Graphics module

#==============================================================================

 

module SG

#==============================================================================

# ¦ SG::Skin

#==============================================================================

 

class Skin

 #--------------------------------------------------------------------------

 # ? instances settings

 #--------------------------------------------------------------------------

 attr_reader   :margin

 attr_accessor :bitmap

 #--------------------------------------------------------------------------

 # ? initialize

 #--------------------------------------------------------------------------

 def initialize

   @bitmap = nil

   @values = {}

   @values['bg'] = Rect.new(0, 0, 128, 128)

   @values['pause0'] = Rect.new(160, 64, 16, 16)

   @values['pause1'] = Rect.new(176, 64, 16, 16)

   @values['pause2'] = Rect.new(160, 80, 16, 16)

   @values['pause3'] = Rect.new(176, 80, 16, 16)

   @values['arrow_up'] = Rect.new(152, 16, 16, 8)

   @values['arrow_down'] = Rect.new(152, 40, 16, 8)

   @values['arrow_left'] = Rect.new(144, 24, 8, 16)

   @values['arrow_right'] = Rect.new(168, 24, 8, 16)

   self.margin = 16

 end

 #--------------------------------------------------------------------------

 # ? width

 #--------------------------------------------------------------------------

 def margin=(width)

   @margin = width

   set_values

 end

 #--------------------------------------------------------------------------

 # ? set_values

 #--------------------------------------------------------------------------

 def set_values

   w = @margin

   @values['ul_corner'] = Rect.new(128, 0, w, w)

   @values['ur_corner'] = Rect.new(192-w, 0, w, w)

   @values['dl_corner'] = Rect.new(128, 64-w, w, w)

   @values['dr_corner'] = Rect.new(192-w, 64-w, w, w)

   @values['up'] = Rect.new(128+w, 0, 64-2*w, w)

   @values['down'] = Rect.new(128+w, 64-w, 64-2*w, w)

   @values['left'] = Rect.new(128, w, w, 64-2*w)

   @values['right'] = Rect.new(192-w, w, w, 64-2*w)

 end

 #--------------------------------------------------------------------------

 # ? []

 #--------------------------------------------------------------------------

 def [](value)

   return @values[value]

 end

end

 

 

#==============================================================================

# ¦ SG::Cursor_Rect

#==============================================================================

 

class Cursor_Rect < ::Sprite

 #--------------------------------------------------------------------------

 # ? instances settings

 #--------------------------------------------------------------------------

 attr_reader   :height, :width, :skin, :margin

 #--------------------------------------------------------------------------

 # ? initialize

 #--------------------------------------------------------------------------

 def initialize(viewport)

   super(viewport)

   @width = 0

   @height = 0

   @skin = nil

   @margin = 0

   @rect = {}

   @rect['cursor_up'] = Rect.new(129, 64, 30, 1)

   @rect['cursor_down'] = Rect.new(129, 95, 30, 1)

   @rect['cursor_left'] = Rect.new(128, 65, 1, 30)

   @rect['cursor_right'] = Rect.new(159, 65, 1, 30)

   @rect['upleft'] = Rect.new(128, 64, 1, 1)

   @rect['upright'] = Rect.new(159, 64, 1, 1)

   @rect['downleft'] = Rect.new(128, 95, 1, 1)

   @rect['downright'] = Rect.new(159, 95, 1, 1)

   @rect['bg'] = Rect.new(129, 65, 30, 30)

 end

 #--------------------------------------------------------------------------

 # ? margin=

 #--------------------------------------------------------------------------

 def margin=(margin)

   @margin = margin

   set(x, y, width, height)

 end

 #--------------------------------------------------------------------------

 # ? skin=

 #--------------------------------------------------------------------------

 def skin=(skin)

   @skin = skin

   draw_rect

 end

 #--------------------------------------------------------------------------

 # ? width=

 #--------------------------------------------------------------------------

 def width=(width)

   return if @width == width

   @width = width

   if @width == 0 and self.bitmap != nil

     self.bitmap.dispose

     self.bitmap = nil

   end

   draw_rect

 end

 #--------------------------------------------------------------------------

 # ? height=

 #--------------------------------------------------------------------------

 def height=(height)

   return if @height == height

   @height = height

   if @height == 0 and self.bitmap != nil

     self.bitmap.dispose

     self.bitmap = nil

   end

   draw_rect

 end

 #--------------------------------------------------------------------------

 # ? set

 #--------------------------------------------------------------------------

 def set(x, y, width, height)

   self.x = x + @margin

   self.y = y + @margin

   if @width != width or @height != height

     @width = width

     @height = height

     if width > 0 and height > 0

       draw_rect

     end

   end

 end

 #--------------------------------------------------------------------------

 # ? empty

 #--------------------------------------------------------------------------

 def empty

   self.x = 0

   self.y = 0

   self.width = 0

   self.height = 0

 end

 #--------------------------------------------------------------------------

 # ? draw_rect

 #--------------------------------------------------------------------------

 def draw_rect

   return if @skin == nil

   if @width > 0 and @height > 0

     self.bitmap = Bitmap.new(@width, @height)

     rect = Rect.new(1, 1, @width - 2, @height - 2)

     self.bitmap.stretch_blt(rect, @skin, @rect['bg'])

     self.bitmap.blt(0, 0, @skin, @rect['upleft'])

     self.bitmap.blt(@width-1, 0, @skin, @rect['upright'])

     self.bitmap.blt(0, @height-1, @skin, @rect['downright'])

     self.bitmap.blt(@width-1, @height-1, @skin, @rect['downleft'])

     rect = Rect.new(1, 0, @width - 2, 1)

     self.bitmap.stretch_blt(rect, @skin, @rect['cursor_up'])

     rect = Rect.new(0, 1, 1, @height - 2)

     self.bitmap.stretch_blt(rect, @skin, @rect['cursor_left'])

     rect = Rect.new(1, @height-1, @width - 2, 1)

     self.bitmap.stretch_blt(rect, @skin, @rect['cursor_down'])

     rect = Rect.new(@width - 1, 1, 1, @height - 2)

     self.bitmap.stretch_blt(rect, @skin, @rect['cursor_right'])

   end

 end

end

 

#==============================================================================

# ¦ SG::Window

#------------------------------------------------------------------------------

#  

#==============================================================================

 

class Window

 #--------------------------------------------------------------------------

 # ? set instances variables

 #--------------------------------------------------------------------------

 attr_reader(:x, :y, :z, :width, :height, :ox, :oy, :opacity, :back_opacity,

             :stretch, :contents_opacity, :visible, :pause)

 attr_accessor :active

 #--------------------------------------------------------------------------

 # ? initialize

 #--------------------------------------------------------------------------

 def initialize()

   @skin = Skin.new

   @viewport = Viewport.new(0, 0, 0, 0)

   @cr_vport = Viewport.new(0, 0, 0, 0)

   @width = 0

   @height = 0

   @ox = 0

   @oy = 0

   @opacity = 255

   @back_opacity = 255

   @contents_opacity = 255

   @frame   = Sprite.new()

   @bg      = Sprite.new()

   @window  = Sprite.new(@viewport)

   @pause_s = Sprite.new()

   @arrows = []

   for i in 0...4

     @arrows.push(Sprite.new(@cr_vport))

     @arrows[i].bitmap = Bitmap.new(16, 16)

     @arrows[i].visible = false

   end

   @cursor_rect = Cursor_Rect.new(@cr_vport)

   @cursor_rect.margin = @skin.margin

   @cursor_fade = true

   @pause_s.visible = false

   @pause = false

   @active = true

   @stretch = true

   @visible = true

   self.x = 0

   self.y = 0

   self.z = 100

   self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name)

 end

 #--------------------------------------------------------------------------

 # ? contents=

 #--------------------------------------------------------------------------

 def contents=(bmp)

   @window.bitmap = bmp

   if bmp != nil

     if bmp.width > @viewport.rect.width

        bmp.height > @viewport.rect.height

       draw_arrows

     end

   end

 end

 #--------------------------------------------------------------------------

 # ? contents

 #--------------------------------------------------------------------------

 def contents

   return @window.bitmap

 end

 #--------------------------------------------------------------------------

 # ? dispose

 #--------------------------------------------------------------------------

 def dispose

   @bg.dispose

   @frame.dispose

   @window.dispose

   @cursor_rect.dispose

   @viewport.dispose

   @pause_s.dispose

   @cr_vport.dispose

   for arrow in @arrows

     arrow.dispose

   end

 end

 #--------------------------------------------------------------------------

 # ? update

 #--------------------------------------------------------------------------

 def update

   @window.update

   @cursor_rect.update

   @viewport.update

   @cr_vport.update

   @pause_s.src_rect = @skin["pause#{(Graphics.frame_count / 8) % 4}"]

   @pause_s.update

   update_visible

   update_arrows

   if @cursor_fade

     @cursor_rect.opacity -= 10

     @cursor_fade = false if @cursor_rect.opacity <= 100

   else

     @cursor_rect.opacity += 10

     @cursor_fade = true if @cursor_rect.opacity >= 255

   end

 end

 #--------------------------------------------------------------------------

 # ? update_visible

 #--------------------------------------------------------------------------

 def update_visible

   @frame.visible = @visible

   @bg.visible = @visible

   @window.visible = @visible

   @cursor_rect.visible = @visible

   if @pause

     @pause_s.visible = @visible

   else

     @pause_s.visible = false

   end

 end

 #--------------------------------------------------------------------------

 # ? pause=

 #--------------------------------------------------------------------------

 def pause=(pause)

   @pause = pause

   update_visible

 end

 #--------------------------------------------------------------------------

 # ? update_arrows

 #--------------------------------------------------------------------------

 def update_arrows

   if @window.bitmap == nil or @visible == false

     for arrow in @arrows

       arrow.visible = false

     end

   else

     @arrows[0].visible = @oy > 0

     @arrows[1].visible = @ox > 0

     @arrows[2].visible = (@window.bitmap.width - @ox) > @viewport.rect.width

     @arrows[3].visible = (@window.bitmap.height - @oy) > @viewport.rect.height

   end

 end

 #--------------------------------------------------------------------------

 # ? visible=

 #--------------------------------------------------------------------------

 def visible=(visible)

   @visible = visible

   update_visible

   update_arrows

 end

 #--------------------------------------------------------------------------

 # ? x=

 #--------------------------------------------------------------------------

 def x=(x)

   @x = x

   @bg.x = x + 2

   @frame.x = x

   @viewport.rect.x = x + @skin.margin

   @cr_vport.rect.x = x

   @pause_s.x = x + (@width / 2) - 8

   set_arrows

 end

 #--------------------------------------------------------------------------

 # ? y=

 #--------------------------------------------------------------------------

 def y=(y)

   @y = y

   @bg.y = y + 2

   @frame.y = y

   @viewport.rect.y = y + @skin.margin

   @cr_vport.rect.y = y

   @pause_s.y = y + @height - @skin.margin

   set_arrows

 end

 #--------------------------------------------------------------------------

 # ? z=

 #--------------------------------------------------------------------------

 def z=(z)

   @z = z

   @bg.z = z

   @frame.z = z + 1

   @cr_vport.z = z + 2

   @viewport.z = z + 3

   @pause_s.z = z + 4

 end

 #--------------------------------------------------------------------------

 # ? ox=

 #--------------------------------------------------------------------------

 def ox=(ox)

   return if @ox == ox

   @ox = ox

   @viewport.ox = ox

   update_arrows

 end

 #--------------------------------------------------------------------------

 # ? oy=

 #--------------------------------------------------------------------------

 def oy=(oy)

   return if @oy == oy

   @oy = oy

   @viewport.oy = oy

   update_arrows

 end

 #--------------------------------------------------------------------------

 # ? width=

 #--------------------------------------------------------------------------

 def width=(width)

   @width = width

   @viewport.rect.width = width - @skin.margin * 2

   @cr_vport.rect.width = width

   if @width > 0 and @height > 0

     @frame.bitmap = Bitmap.new(@width, @height)

     @bg.bitmap = Bitmap.new(@width - 4, @height - 4)

     draw_window

   end

   self.x = @x

   self.y = @y

 end

 #--------------------------------------------------------------------------

 # ? height=

 #--------------------------------------------------------------------------

 def height=(height)

   @height = height

   @viewport.rect.height = height - @skin.margin * 2

   @cr_vport.rect.height = height

   if @height > 0 and @width > 0

     @frame.bitmap = Bitmap.new(@width, @height)

     @bg.bitmap = Bitmap.new(@width - 4, @height - 4)

     draw_window

   end

   self.x = @x

   self.y = @y

 end

 #--------------------------------------------------------------------------

 # ? opacity=

 #--------------------------------------------------------------------------

 def opacity=(opacity)

   value = [[opacity, 255].min, 0].max

   @opacity = value

   @contents_opacity = value

   @back_opacity = value

   @frame.opacity = value

   @bg.opacity = value

   @window.opacity = value

 end

 #--------------------------------------------------------------------------

 # ? back_opacity=

 #--------------------------------------------------------------------------

 def back_opacity=(opacity)

   value = [[opacity, 255].min, 0].max

   @back_opacity = value

   @bg.opacity = value

 end

 #--------------------------------------------------------------------------

 # ? contents_opacity=

 #--------------------------------------------------------------------------

 def contents_opacity=(opacity)

   value = [[opacity, 255].min, 0].max

   @contents_opacity = value

   @window.opacity = value

 end

 #--------------------------------------------------------------------------

 # ? cursor_rect

 #--------------------------------------------------------------------------

 def cursor_rect

   return @cursor_rect

 end

 #--------------------------------------------------------------------------

 # ? cursor_rect=

 #--------------------------------------------------------------------------

 def cursor_rect=(rect)

   @cursor_rect.x = rect.x

   @cursor_rect.y = rect.y

   if @cursor_rect.width != rect.width or @cursor_rect.height != rect.height

     @cursor_rect.set(@cursor_rect.x, @cursor_rect.y, rect.width, rect.height)

   end

 end

 #--------------------------------------------------------------------------

 # ? windowskin

 #--------------------------------------------------------------------------

 def windowskin

   return @skin.bitmap

 end

 #--------------------------------------------------------------------------

 # ? windowskin=

 #--------------------------------------------------------------------------

 def windowskin=(windowskin)

   return if windowskin == nil

   if @skin.bitmap != windowskin

     @pause_s.bitmap = windowskin

     @pause_s.src_rect = @skin['pause0']

     @skin.bitmap = windowskin

     @cursor_rect.skin = windowskin

     draw_window

     draw_arrows

   end

 end

 #--------------------------------------------------------------------------

 # ? margin=

 #--------------------------------------------------------------------------

 def margin=(margin)

   if @skin.margin != margin

     @skin.margin = margin

     self.x = @x

     self.y = @y

     temp = @height

     self.height = 0

     self.width = @width

     self.height = temp

     @cursor_rect.margin = margin

     set_arrows

   end

 end

 #--------------------------------------------------------------------------

 # ? stretch=

 #--------------------------------------------------------------------------

 def stretch=(bool)

   if @stretch != bool

     @stretch = bool

     draw_window

   end

 end

 #--------------------------------------------------------------------------

 # ? set_arrows

 #--------------------------------------------------------------------------

 def set_arrows

   @arrows[0].x = @width / 2 - 8

   @arrows[0].y = 8

   @arrows[1].x = 8

   @arrows[1].y = @height / 2 - 8

   @arrows[2].x = @width - 16

   @arrows[2].y = @height / 2 - 8

   @arrows[3].x = @width / 2 - 8

   @arrows[3].y = @height - 16

 end

 #--------------------------------------------------------------------------

 # ? draw_arrows

 #--------------------------------------------------------------------------

 def draw_arrows

   return if @skin.bitmap == nil

   @arrows[0].bitmap.blt(0, 0, @skin.bitmap, @skin['arrow_up'])

   @arrows[1].bitmap.blt(0, 0, @skin.bitmap, @skin['arrow_left'])

   @arrows[2].bitmap.blt(0, 0, @skin.bitmap, @skin['arrow_right'])

   @arrows[3].bitmap.blt(0, 0, @skin.bitmap, @skin['arrow_down'])

   update_arrows

 end

 #--------------------------------------------------------------------------

 # ? draw_window

 #--------------------------------------------------------------------------

 def draw_window

   return if @skin.bitmap == nil

   return if @width == 0 or @height == 0

   m = @skin.margin

   if @frame.bitmap.nil?

     @frame.bitmap = Bitmap.new(@width, @height)

     @bg.bitmap = Bitmap.new(@width - 4, @height - 4)

   end

   @frame.bitmap.clear

   @bg.bitmap.clear

   if @stretch

     dest_rect = Rect.new(0, 0, @width-4, @height-4)

     @bg.bitmap.stretch_blt(dest_rect, @skin.bitmap, @skin['bg'])

   else

     bgw = Integer((@width-4) / 128) + 1

     bgh = Integer((@height-4) / 128) + 1

     for x in 0..bgw

       for y in 0..bgh

         @bg.bitmap.blt(x * 128, y * 128, @skin.bitmap, @skin['bg'])

       end

     end

   end

   bx = Integer((@width - m*2) / @skin['up'].width) + 1

   by = Integer((@height - m*2) / @skin['left'].height) + 1

   for x in 0..bx

     w = @skin['up'].width

     @frame.bitmap.blt(x * w + m, 0, @skin.bitmap, @skin['up'])

     @frame.bitmap.blt(x * w + m, @height - m, @skin.bitmap, @skin['down'])

   end

   for y in 0..by

     h = @skin['left'].height

     @frame.bitmap.blt(0, y * h + m, @skin.bitmap, @skin['left'])

     @frame.bitmap.blt(@width - m, y * h + m, @skin.bitmap, @skin['right'])

   end

   @frame.bitmap.erase(@width - m, 0, m, m)

   @frame.bitmap.erase(0, @height - m, m, m)

   @frame.bitmap.erase(@width - m, @height - m, m, m)

   @frame.bitmap.blt(0, 0, @skin.bitmap, @skin['ul_corner'])

   @frame.bitmap.blt(@width - m, 0, @skin.bitmap, @skin['ur_corner'])

   @frame.bitmap.blt(0, @height - m, @skin.bitmap, @skin['dl_corner'])

   @frame.bitmap.blt(@width - m, @height - m, @skin.bitmap, @skin['dr_corner'])

 end

end

 

end 

 

If I come across anything else, as far as re-written RGSS classes, I'll try and save it and post it for you just so you can have some reference.

Good luck on this project :thumb:
 
Thanks Kain Nobel, though I have it already, hehe. I have too the Plane class rewrite by Selwyn, I think it was made by him too, and also lots of Tileset rewrites.

Also, somebody knows how to use freetype library for drawing a text to a bitmap, or another good alternative for drawing text?
 

MauMau

Member

Maybe this link of DerVVulfman with SFonts can help you:
http://houseslasher.com/index.php?showtopic=323

There's an error in the demo (ia_a? => is_a?)

Any Help you need you can ask me, C/C++/Ruby/RGSS
I will always try to help you!

Continue this great job and please make it open source, maybe not now but in a near future, so the code will always exist.

OH, I was reading the first page and Console class is there!
here(RMXP) i use some Win32API to have the console opened, puts and gets methods working.
I only use those for debugging.

Code:
 

AC = Win32API.new('kernel32', 'AllocConsole', '', 'l')

SFW = Win32API.new('user32', 'SetForegroundWindow', 'l', 'l')

HWND = Win32API.new('user32', 'GetActiveWindow', '', 'l').call

 

def debug

  AC.call

  SFW.call(HWND)

  $stdout.reopen('CONOUT$')

  $stdin.reopen('CONIN$')

end

 

debug

puts 'Hello World in Console'

gets gets

 

Sorry for any english errors and Good Luck, MauMau
 
I haven't seen that typo in the demo, as I haven't had errors when testing it. Also, I will see to implement SFont, but I have managed to have freetype working now :)

Thanks MauMau
 
I have only two words to say : GREAT work !
I looked for a way to work on a RGSS like library without RM for a long time, and you've just brought me the way to do that !

Just a question : could we get the C/C++ sources ? I'd like to get them for two reasons :
- Learn how to display a Sprite and create Bitmap in C/C++.
- Try to change or add something to the library, like drawing fonctions (draw_circle, etc...), which are faster in C/C++ than in Ruby.

You're doing a very great work, congratulations, and thank you !
As King Kadelfek said, France is with you !

(Sorry for English errors)


RPG-man


Edit : Tested ! It works well ! However, I have some thing to tell you about it :
- Win32API is not included, and no Input fonctions are already in ARGSS, so, I can't create myself Win32API Input fonctions...
- Zlib isn't integrated too. Could you please include Zlib to the exe ? It's very usefull for data encoding, and script encoding ! I made a system which create a script containing all the others scripts, and the scripts inside are usually compressed with Zlib, but beccause Zlib is not included, I can't compress my scripts. :sad:
- How to change Ruby version in the exe ? I've heard something interesting about Ruby on its site : since version 2.0, Ruby would be pre-compiled in byte code... It's very interesting beccause Ruby code execution will be faster !


However, ARGSS is perfectly usable, and it's very agreable to program with this library on an IDE like NetBeans !
 
@RPG-man
vgvgf":3bl3j1qq said:
I still don't which license to use. And I won't release to the public the sources of the project without a license. However, I have a quick solution for really interesed people on the project. I have uploaded the project to DropBox, so make an account there if you haven't one already(Use my referral code) and send me a PM with the email you used for registration and I will share the ARGSS codes with you Cowlol, and also other interested and trustable people(If I don't know you, don't expect I will share the codes with you...).

Adding Zlib is actually a very good idea. I'd love to see how that's done too.


Also, Vgvgf I've finally managed to embedded ruby into my engine now. Thank you so much!
 
RPG-man":rb9h78lt said:
I have only two words to say : GREAT work !
I looked for a way to work on a RGSS like library without RM for a long time, and you've just brought me the way to do that !

Just a question : could we get the C/C++ sources ? I'd like to get them for two reasons :
- Learn how to display a Sprite and create Bitmap in C/C++.
- Try to change or add something to the library, like drawing fonctions (draw_circle, etc...), which are faster in C/C++ than in Ruby.

You're doing a very great work, congratulations, and thank you !
As King Kadelfek said, France is with you !

(Sorry for English errors)


RPG-man


Edit : Tested ! It works well ! However, I have some thing to tell you about it :
- Win32API is not included, and no Input fonctions are already in ARGSS, so, I can't create myself Win32API Input fonctions...
- Zlib isn't integrated too. Could you please include Zlib to the exe ? It's very usefull for data encoding, and script encoding ! I made a system which create a script containing all the others scripts, and the scripts inside are usually compressed with Zlib, but beccause Zlib is not included, I can't compress my scripts. :sad:
- How to change Ruby version in the exe ? I've heard something interesting about Ruby on its site : since version 2.0, Ruby would be pre-compiled in byte code... It's very interesting beccause Ruby code execution will be faster !


However, ARGSS is perfectly usable, and it's very agreable to program with this library on an IDE like NetBeans !
Thanks RPG man :)

I will release the sources of ARGSS, but not right now. However, look this post I made http://www.arpgmaker.com/viewtopic.php?p=649622#p649622

Win32API can be included with require, but I will add it internaly to the library. See this: http://www.arpgmaker.com/viewtopic.php?p=649275#p649275

I will include ZLib, remember that this will work the same as RMXP/RMVX plus some extra things. Actualy, it is already included for loading .png graphics, but it isn't available for ruby, hehe. I will add it.

Regarding the Ruby version, I am using right now 1.8.6, and I will update to 1.9.1 when I can make it work, I still can't do so, but I haven't worked on that really much...
If version 2.00 comes out, I will also see to upgrade to it.

hima":rb9h78lt said:
Also, Vgvgf I've finally managed to embedded ruby into my engine now. Thank you so much!
That sounds good! If you need help, just ask.
 
I will release the sources of ARGSS, but not right now. However, look this post I made http://www.arpgmaker.com/viewtopic ... 22#p649622
OK. I did the same thing with PGE, no accessible code (no demo) before the license :)

Win32API can be included with require, but I will add it internaly to the library. See this: http://www.arpgmaker.com/viewtopic ... 75#p649275
Good, thank you ! :)

I will include ZLib, remember that this will work the same as RMXP/RMVX plus some extra things. Actualy, it is already included for loading .png graphics, but it isn't available for ruby, hehe. I will add it.
OK :). By the way, on Ruby where is Zlib ? When I execute my .rb files which use Zlib, I don't have any problem (if I don't put require 'Zlib') whereas when I create my .exe file, Zlib isn't included anymore...

Regarding the Ruby version, I am using right now 1.8.6, and I will update to 1.9.1 when I can make it work, I still can't do so, but I haven't worked on that really much...
If version 2.00 comes out, I will also see to upgrade to it.
OK :)
So, we can't change easily Ruby version...
 
the zlib library is a .so file that you can find in the folder:
ruby_install/lib/ruby/site_ruby/1.8/i386-msvcrt/

but for ruby 1.9.x, I think it's different: ruby_install/lib/ruby/1.9.1/i386-mswin32
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top