Baldur's Game - a GUI for RMXP [DEMO]

GUI for RMXPVersion: 0.1
By: King Kadelfek

Introduction

Hello I'm King Kadelfek, the leader of the DreaMaker's project.

Today, I would show you my new application.


I created a GUI (a set of windows and buttons), working with RMXP.
By use of a Graphical User Interface you can provide a slightly more windows feel to dialogs for accept/cancel etc windows.

Features
  • Buttons (6 kinds)
  • Radio Button
  • Check Box
  • Group
  • Text Box
  • Tool Tip
  • Window
  • Menu, MenuBar
  • Scroller
  • List
  • "Bandeau"
  • Label
  • Message Box
  • Yes / No Box
  • Choose File Box
  • Image
  • Miniature
  • Progression Bar
  • A lot of subcomponents


Screenshots

Image

Image

Sample

If you want to have this window :

Image

You only need five lines !

Image

And all the features are easy to use, as the creation. ;)
If you want to test it by yourself, replace this code in "Main" :
  1. Baldur_Application2.new
Expand to see the code.

By this one :
  1. window = Fenetre.new(nil, 100, 100, 220, 107, "Test")
  2. label = Label.new(window, 10, 35, 200, 36, "This is a button")
  3. txt = Text_Box.new(window, 120, 43, 80, 18)
  4. @button1 = Bouton_GUI.new(window, 10, 75, 100, 25, "This is a button")
  5. @button2 = Bouton_GUI.new(window, 120, 75, 50, 25, "This too")
Expand to see the code.



Demo

Download the Baldur's Game demo (3 Mb)
http://www.mediafire.com/?2rgzikwz2vy



Script

The ~50 scripts are in the demo.


Instructions

We are still working on the GUI, and we have to translate some french terms into english, so wait for the 1.0 release (fenetre => window, etc).


FAQ

Questions ?


Compatibility

No compatibility at all. It's a 0.1 release, just a demo.


The Team

Lead Programmer
- King Kadelfek

Programmers
- RPG-Man
- Krän
- Zeus81


Credits and Thanks

Cybersam, Astro_mech, Mr.Mo for Mouse and Input scripts
Andreas21 and Cybersam for Screenshot V2 script.



Author's Notes

Baldur's Game is a demo made in order to show the GUI's abilities.
We will make these baldur's gate components easier to create, and make another screens.

Do not hesitate to propose new components or modifications, we are listening to RMXP developers. ;)



Terms and Conditions

This GUI was at first developed for one of my commercial project, but now it's free and you can use it for both free games and commercial use.
If I choose a licence, it will be surely the MIT or the WTFPL.
I just need to be sure people can make open or closed source projects, commercial or free, as they want.
Hey, this is very cool looking. I actually have something similar planned, myself, that I might try. I think what you should concentrate on in future releases is making to more generic. (Oh, and the translation thing, too :D )
DeM0nFiRe wrote:
Hey, this is very cool looking.

Thank you. :)

DeM0nFiRe wrote:
I think what you should concentrate on in future releases is making to more generic. (Oh, and the translation thing, too :D )

"Making to more generic" ? You mean, make something easy to customize ? Or compatible with SDK ?
Eew, no, screw the SDK XD

By generic, I meant making it the way the default RMXP window system is where there is one file format to handle all graphics for the window, and it is a standardized template to create your own (namely, the windowskin)

I am actually starting my own GUI system today :3 I had to finish my input and resolution scripts first, though.

Good luck!
Is it just me, or does everyone have the same ideas as me. I was about to start work on this as soon as I get my new computer fixed.

But anyway, this is really good. I don't know if I'll ever actually need it, but it's still good.
@ DeM0nFiRe
Yeah, I understand. RPG-Man and I still have make a windowskin system for the labels, we will make windowskins for the others components.

@ Near
@ DeM0nFiRe
I worked on this GUI for months, and we are now 3 people (one of us is programmer and graphist).
We still have found the solutions for the problems you will have in three months. If you really want to have your own system, it's ok, but our system is made to spare CPU at the maximum.

I remember I made a 3D graphical engine without any DLL for the real-time renderer, just with the 2D RMXP library.

ImageImage

Video on Dailymotion :
http://www.dailymotion.com/video/x7cowm ... videogames


My GUI have this kind of optimization, but with four more work to save CPU than the 3D motor.
Because it's a GUI made in order to work in games, which will need the maximum of the available CPU.
Well, the reason I am doing all of these things is because I won't have time for RMXP much longer, and so I want to do a few really kick-ass thing as my farewell. I've also made an input module and custom resolution script, both of which already exist XD.

Anyway, yeah, I've been a fan of most of your projects. I think it's cool that you don't need any dlls to do your 3D stuff. And yeah, like I said, I think you should make it easier to make custom graphics for your GUI system. For instance, you have a separate image for the roll and recall buttons. Imagine how that would get with a game that has hundreds of buttons!
DeM0nFiRe wrote:
Anyway, yeah, I've been a fan of most of your projects.

Thank you ! ^-^


DeM0nFiRe wrote:
For instance, you have a separate image for the roll and recall buttons. Imagine how that would get with a game that has hundreds of buttons!

It's a bad example, because we were cheating a lot for this 0.1 demo. XD


Look at this screen :

Image

Now I can create Buttons and Labels the size I want.
About the windowskin, we are working on the system.

For the label, we have this :
Image
(4 corners and two lines)

But I will create a windowskin which contains these things :
- the 4 corners (as above for the label)
- the 4 lines around the components
- the backgound

Within the code, you will be able to choose the x, y, width, height position for the windowskin. Or the margins.
So you will be able to change the position of the rect drawned around (example : the label), and choose the part of the background you want to display.

Things like stretching will be available too.

I changed my mind about the way I can do this (thanks to you), and the RM-windowskin solution is a good thing.
All the componenents will use windowskins. It's very easy to make them all compatibles with the system, because I create a hierarchical model (GUI_Object), inherited by all the graphical components.


More informations soon. ;)

--------------------------------
EDIT


I will no longer be programming on RMXP.
Now, I program on Netbeans, and my scripts are automatically put into the RM project :

Image

All the scripts you see in RMXP came from Netbeans (at the right).

With the others, we will now work with cool stuff as SVN and auto-completion for a RM project. :)
Haha, that's what I like to see! You even made a generic GUI_Object? OOP at it's finest :D

Good luck man, keep it up!
This reminds me alot of the visual basic language when you create textboxes and labels and whatnot
DeM0nFiRe wrote:
Haha, that's what I like to see! You even made a generic GUI_Object? OOP at it's finest :D

Yeah, this generic GUI_Object was absolutely necessary.
Thanks to it, you can create a new component (by example a red square) with only these 6 lines :

  1. class Red_Square < GUI_Object
  2.   def refresh
  3.      super
  4.      @bmp.fill_color(Color.new(255, 0, 0))
  5.   end
  6. end
Expand to see the code.



And if you want to automatically change the color of the Square :

  1. class Color_Square < GUI_Object
  2.  
  3.   def update_refresh
  4.      if @old_color != @color
  5.         @old_color = @color
  6.         @need_refresh = true
  7.      end
  8.      super
  9.   end
  10.  
  11.   def refresh
  12.      super
  13.      @bmp.fill_color(@color)
  14.   end
  15. end
  16.  
Expand to see the code.


That's all you need !
The component will be refresh only one time.
(we can also use a "def color=(value)" to avoid the "@old_color != @color" and gain more CPU)


DeM0nFiRe wrote:
Good luck man, keep it up!

Yeah, I will try. ;)


gameguy27 wrote:
This reminds me alot of the visual basic language when you create textboxes and labels and whatnot

I worked with Visual Basic, FXRuby, Tck/Tcl, Java and many more, but VB is my favorite.
Because you can easily create components the size you want. :)

We will develop a GUI builder, which is a software like Visual Basic : you can create components directly with the mouse.
I wonder if people are going to make a use of it...
cause I did something similar a long time ago... and nobody seems to have used it since then...

viewtopic.php?f=156&t=21182&start=0&hilit=Widget+GUI

Looks good King anyway!
King Kadelfek, when I am trying to use it.. the "Five Line Script" doesn't work. What will I do to make it work????? Please, I need your help.. Coz I really like to put this in my game...

THANKS!
It perfectly works, you just have to put it at the right place. ;)

In "Main", replace this code :

  1. Baldur_Application2.new
Expand to see the code.


By this one :

  1. window = Fenetre.new(nil, 100, 100, 220, 107, "Test")
  2. label = Label.new(window, 10, 35, 200, 36, "This is a button")
  3. txt = Text_Box.new(window, 120, 43, 80, 18)
  4. @button1 = Bouton_GUI.new(window, 10, 75, 100, 25, "This is a button")
  5. @button2 = Bouton_GUI.new(window, 120, 75, 50, 25, "This too")
Expand to see the code.



trebor777 wrote:
I wonder if people are going to make a use of it...
cause I did something similar a long time ago... and nobody seems to have used it since then...

viewtopic.php?f=156&t=21182&start=0&hilit=Widget+GUI


It's not that problematic, because we are still two people using this GUI for our projects.
And this GUI is far much better than yours. ;)
(-french- contrairement à ton moteur physique, qui se débrouille sacrément mieux que le mien :p)

I saw you use new RMXP windows, which you can drag with the mouse. It's a good idea, I think.
Thanks! I made it work!!

Thanks you so much..
I will use this script in my game (but still, I have to study the script)

I've been waiting for this script!
Thank you again, so much!

LAST QUESTION:
How will I link this buttons to something, let's say, a map??
Great script :)
Looking forward to the next demo !
Acezon wrote:
How will I link this buttons to something, let's say, a map??

Do you see the main loop ?

  1.  
  2.     while $scene != nil
  3.       update_touches
  4.       Graphics.update
  5.       Input.update
  6.       $gui.update
  7.       Screen::maybe
  8.     end
  9.  
Expand to see the code.


Look in Scene_Map, and put the lines you saw ($gui.updqte, etc...) into the main loop in Scene_Map.
I don't give you the code, because I think it will be a better idea to not put the GUI in a RMXP game now.

Wait for the 1.0 release. ;)
Okay, I'll just wait for the next release, but I tried to use the Demo, and guess what, I made a shop!!
I think I can use the script now, but I'll still wait for the 1.0..

Anyways, thanks!
Some news !


We now have Windows-like progression bars :


Image


RPG-Man (the programmer I'm working with) is making a 2D game creation software with the GUI we are working on :

(click to enlarge the pictures)

Image

Image

Image

Image

Yeah, you are not dreaming, it's a complete software running on RPG Maker. :D



I will soon be working again on the project. I will make some very important modifications in the core of the GUI, thanks to RPG-Man work.
He found what you really need when programming new components for the GUI.

With my next improvements, we will have something even more powerful. :)
Hey, is this project still active. Has there been an update? I could use a good GUI.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=63964