Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Customizable GUI's Using HTML/CSS


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 AltarofScience   Members   -  Reputation: 934

Like
2Likes
Like

Posted 28 August 2012 - 12:53 AM

As you may or may not know I have forked the Glest Advanced Engine to work on a somewhat unorthodox RTS-like game. The game is, due to being a Glest fork, open source and designed to be easily modded. I don't necessarily expect my game to be widely modded, but the engine will be used for 7 games of fairly different types, although all RTS-like. For these reasons I want to have a GUI that is easily modified in all aspects.

This engine uses C++.

I was wondering if their are any good libraries, which are open source, that allow for HTML4-5/CSS3 files to be used to modify the GUI. Over at 0 A.D. they talked about stuff like Webkit and Awesomium and Berkelium, but I was wondering if people who are more expert in game programming and design could think of any more or better options. Awesomium is no longer open source I believe.

I basically want to have easily moddable styles for panels/menus/buttons and also Civpedia style manual type stuff.

Sponsor:

#2 Hodgman   Moderators   -  Reputation: 31785

Like
6Likes
Like

Posted 28 August 2012 - 01:08 AM

Awesomium and Berkelium are both Cromium based (which in turn is WebKit based) AFAIK, with the former being a commercial product and the latter being more rough-around-the-edges, but open source.

Another option is libRocket, which is open source, and AFAIK, isn't built upon the heavyweight WebKit backend.

#3 riuthamus   Moderators   -  Reputation: 5774

Like
0Likes
Like

Posted 28 August 2012 - 11:18 AM

As you may or may not know I have forked the Glest Advanced Engine to work on a somewhat unorthodox RTS-like game. The game is, due to being a Glest fork, open source and designed to be easily modded. I don't necessarily expect my game to be widely modded, but the engine will be used for 7 games of fairly different types, although all RTS-like. For these reasons I want to have a GUI that is easily modified in all aspects.

This engine uses C++.

I was wondering if their are any good libraries, which are open source, that allow for HTML4-5/CSS3 files to be used to modify the GUI. Over at 0 A.D. they talked about stuff like Webkit and Awesomium and Berkelium, but I was wondering if people who are more expert in game programming and design could think of any more or better options. Awesomium is no longer open source I believe.

I basically want to have easily moddable styles for panels/menus/buttons and also Civpedia style manual type stuff.


Very interesting concept, we thought of doing the same but in the long run couldn't figure out a way to make it work. ( all though we didnt try very hard ) Ultimately we went with XML based elements which link to API in the code. This has proven to be very useful and simple to add/setup.

If you figure out how, and you dont mind sharing please do so. I think moving towards the same thing that the web industry has would be very crucial since most people these days know the basics of hmtl and css.

#4 dougbinks   Members   -  Reputation: 489

Like
0Likes
Like

Posted 29 August 2012 - 05:39 AM

If you end up going down the Webkit/Chromium route, you may also want to check out the Chromium Embedded Framework, as this seems more updated than Berkelium. Awesomium now offers a free version for Indie developers as well, so you may want to consider that.

I've used libRocket and found it easy to work with and powerful, but am very tempted by moving to a simple GUI system for in game and a webkit based GUI for menu system, server browsing etc.

#5 nox_pp   Members   -  Reputation: 490

Like
2Likes
Like

Posted 29 August 2012 - 06:41 AM

If you end up going down the Webkit/Chromium route, you may also want to check out the Chromium Embedded Framework, as this seems more updated than Berkelium.



I've explored this route before. FWIW offscreen rendering with CEF is not available on Linux, but only on OSX and Windows. See http://code.google.com/p/chromiumembedded/issues/detail?id=594

Personally, as cool as an HTML/JS/CSS based GUI is, I think it's severely overengineering the problem. If it's so difficult to make and modify something as simple as a GUI in your engine, such complexity probably pervades the entire system. I think you should first consider working on that problem, before you consider adding the signficant runtime/maintenance burden of an embedded browser to the mix.

YAGNI.

Between Scylla and Charybdis: First Look <-- The game I'm working on

 

Object-Oriented Programming Sucks <-- The kind of thing I say


#6 riuthamus   Moderators   -  Reputation: 5774

Like
0Likes
Like

Posted 29 August 2012 - 07:38 AM

Actually, one of my coders came to me and said: "You know our launcher that links to the website and works all nice and pretty?" my reply was "Of course, I made you redo it like 50 times till it looked good. Why?" and his reply was "It doesnt work anymore with html because the project is no longer open source."

Soon as he said that I said: "You read that guys post about the HTML and such in his projects for the UI! Oh this is bad news!" lol I didnt even realize we were using that part already.... sucks. Well, seems I am in the same boat as the OP now!

#7 riuthamus   Moderators   -  Reputation: 5774

Like
0Likes
Like

Posted 29 August 2012 - 07:40 AM

I've explored this route before. FWIW offscreen rendering with CEF is not available on Linux, but only on OSX and Windows. See http://code.google.c...s/detail?id=594

Personally, as cool as an HTML/JS/CSS based GUI is, I think it's severely overengineering the problem. If it's so difficult to make and modify something as simple as a GUI in your engine, such complexity probably pervades the entire system. I think you should first consider working on that problem, before you consider adding the signficant runtime/maintenance burden of an embedded browser to the mix.


Kinda what I was saying, we have a very robust XML system but for our launcher tool I wanted the ability to send them live updates and make it easily styled. We could do this through XML and other methods but the simplest possible answer was to make a HTML based UI system. It worked like many of the high end launchers you see today and was rather fast ( so long as they had a good internet connection ). Im not saying it was the best solution but it was a solution.

#8 dougbinks   Members   -  Reputation: 489

Like
0Likes
Like

Posted 29 August 2012 - 08:14 AM

Personally, as cool as an HTML/JS/CSS based GUI is, I think it's severely overengineering the problem.


This depends (as always) on the complexity of the GUI required. I've found it fairly easy to integrate CEF, Berkelium and Awesonium, and for something like server browsing sharing the GUI code between a web interface and the game can be useful. Even for relatively simple GUIs, the ability to use well known HTML tools to create content can be very useful for artists. On the other hand, it can be a lot of fun to make something clean and simple yourself.

FWIW offscreen rendering with CEF is not available on Linux, but only on OSX and Windows. See http://code.google.c...s/detail?id=594


Shame about the lack of Linux off screen rendering for CEF at the moment, though it looks like something which could be done fairly easily by someone who cared sufficiently.

#9 AltarofScience   Members   -  Reputation: 934

Like
0Likes
Like

Posted 29 August 2012 - 01:10 PM


If you end up going down the Webkit/Chromium route, you may also want to check out the Chromium Embedded Framework, as this seems more updated than Berkelium.



I've explored this route before. FWIW offscreen rendering with CEF is not available on Linux, but only on OSX and Windows. See http://code.google.c...s/detail?id=594

Personally, as cool as an HTML/JS/CSS based GUI is, I think it's severely overengineering the problem. If it's so difficult to make and modify something as simple as a GUI in your engine, such complexity probably pervades the entire system. I think you should first consider working on that problem, before you consider adding the signficant runtime/maintenance burden of an embedded browser to the mix.

YAGNI.


Well open source projects that use web standards for the GUI have a much better chance of attracting artists and other kinds of contributors. This is because a lost of people already know how to handle HTML and CSS.

The engine I am forking was created by two separate groups of Devs and I do disagree with some of the things they did which I am working on. Adding new things to the GUI doesn't take me incredibly long, for a new thing it may take me a couple days because I also have to add the new feature before I change the GUI.

One part of the game is the resource bar, I wanted to add a unit bar for the faction so you knew how many of what unit you have. This took me about 6 hours because it was one of the first things I did in changing the GUI and I was unfamiliar but on the other hand most of the code for the resource bar was still compatible with this new unit bar.


One thing that is a problem is that each GUI element has to be modified in source. So I have several copies of a very similar widget code that is a frame. So I have to work on removing that. There is a whole lot of work to be done on the GUI already, so it seems like a good time to add styling type stuff.

#10 Chris_F   Members   -  Reputation: 2459

Like
0Likes
Like

Posted 30 August 2012 - 05:12 AM

Something to consider is that using a Chromium based project will tie you to building a 32-bit executable for Windows only as there still does not exist a 64-bit version of Chromium for Windows.

Edited for clarity.

Edited by Chris_F, 30 August 2012 - 07:41 AM.


#11 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 30 August 2012 - 07:25 AM

Something to consider is that using a Chromium based project will tie you to 32-bit Windows only as there still does not exist a 64-bit version of Chromium for Windows.

False
64 bit editions of windows will run code compiled for 32 bit windows without any issues so no you are not limited to 32 bit only versions. I myself run a 32 bit version of chromium on my laptop which is running windows 7 64 bit.

My misunderstanding, sorry bout that

Edited by 6677, 30 August 2012 - 09:36 AM.


#12 Hodgman   Moderators   -  Reputation: 31785

Like
1Likes
Like

Posted 30 August 2012 - 07:27 AM

He means you're tied to only making a 32-bit build (and can't make a native Win64 build), not that your Win32 program won't run at all on Win64.

#13 dougbinks   Members   -  Reputation: 489

Like
0Likes
Like

Posted 31 August 2012 - 09:58 AM

I know Mike Acton has had some progress building a 64bit version of Chromium for Windows, but don't know how far he got. An alternative might be to use Chrome in a separate 32bit process and use shared memory - since Chrome is already a multi-process architecture this doesn't seem totally impractical, though it's does make integration that bit harder.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS