CEGUI in RF

Programming Reality Factory and Genesis3D.
Locked
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

CEGUI in RF

Post by QuestOfDreams » Wed Jul 15, 2009 11:58 am

Well, I was working a bit on the menu editor and the progress bar widget for the 0.8.0 release, when I realized that in the long run the current GUI system won't satisfy a gamedeveloper's need. So I came to the conclusion that instead of putting a lot of time into developing and maintaining the current limited system it would be wiser to switch to a widely used 3rd party library like CEGUI.
This has several benefits.
a) I have to integrate the library only once and update the interface only when the library gets updated. I don't have to spend time on developing a GUI system.
b) I don't have to develop tools for editing the layout as these come with the CEGUI library.
c) the GUI layout becomes more flexible than the current one
d) the (xml) layout definitions are easier to understand than for example the current menu.ini files or you don't have to deal with them at all when using the layout tools

I've already started an integration for testing purposes and after getting over some initial problems the library seems to work quite nicely (see image).
The topic is up for discussion. :)
Attachments
RF_CEGUI.jpg
RF - CEGUI test
RF_CEGUI.jpg (46.02 KiB) Viewed 2277 times

User avatar
hgt_terry
RF Dev Team
Posts: 167
Joined: Sun Feb 24, 2008 12:20 am
Location: England

Re: CEGUI in RF

Post by hgt_terry » Wed Jul 15, 2009 5:32 pm

QuestOfDreams.

I think it’s a good idea as you say they will update the library’s so it s one less thing to worry about and I see it uses the devil library so all the popular texture formats can be used for the GUI.

It may need a wrapper class so as to interface with RF code but sounds like you can sort that in my Opinion its has a lot more positives than down sides.

You have my vote

Thanks

Terry

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: CEGUI in RF

Post by QuestOfDreams » Wed Jul 15, 2009 8:45 pm

hgt_terry wrote:I see it uses the devil library so all the popular texture formats can be used for the GUI.
Actually there are a couple of image libraries that can be used with CEGUI and you can even provide a custom image loader, which is what I've done now (Genesis3D (tga & bmp) and FreeImage loaders which RF already uses) as it should be possible to read at least tga and bmp files from a VFS pack.

So far I've encountered 2 issues. Firstly, the textures used for the GUI should all be square and POT (power of two) otherwise they might get stretched oddly. However, this should not be too much of a problem, you just have to know about it. Secondly, CEGUI does not natively support animated textures like RF currently does with GIF files but I think it should not be too difficult to add.

User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Re: CEGUI in RF

Post by paradoxnj » Thu Jul 16, 2009 8:43 pm

Are you going to attach this to Simkin to allow custom event handlers to the GUI Widgets? I've been doing extensive work with CEGUI for RFOgre. If you need someone to talk to about it, give me a shout.
Many Bothans died to bring you this signature....

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: CEGUI in RF

Post by QuestOfDreams » Fri Jul 17, 2009 9:55 am

Yes, I'd like to provide script bindings for CEGUI but one step at a time.
In this context I'd also like to discuss a possible change of the scripting language from simkin to lua. I know you've already done some work in this direction. However, it will be some time till this gets relevant.

User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Re: CEGUI in RF

Post by paradoxnj » Fri Jul 17, 2009 11:53 pm

I moved to Squirrel with SqPlus. It's much easier to integrate than Lua is. It's based on Lua, optimized for games, and is an object oriented scripting language. It was written by the guy who did all the scripting for FarCry.

It is no easy task to convert the scripting language in RF1. From what I could see, it would have taken less time to write the entire shell from scratch designing it for Lua. I could have assessed the time wrong though.
Many Bothans died to bring you this signature....

User avatar
aicd99
Posts: 264
Joined: Mon Oct 10, 2011 11:17 am

Re: CEGUI in RF

Post by aicd99 » Tue May 26, 2015 8:13 am

Is that project done ?

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: CEGUI in RF

Post by QuestOfDreams » Sat May 30, 2015 10:07 am

See RF 0.78.0

Locked