Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Nov 2006
Online Last Active Today, 06:36 AM

Topics I've Started

GUI: immediate mode to buffer based

01 December 2014 - 04:43 AM

My engine is still based on OpenGL 2.1 and I would like to migrate it to a higher OGL version in the (far) future. To prepare the engine and optimize it by the way, I would like to get rid of the (deprecated) immediate mode GUI. Nevertheless, I would like to keep most of my GUI framework and features, which are
- all gui elements (including text letters) are quads,
- all gui elements could have a shader,
- all gui elements could have a texture (already on a handful of atlases),
- gui is redrawn each frame,
- gui is drawn in strict order (lot of alpha blending).

Thought, I'm not able to use OGL >2.1 yet, I would like to use an architecture which comes close to Ogl4, that is, I plan to make it completely buffered based (vertex buffers for now). The rest should try to mimic new features (shader buffers, bindless etc.) to make a later migration easier.

My basic idea is
1. map a vertex buffer object (double buffered)
2. while drawing the widgets, fill up the vertex buffer object
3. fill an additional buffer with meta information about shader,texture
4. unmap the buffer
5. bind the buffer
6. draw quad from the buffer in order,switch texture/shader if necessary, try to batch as much quads as possible by grouping them by  texture/shader

Well, this could result in lot of texture/shader switches and draw calls. I'm now looking for hints/ideas to optimize it.
These ideas are coming to mind:

I. Assign a layer to each quad, quads on the same layer can be rendered out of order.
II. Use a texture array (same texture size required, utilize atlases) and use an index (3rd tex-coord) into the texture layer, avoiding texture switches.
III. Group multiple shaders into a less uber-shaders.
IV. Sort quads by layer and shader.

I would like to hear some comment and critics on my idea ? Is this the wrong way to approach the next generation of APIs (Mantel/OpenGL Next) ?

Are there other known, (good) working alternatives ?

The acceptance of gold loot in RPGs

07 May 2014 - 02:05 AM

In other words, does gold-loot in a RPG game breaks the immersion ?

A simple example, you slay a snake and loot a bag full of gold coins. This sounds not really realistic, still you might encounter it in your beloved
RPG game. The question is, is it ok or an immersion killer ?

From a game design view you want to reward the player for defeating a challenge.

The more realistic way would be, to kill the snake, get its valueable skin and sell it in a local store for the same money. Yet it is a burden for the designer (you need to design all this loot-for-just-some-gold-coins items) and a burden for the player, because he needs to manage all this items in his inventory and he never really knows if this is just a gold-making item in his inventory and he needs to distinguish between gold and useful items (quest or crafting items).

In this way looting gold coins is a strong abstraction of the skin-selling way. Sometimes you encounter hybrids, eg gold-loot items are always stackable, they are tagged as such (trophies) and sometimes you have a special,endless inventory space for such items. Still it gets unrealistic at some point and the question is, is it worth to do it this way ?

What are your thoughts ?

Client - non dedicated server architecture

26 March 2013 - 06:33 AM

I'm thinking about a multiplayer game with a classic client-server architecture and a lobby server setup, but without the need of  dedicated game servers. Is this still feasable in modern games, with the background, that a dedicated server is just too expensive to run and the number of players is very limited (~4).


P2P would be the standard solution for such a setup, but I really dislike the NAT issues and therefor only one player needs to setup his NAT/Firewall correctly, right ? Or are there more issues I don't see at the moment ?

Monday morning code...

25 February 2013 - 02:17 PM

Monday morning code is this kind of code, where you write some seemingly easy code in hour just before first coffee and your co-workers need at least the rest of the week to figure out what went wrong. You would deny this code until you see the blame in svn, after that you start to believe in global conspirators.


Here's some java code I tracked down which caused some ugly bug ph34r.png


// determine objects to copy
MyClass sourceObj = getSourceObject();
MyClass destObj = getDestinationObject();

// copy now
destObj = sourceObj;


Need help with story.

31 January 2013 - 09:13 AM

I could need some help with the intro story for my game.

The story is done, but I'm not a native speaker and don't know if I use some clumsy wording or phrases which do not make much sense in the according context. The story is divided into 4 parts, there are two history parts and two parts which works like a quest. I'm not a good story teller, nor are the stories innovative, still I want to at least deliver the story part in decent English smile.png


Part 1a: Story

And after a 100 year war the people of Amunlak defeated Vardgest and banned him in eternal darkness. Only the signet of power was capable to hold up the ban and so the people of Amunlak gave it to the guardians.
However time consumed nightmares of darkness and bred dreams of power. The people, driven by hate and greed, sought after the power of the signet and the guardians became hunted. In this time the guardians gave the signet of power to the innocent people of the Gnoblins, people living deep under the earth and weaved a powerful spell to conceal their existence. Yet the hunger for power was frenetic  and so it happens, that a last battle at the fortress of the guardians, Berghar, stained the moon in red.
Driven by despair the great master of the guardians,Thorfinn, send a young novice through a portal to the signet of power and closed the portal with his own blood for ever.
And with the blood of the last guardian, the spell of concealment started to fade...


Part 1b: Quest

 'Hate and greed shall never touch the signet of power. I send you to the Gnoblins, they will help you...They are coming ! Go ! Find a way to protect the signet from dark thoughts ...' and then the great master chants some words in an unknown language, words still echoing in your head as if they do not want to be forgotten.
You are lying on the ground and you have to vomit. You notice, that you are at an unknown location after taking a look around. You have taken some items with you before traveling through the portal and pick them quickly up.
As you want to stand up, you touch a great, nearby rock and suddenly a surge of power runs through you. The last words of the great master sink into the rock.  Suddenly you understand, that these were words of power, an ancient legacy, inherited from generation to generation of guardians for hundredth of years and that this rock will take you to your destiny...


Part 2a: Story

And the people of Amunlak banned Vardgest with a powerful spell. However with the years the spell devoured unthinkable amounts magic, which was payed with the lives of many mages. And with them  the power of the ban-spell vanished day for day.
The people sought for the elders and pleaded for aid. The elders agreed to give a last gift of mercy to a dying world. Therefor they created a last artifact, an artifact of incomparable power, the Signet of Power.
And with an rune engraved ark of pure adamantium, the elders gave the Signet to power to the people of Amunlak.
Because of the boisterously power of the signet, which would consumed almost everything what touches it, the elders gifted although the knowledge of the ancient rune magic, the only power which was able to tame the signet...


Part 2b: Quest

The scroll is penned in a kind of rune script, similar to the runes you already know from weapons and armor of the guardians.
The gnoblins recognize some of the runes, because they use a similar script. They quickly get one of their scholars, who is able to decipher most of the runes. The scroll tells the story of the Signet of Power and the Magic of Runes, and displays a sketch. The sketch shows a rune engraved statue of adamantium, a statue of an elder who holds the Signet of Power.
You have already noticed, that the roots holding the signet, slowly wither under the boisterously power of the signet. At least the statue of adamantium could give you more time until you can think of a better idea about what to do with the signet.
You need to find adamantium and craft the statue. The gnoblins seems to know the metal, though they do not need it themselves. The scholar touches the stone of teleportation and speaks some words of power. Afterwards he wave to you and points to the stone, it seems that you should continue your journey...