Author Topic: The Opportunity to Refactor Glest During The Merge  (Read 2571 times)

Psychedelic_hands

  • Guest
The Opportunity to Refactor Glest During The Merge
« on: 8 April 2011, 04:41:39 »
I as many of you are, am extremely excited for the merge. But I feel we could do more than a merge, we could use this as a chance to refactor or more so change Glest's weak points, to make a better engine; which leads to a much better game.
You've heard the saying if it isn’t broke, don't fix it. Well during the Merge, Glest will be broke, so why not truely fix it ?
Believe it or not, Glest has extremely good graphics for an RTS. It can have pretty high poly models, more than large enough textures and can render pretty big battles at once. The only things letting it down are:

The Lighting:
Lighting is one of the most important and influential elements in environments. It has the power to really make the atmosphere. But Glest has pretty dodgy lighting, things such as bloom, or maybe even HDR lighting could help. Though, I'm not a coder so I do not know the difficulty in implementing such things; but one thing is for sure, it can be improved look at 0 A.D for example. It has terrific lighting. It has loads of contrast between colours which creates a lot of extra detail.
I was talking to Arch about it, and here is what he said:
Quote
Here’s a list of basic things Glest shadows could use:
-Soft Shadows
-Resolution Masking
-Fix Higher Resolution (lines get drawn instead of super high resolution textures, ie:4096)
-Shadow Blur (if someone sets a low shadow frame rate to gain performance, it should blur between frames so it doesn't look so blocky)

The Tile system:
Again I'm sorry, but I'm going to cite 0 A.D as an example. As it is the perfect example of what is achievable, the game flows much smoother because the units don’t seem to be attached to a grid like Glest’s units are. Obviously we can’t lose the tile system as that would pretty much break every mod including magitech, but we can make it far less obvious.
Things like Tucho’s suggestion here: https://forum.megaglest.org/index.php?topic=6690.0 would help to achieve this. Other ideas like Units standing on a tile could be able to cut the square into triangles in whichever way depending on it’s size and which cell point it is standing on. This could lead to things like circular or 360 degree rotatable buildings AND placable walls working really well. Again I’m not a coder, I’ve just heard this is a way to do it, so please don’t judge if this is wrong.  But I believe changing the tile system a bit would be very worth-while, or even necessary.

Water, and shaders and the environment:
GAE’s use of shaders is a massive leap forward in Glest’s graphic abilities, but shaders still aren’t being used to their full potential. Open GL is capable of some pretty awesome stuff, if we used these kinds of things on the terrain we could to some amazing things. Omega had a nice example:
(click to show/hide)
Things like water shaders and reflective surfaces on water would be very worthwhile, Glest’s water is extremely boring and isn’t anything near where it could be.

Although Glest has an cartoony art-style about it, doesn’t mean it can’t look like an awesome cartoon ;)
I could go into much greater detail in all this things, but then maybe that would require a new thread. So I'm keeping them brief.

This post has turned more focused on graphics. Which is probably bad, but as an artist (well I try to be) in the community I don’t know much about what else is possible. But I’d like to pose the idea of refactoring Glest during the merge to make it an even better game to the people who do know how to make Glest better gameplay, and functionallity-wise.
« Last Edit: 8 April 2011, 05:06:18 by Psychedelic_hands »

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: The Opportunity to Refactor Glest During The Merge
« Reply #1 on: 8 April 2011, 04:53:42 »
 :thumbup:
Egypt Remastered!

Proof: Owner of glest@mail.com

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: The Opportunity to Refactor Glest During The Merge
« Reply #2 on: 8 April 2011, 05:18:11 »
Yes to all of that. :thumbup: Glest has artwork as good as or even better than some mainstream commercial titles from a few years back (like Warcraft 3 and C&C Generals), but it still ends up looking worse because the engine isn't capable of showing it off as well.  Probably the ugliest parts of Glest are the terrain and water.  That's not to say that the terrain textures are bad, but lack of normal maps and such are what make it look so bland.

Look at the depth of the terrain.  The grass actually has a thick matted look to it, like real wild grass.  The rough parts of the dirt look rough.  Just ignore the trees. :P
http://img710.imageshack.us/img710/3349/stuff5.jpg



On the other hand, this merge is already going to take a very long time (from my impatient perspective anyway), so I don't know about putting in more work than necessary.  However, if something needs to be redone, then I'd certainly like to see it made better.
« Last Edit: 8 April 2011, 05:27:18 by John.d.h »

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: The Opportunity to Refactor Glest During The Merge
« Reply #3 on: 8 April 2011, 06:06:23 »
 :thumbup: Though i think lighting really needs just as much work. Glest ambient light is too strong and washes out everything. Glest needs more contrast between its lighted and shaded parts.
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: The Opportunity to Refactor Glest During The Merge
« Reply #4 on: 8 April 2011, 06:37:43 »
Support. I even made individual feature requests about the lighting (with shadows) and water in the past. Of course, I don't think we should try and add it during the merger, as it's a very large change, but it should certainly be considered as a long term goal. As well, engines like OGRE present easy ways to make realistic looking water (major flaw number 1: Glest has no sky. Solution to major flaw number 1: add a sky).

I don't think the tile system is a huge issue, but the lighting does indeed really change the game. Tilesets can control the color of this light of course, but it still could use improvement.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

Psychedelic_hands

  • Guest
Re: The Opportunity to Refactor Glest During The Merge
« Reply #5 on: 8 April 2011, 06:51:56 »
The reason why I think it should be happening during the Merge is everything will be broken anyway. We may aswell change parts of the engine completely to get a better result than to mash them together.

The merge is the perfect opportunity to do this, later on once it is stable; would we want to break Glest again?

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: The Opportunity to Refactor Glest During The Merge
« Reply #6 on: 8 April 2011, 07:44:14 »
I don't know if this would be good to happen during the merge, but if it does it would probably happen after a while of having a somewhat stable "base". I really don't think the developers can do (most) of these improvements due to time and perhaps other reasons. I think Titi has been trying to find the right person for it though, so it's really just recruiting the right person/someone with OpenGL knowledge to do the job...

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: The Opportunity to Refactor Glest During The Merge
« Reply #7 on: 8 April 2011, 07:56:00 »
What goes into the merge is really completely up to those actually doing it.

I fully expect them to merge the code they have, rather than mixing in as-yet-unwritten-and-untested code.

wciow

  • Behemoth
  • *******
  • Posts: 968
    • View Profile
Re: The Opportunity to Refactor Glest During The Merge
« Reply #8 on: 8 April 2011, 08:03:58 »
Solution to major flaw number 1: add a sky.

This is not actually difficult to add code-wise. I experimented with making skyboxes as a tileset object. The problem was that the skybox would only be rendered when you were near the object (in the centre of the map). A simple code hack could fix this by adding a switch to define a tileset model as always rendered. This wouldn't add much GPU load since a skybox is just 12 polygons and a texture  :thumbup:

Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: The Opportunity to Refactor Glest During The Merge
« Reply #9 on: 8 April 2011, 12:23:02 »
This is not actually difficult to add code-wise. I experimented with making skyboxes as a tileset object. The problem was that the skybox would only be rendered when you were near the object (in the centre of the map). A simple code hack could fix this by adding a switch to define a tileset model as always rendered. This wouldn't add much GPU load since a skybox is just 12 polygons and a texture  :thumbup:

I tried that as well. same result -_- stupid clipping distance.

I believe glest uses a ambient light and a directional light and there should be a way to fully edit them independently (not just whats in tileset xml which is just just overall light color) we should be able to edit their luminosity. Shaders/normal maps from GAE will hopefully be developed more after merge. Does any mods use those shaders/normal maps?
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

Psychedelic_hands

  • Guest
Re: The Opportunity to Refactor Glest During The Merge
« Reply #10 on: 8 April 2011, 12:27:27 »
What goes into the merge is really completely up to those actually doing it.
I fully understand and except that, I'm not trying to force coders to do stuff  :P I'm not that mean...
Quote
I fully expect them to merge the code they have, rather than mixing in as-yet-unwritten-and-untested code.

Hmmmm, okay that probably would be the better option. I was just suggesting if they're breaking all of it they may as well spend their time fixing code which is better. I know I have no idea of what I'm talking about when it comes to code. haha.
Obviously it is up to the Coders, or the new glest team ;)

This is not actually difficult to add code-wise. I experimented with making skyboxes as a tileset object. The problem was that the skybox would only be rendered when you were near the object (in the centre of the map). A simple code hack could fix this by adding a switch to define a tileset model as always rendered. This wouldn't add much GPU load since a skybox is just 12 polygons and a texture  :thumbup:
Does any mods use those shaders/normal maps?

Yes, I've experimented with them before and I know that Mrise uses them.
Fully directional lighting would be a very good start :) replicating time of day might be tricky though....
« Last Edit: 8 April 2011, 12:30:14 by Psychedelic_hands »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: The Opportunity to Refactor Glest During The Merge
« Reply #11 on: 8 April 2011, 18:47:45 »
True, sky boxes can be made without too much difficulty (and I think they should be tileset defined, but not an object, and should have a default for when there is no tileset defined skybox). Biggest problem is how Glest stops rendering things far away from the camera, so that would make all this black, etc... Plus the black at the ends of the map.
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

will

  • Golem
  • ******
  • Posts: 783
    • View Profile
Re: The Opportunity to Refactor Glest During The Merge
« Reply #12 on: 8 April 2011, 19:22:33 »
I think the original context for skyboxes was to magically solve the reflections on water?  :D

Gabbe

  • Guest
Re: The Opportunity to Refactor Glest During The Merge
« Reply #13 on: 8 April 2011, 21:26:01 »
I`ve seen a lot of games fake water reflection, heck they fake the entire water. Look here for example, looks like a flat plane with some sick effects added:

https://www.youtube.com/watch?v=ggLYTGLS1tk

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: The Opportunity to Refactor Glest During The Merge
« Reply #14 on: 8 April 2011, 21:54:24 »
I`ve seen a lot of games fake water reflection, heck they fake the entire water. Look here for example, looks like a flat plane with some sick effects added:

https://www.youtube.com/watch?v=ggLYTGLS1tk
That's exactly what Glest does too, just much less detailed, particularly in the lighting and "waves".
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

-Archmage-

  • Moderator
  • Dragon
  • ********
  • Posts: 5,887
  • Make it so.
    • View Profile
    • My Website
Re: The Opportunity to Refactor Glest During The Merge
« Reply #15 on: 9 April 2011, 04:21:06 »
Glest dream water:
Low: Have flat blue.
Medium: Flat, animated, with specular.
High: Flat, animated, with fake reflection mapping, low resolution normal mapping, and specular.
Extreme: Flat, animated, true low resolution reflection mapping, normal mapping, low resolution refraction mapping and specular.
Glestreme: Some tessellation, animated, true high resolution reflection mapping, high resolution normal mapping, refraction mapping, and specular.
Egypt Remastered!

Proof: Owner of glest@mail.com

 

anything