Author Topic: cegui  (Read 3446 times)

treba

  • Guest
cegui
« on: 20 September 2012, 22:36:41 »
hey ho,

just been tinkering with cegui all day long. in the end it turned out to work quite good and i got a little wrapper for buttons working:


just to fire up the discussion again, if cegui wouldn't be the better alternative  :)

ill write a little more about it later. have a nice we

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: cegui
« Reply #1 on: 20 September 2012, 22:44:40 »
Come on, you gimped that! ;-)

Very nice, should it work out generally.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #2 on: 20 September 2012, 22:45:42 »
It is my understanding that Cegui has quite a few issues that it is a pain to deal with including loads of dependencies, lots of casting and a few other issues. It also has a load of features Glest derivatives don't need resulting in a huge footprint.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: cegui
« Reply #3 on: 20 September 2012, 22:48:21 »
Come on, you gimped that! ;-)

Very nice, should it work out generally.
The use of a "proper" GUI rendering engine could be an improvement, although it's a LOT of work to redo the whole game (when GAE redid the engine's GUI with a customizable one, it took months). I hope that should we use CE GUI, that customizability (for mods, etc) be kept in mind. The ability to change things like the button image, shape, size, font sizes, etc would be nice (yeah, font sizes can already be changed, but there's, for example, no way to specify a default size for a mod which could use a different font).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #4 on: 20 September 2012, 22:59:26 »
I'm not sure what the purpose of adding in a whole new GUI engine is. Its not incredibly difficult to add new things. If a new one was going to be added, it might be better to add something web language related like Berkelium or something. This would be of a similar level of difficulty to do and would be preferable for non programmers in every way.

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #5 on: 20 September 2012, 23:37:56 »
I'll be spending the day attempting to integrate libRocket with my version of GAE. I'll tell you how it works out after the weekend.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: cegui
« Reply #6 on: 20 September 2012, 23:42:30 »
Indeed most gui libs i looked at have far too many deps (and CEGUI had known issues compiling statically also at the time i looked into it)

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: cegui
« Reply #7 on: 22 September 2012, 03:32:28 »
I had experimented with CEGUI for GAE previously but we ended up not using it. LibRocket looks good. It was a fairly young project when I saw it previously if I remember correctly. I'm interested in how you go with the integration MoLAoS.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #8 on: 22 September 2012, 03:37:52 »
Well currently stupid faction preLoad function of GAE is giving me shit about adding a new folder for the libRocket RML files. I tried to add it the same way I added the folder for items and it refuses to load but the game doesn't produce any data in the error or crash files. Pretty annoying.

So currently I'm working around that. The closest I got before adding the vector support so each faction can have its own custom GUI with unique GUI files was that Rocket complained that it couldn't locate the pseudo classes, presumably my RML file wasn't written properly.

Okay I am back to the same error and its clearly reading the RML file. This is the crash output:
Access violation (Reading address: 0x00000000)
Call Stack: Frame       Code address
0x0171C760  0x02FF1996 Rocket::Core::Element::GetActivePseudoClasses+0x1f3575
0x0171C798  0x0300F310 Rocket::Core::Element::GetActivePseudoClasses+0x210eef
0x0171DC48  0x0056DEEA Glest::ProtoTypes::FactionType::load+0x20ea at faction_type.cpp
 

I am almost positive this is something wrong with the RML document although I could be wrong. Which means I should be pretty close. Still gotta actually render documents but that's pretty easy and documented.
« Last Edit: 22 September 2012, 03:45:19 by MoLAoS »

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #9 on: 23 September 2012, 10:33:21 »
Okay well I appear to have been able to create contexts and even documents but I lack understanding of both Rocket and GAEs rendering. I've been digging around in the rocket samples and so forth to see what I'm missing there and changing single lines of code in the GAE renderer to figure shit out.

In case I haven't mentioned it I really despise graphics programming.

I have mostly been doing silly things like changing the selection quad color and making units rotate funnily when they move. Although that tends to have little to do with rendering a 2D GUI.

I'm thinking I might go back to work on something more in my area of interest until my boredom and hate response to graphics programming wears off.

Then I just need to muddle out how to bind the libRocket rendering commands into GAE's renderer so that documents actually show up. Well and make some hooks so Rocket can grab object data like stats from the engine.

I was thinking of spending the week figuring out how to add some special abilities like fear and awe and maybe smart target choosing and then moving back to finish Rocket integration over the next weekend.

weltall

  • Guest
Re: cegui
« Reply #10 on: 23 September 2012, 13:38:52 »
Personally I'd not suggest to use it.
I can entirely quote softcoder. Too many dependencies, issues with static linking. Additionally linux distributions tend to not update it often, if at all, macports doesn't ship it, it has several issues building in some environment (eg: macosx command line build - it's probably one/the reason why it's missing from macports).
Last year I tried to do with them a macosx static build of cegui with crystal space tools for our art team and we ended up letting it go due to several building issues which made it unusable (even though their support channel is quite good and they tried to help us for several days). Also in the past i had weird issues with xml widget failing loading depending on the xml backend builtin.

I was also told some projects removed cegui as main windowing system and preferred to start from scratch like openscenegraph. (didn't verify as i'm not following it but i somehow trust the source) For crystal space lately wxwidget is preferred over cegui.

treba

  • Guest
Re: cegui
« Reply #11 on: 1 October 2012, 14:15:09 »
anything new here? i just also had a look on librocket and it seemed to be a nice solution (builds statically without any flaws for me, seems to intergate easily)

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #12 on: 1 October 2012, 14:17:42 »
anything new here? i just also had a look on librocket and it seemed to be a nice solution (builds statically without any flaws for me, seems to intergate easily)

Have you been able to get it to interact with the engine? I took a break to work on something personally more interesting but I got reasonably far.

treba

  • Guest
Re: cegui
« Reply #13 on: 2 October 2012, 08:43:06 »
not yet. i just build mg with its static libs.
will try in the comming days

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #14 on: 2 October 2012, 08:51:47 »
not yet. i just build mg with its static libs.
will try in the comming days

I can initialize a context and I believe load a document, at least it doesn't crash when I load one but, I stopped then to do something more personally interesting. So I haven't actually gotten it to render something in game.

I decided to actually finish this new thing first before going back to libRocket, so if you get it to render something post how it went.

Also, how can I get access to the SVN version of MG? I can get the stable release source but not the new stuff. TortoiseGit/SVN says the remote is hanging up and such.

treba

  • Guest
Re: cegui
« Reply #15 on: 2 October 2012, 09:16:46 »
Code: [Select]
svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk megaglestshould work

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #16 on: 2 October 2012, 09:27:42 »
Code: [Select]
svn co https://megaglest.svn.sourceforge.net/svnroot/megaglest/trunk megaglestshould work

wants a username and password.

treba

  • Guest
Re: cegui
« Reply #17 on: 2 October 2012, 09:53:42 »
well, not for me. maybe try another program?

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #18 on: 2 October 2012, 10:02:59 »
eh, its not a big deal. i have plenty of other work to do besides porting mega glest features.

silnarm

  • GAE Team
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: cegui
« Reply #19 on: 7 October 2012, 23:45:22 »
I started using librocket in a personal project about a month or so ago, really impressed so far. If you're going to do a GUI overhaul, I would strongly recommend it, if just for the html/css basis of rml/rcss.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: cegui
« Reply #20 on: 8 October 2012, 21:52:31 »
@silnarm,
have you got any tips on where to hook the libRocket rendering into the GAE renderer? I haven't really touched the graphics code yet, the closest I got was the widgets and that's not very close.

@treba,
have you done any more work getting libRocket to run in megaglest?

I haven't spent any time on it because I promised some people I would get the Majesty demo working and i've been having to add a buttload of stuff to items to get that online.

treba

  • Guest
Re: cegui
« Reply #21 on: 9 October 2012, 14:16:06 »
nope, not further.

Cygal

  • Guest
Re: cegui
« Reply #22 on: 2 November 2012, 16:07:47 »
I don't like the idea that much. Honestly, the GUI code in MegaGlest is quite nice and easy to understand, and moving to a new GUI doesn't add much value to the game. I have identified a few pain points: overflows in translations, the need to specify line breaks manually, scrollbars that don't behave like normal scrollbars, lack of global coherency (eg. to get back to the previous menu, sometimes it's "Abort", sometimes it's "Return", and it's not always on the same position). Fixing those is going to be way easier than rewriting the whole GUI IMHO.

Words are easy, so to prove my point I fixed the scrollbars issue, the first one that bothered me in MegaGlest: https://sourceforge.net/tracker/?func=detail&aid=3582642&group_id=300350&atid=1266778. As you can see, it's not such a huge change.

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: cegui
« Reply #23 on: 3 November 2012, 11:48:29 »
Cygal +1 :)

treba

  • Guest
Re: cegui
« Reply #24 on: 3 November 2012, 20:28:34 »
well, drop down menus for maps, tilesets or stuff in the options menu would be quite nice. just have a look how much nicer gaes menus look