Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Ashaman73

Member Since 10 Nov 2006
Offline Last Active Today, 08:59 AM

#5214397 glFrameBufferRenderBuffer vs glFrameBufferTexture2D...FIGHT!

Posted by Ashaman73 on 04 March 2015 - 01:51 AM


Am I barking up the right tree?
Or totally lost the plot?

Well...

 

 

 


So in the case of a deferred render where there is no post process step and the final image is just a blend of the pixels affected by lights I can just present that to the screen directly and not need to render it to a full screen quad?

There are some missunderstandings. A deferred renderer utilize 80% of the time post-processing and you don't render to a fullscreen quad.

 

First try to abstract from textures/buffers etc, you have just memory.

A deferred render pipeline works like this:

1. render all the position information (which pixel represents a world position) to a buffer , called g-buffer.

2. now apply lot of post-processing steps, which take as input the g-buffer, calculate some effects (lighting, ssao, shadow) and write it back to some other memory block/buffer

3. finish it with a final pass, where you take all necessary input buffers (light, shadow, ssao, etc.) and compose a final image, write it to some memory block/buffer.

4. display this block/buffer

 

The trick is, that you use the memory blocks sometimes as output and sometimes as input (to make it simple first, you can't use a memory block for reading and writing at the same time!). Now, to translate this to OpenGL and a graphics API, you need to know, that accessing the memory blocks works like this:

1. if you want to read from it, you need handle it as texture.

2. if you want to write to it, you need to handle it as buffer.

3. if you want to sometimes read and sometimes to write to it, you need to handle it as texture and buffer.

4. To read from, you render a screensized quad and take as texture the input buffers. This way you get access to the memory blocks you want to read from. Then you do some crazy calculation in your shader and write the result to the attached memory in form of an attached buffer.

5. The texture and buffers are just an other way to access one and the same memory block.

 

Hope this helps.




#5214376 Vulkan is Next-Gen OpenGL

Posted by Ashaman73 on 03 March 2015 - 11:48 PM


Remember, Vulkan is going to be a huge pain in the ass compared to GL. The Vulkan API is _much_ cleaner, yes, but it also eschews all the hand-holding and conveniences of GL and forces you to manage all kinds of hardware state and resource migration manually. Vulkan does not _replace_ OpenGL; it simply provides yet another alternative.

I started my engine with OGL1.2 and being at OGL2.1 + extensions now,I have removed a lot of this convenience OGL over time. I'm currently at the state of handling many things by buffers and in the application itself and that with OGL2.1 (allocate buffer, manage double/triple buffering yourself, handling buffer sync yourself etc.). Most likely I use only a few % of the API at all. I think that a modern OGL architecture (AZDO, using buffers everywhere including UBOs etc) will be close to what you could expect from vulkan and that if they expose some vulkan features as extensions (command buffer), then switching over to vulkan will not be a pain in the ass.




#5214128 Java Listeners

Posted by Ashaman73 on 03 March 2015 - 01:42 AM

I don't really understand your questions, to be honest.

 

 

 


for every player on the screen there has to be another KeyListener

Are you talking about a multiplayer game ? About a server side implementation ?

 

 

 


MouseMotionListener added to the game

You have always two ways of handling events, either pushing (send event to listener) or pulling (ask if a new event occurs or a certain state changed). The listener concept (or a BUS system) are pushing systems. If you have very large amount of potentially listeners, which don't need to listen to all events all the time, it could be more effeciently to use a pulling system (only the component which needs the data gets it).

 

A possible setup would be

// pushing system
interface InputListener {
  void newEvent(...);
}
class InputManager
{
  void addListener( InputListener);
  void removeListener(InputListener);
}

// pulling system
class InputManager
{
   MouseCoord getCurrentMousePosition();
}

For input handling both systems seems valid and using a listener system in java isn't unheart of. Therefor I can't see a reason to not using a listener based input handler, which would only use one class and one interface, thougth multiple listener instances. But you should not have a lot input listener at all, even in a multiplayer game (where you would have network listeners or similar interfaces).




#5213885 glFrameBufferRenderBuffer vs glFrameBufferTexture2D...FIGHT!

Posted by Ashaman73 on 02 March 2015 - 05:45 AM


However if you can just use glFrameBufferTexture2D anyway then what is the purpose or need of render buffers?

You can use the texture version (if supported), sure, but it is not always necessary. You need textures whenever you want to access the data directly in a shader, whereas if you just need to use the buffer during rendering (eg. depth/stencil), then there is no need for a texture. In short:

Input: Texture

Output: Buffer

Input/Output: BufferTexture




#5213874 An alternative to the Sponza mesh for demos?

Posted by Ashaman73 on 02 March 2015 - 04:38 AM


if I upload a vid not to disappear into the fog of Sponza and Teapot material videos

The scene is less important, the best about the Sponza scene is, that it is complex, the de-facto standard for game-environment rendering technologies, not a single closed object (dragon,buddha,teapot etc.) and that you can easily compare your technology with other technologies using the same input.




#5213864 What are the recommended places to store save data?

Posted by Ashaman73 on 02 March 2015 - 03:39 AM


Really? Our support has to deal with some really non-IT people and with some encouragement most of them manage to get '%appdata%\MyDirectory' pasted into their Explorer...

Haha... never thought about using predefined-variable as shortcut for such a task. laugh.png ..yes, doing support is a learning process itself.

 

 

 


Where would you store the path to which to store save data? laugh.png

You could save it in the installation directory at installation time, where you have according writing rights (thought changing this might be uncomfortable), or you could use the registration for it or the appdata....




#5213824 How to build my first game

Posted by Ashaman73 on 02 March 2015 - 12:35 AM

I think that you try to master too much stuff at once. For one you are a still learning to code, to get a game structured, to add features and then you try to design a game too. I would sugguest to practise with one task first, and this would be to code a game clone, no extra-ordinary design, just code a simple 1:1 clone of a small game. It helps a lot to concentrate on a single task, to get into game architecture, coding and all the other necessary stuff.

 

 

 


The Thing is that i always think of an game idea like watching or playing an certain video game, then after doing some brainstorming about an theme and coming up with ideas on the features for the game. That is the easier part of it if you set an limit like 2-3 features in an game, the last thing i wouldn't want is Feature creep on building games.

You should always start with one core feature, a feature which dominates the whole game. Everything else is just there to support this feature. So, get the core feature and try to make it as good as possible.

 

 


Then when it comes to building the game or feature of it, it become an problem; it how to put together the knowledge to build an feature of an game like an Combo System(To Display your combo hits on an enemy), Building an Game Timer(How to gauge how much time is left) example of features. I did tutorials like Leerpz and Walker Boys but they show you on how unity works and with less emphasis on how to code it, the next thing i knew that i would end up relying on tutorials on how to build the games instead of learning to programming it.

This is the lack of not having mastered the art of game development, the craft, so first pratise this, then add design.

 

 


What makes it frustrating as well is asking for help and/or assistance how to learn build the features or coding in certain language like Java, C#, C++. Some times when i ask for some assistance like some pointers or know where i can get the knowledge to learn how to build an knowledge on build features for an game or Building an game based on an genre. When i ask for assistance or help on how to build an game by myself or having trouble on building an certain feature of an game, some times it's misinterpreted as Getting people to do it for you but everyone knows that saying of giving an man the fish for a day quote.

 

This is always difficulty, you need to really put lot of effort to create a game and it is seldomly the case that you can easily help someone with game development, when the question asked is not really concrete. The help will be most useful if you can narrow down an issue you have. Once you ask quite generic question, then you will not get a lot of help.

 

 

 


I've been learning from scratch and been Self-taught so far, I don't mind building on knowledge of other people who do things differently. I'm looking for tutorials like how to build an Fruit Ninja game and mod it to build the different features for the game and if possible, an tutorial on Building an Space shooter game, An R-Type clone.

As already said, game development is really complex and you will not find really useful tutorials about too generic tasks like "How to build game X". Once you want to build a game, you need to piece it together, step for step like this

  1. Okay, how do you start a game ? => open window
  2. Okay, I can open a window, what now ? => game loop
  3. Okay, my game loop is running, how to show the content ? => renderer
  4. Okay, now I need some input , how to get input from the controller ? => mouse/keyboard input
  5. Okay, now how to move my avatar around ? => basic movement controller
  6. Okay, how to let the computer move some enemies around ? => basic AI behavior

etc. For each of this development crumb you will find a tutorial. And if you don't have an idea where to find it, ask around for help for a single, concrete task (eg basic enemy movement AI).

 

 


The Artwork and Soundworks are beyond my area of expertise so i may need to find resources or people to help out in those areas

Look for free stuff (eg. www.opengameart.org) and utilize it as much as possible. It helps a lot and takes the burden of making your own art or to try to find someone to help.




#5213294 Which tool is better for start? Engine or framework?

Posted by Ashaman73 on 27 February 2015 - 06:10 AM

Isn't the basic version of unity free ?

 

An engine is a complete package of tools, working components etc. whereas a framework is just a framework. With a framework you need to code a lot more, so I would always sugguest to start with an engine or even with a game (modding) to get into game development.

 

Here is FAQof unity, I think that the majority of your questions regarding unity will be answered there. smile.png




#5213258 Simple Alternative to Clustered Shading for Thousands of Lights

Posted by Ashaman73 on 27 February 2015 - 12:05 AM


So I’m hoping (lots of hand waiving, I don’t really know yet...) that with the coherency of nearby pixels traversing similar paths of the BVH, the bandwidth consumption and cache misses will not be too much worse than with clustered.

I've done some testing with a quick BVH implementation to check the number of nodes read. I will not present my result, because the implementation is quick and dirty and would most likely not represent your work. Nevertheless, the question that arose was the number of how many nodes you need to touch per pixel in average. Eg the spheres in a spheretree get quite big really fast, and all the not light related spheres will increase the overhead of all pixels, even if you have unlit pixels etc. So, if you have pixel lit by 100 lights and you have an overhand of X nodes, it is quite cheap, but if you have a pixel lit by none or only one light, X nodes is really expensive. A clustered/cell based shader would fit more tighly around the variable number of lights influencing pixel areas. The question is, how high is X under different setups ?

 

Just for testing this number I would implement the same search algo from the shader on the CPU to do some rendering simulation to get some quick statistics.

 

 

 


Ashaman73: I dont know how to post an article on here, but maybe I'll do that at some point though, if theyre interested in me doing that.

Check this out to get some infos smile.png




#5213041 Simple Alternative to Clustered Shading for Thousands of Lights

Posted by Ashaman73 on 26 February 2015 - 01:26 AM


In my experience with clustered, you store all the lights in the buffer in a very similar manner, except each cluster has a linear section of the buffer.

Yes, I think that this would be the more common way of doing it. I currently use the uniform way to do it in my engine.

 

 

 


So the main additional cost is doing a bounding sphere test per light that you visit, and iterating through the light array as a linked-list rather than a simpler linear array traversal.

It is more like a tree structure, isn't it ? Traversing a tree will, even if you will narrow down to the candidates quite quickly, still need to jump around quite often. The virtual nodes in this tree (which will not represent a light) would add atleast extra costs and if you need to traverse partly through a tree with 3000 leafs, then you could have a few cache misses and this for every pixel.

 

I would be interested in the expected overhead, would it be roughly x1.5 , x2.0, x3.0. The system could perform better on more realistic game setup (few hundred visible lights) with a much flatter tree structure.

 

Nevertheless, I found this approach very sexy. I could think about using it to add some extra eye-candy to the forward rendered stuff (particles) as option for people with hi-performance hardware.

 

PS: if you do the light calculation in the vertex shader you could push out lit particles with ease and with much better performance.

 

PPS: @fries: how about posting your approach as article on gamedev ?




#5212892 Need creative help to make my game fun (Gauntlet Clone)

Posted by Ashaman73 on 25 February 2015 - 05:07 AM


I suspect it has something to do with the fact that my game is not balanced yet - its way too easy at this point. ... This does make the game harder but its still missing that addictive fun factor that I really need.

Fun is always hard to define, interesting might be better. There are many ways to create interest like exploration (adventure), story, progress (RPG), challenge.

Gauntlet is a challenge game, you need to beat a level and progress to the next, if you fail, insert a coin and try to be better the next time.

 

Challenge an the other hand can be subdivided in multiple parts. For one you have a knowledge and a skill challenge. Skill is to learn the moves, the reaction to certain behavior pattern, whereas knowledge is to know how to counter a creature, what to prioritize first etc.

 

To increase the challenge you need to consider yourself as player, where would other players relate to you. As developer you will most likely have mastered the  knowledge challenge (because you coded the thing) and will be at least an advanced/expert skilled player. Therefor you have casual players, which will fail at what you will find as easy and you will have expert-fan who will surpass your skill by far.

So, for whom are you creating the game ?

 

If you want to increase the challenge for yourself first, try to increase all parameters quite drastically, like increasing hp, spawnrate, spawnpoints etc. Don't try to estimate what other players would find challenging, take yourself as reference player.

 

How does the game feels if you are barely able to reach the end ?

 

From this point I would try to establish different difficulty levels, take your own level as hard, have an easy and nightmare mode in mind. You can try to change some value to define a rough version of the different modes, whereas hard is your own level. Now try to get some testers at board and let them play your game.

 

Nevertheless, before adding more features to fill in the fun gap, you need to fix your core concept first.




#5211942 Problems implementing A* - Need a knowledgeable eye to look at my code

Posted by Ashaman73 on 20 February 2015 - 12:07 PM

Here


	void removeFromOpen(Node*) { open.erase(open.begin()); }

You didn't remove the given node, instead you always removes the first one only. Rewrite your code to remove the given node.




#5211877 Is it a good idea to make game mods to practice game design?

Posted by Ashaman73 on 20 February 2015 - 07:16 AM


Is this a good idea?

Not only good, a very good idea smile.png

 

I'm a big fan of mods when you want to do mostly game design. Besides technically/art advantages it is really helpful to have an already dedicated game-fan base which will help you testing your game, especially if you want to do a multiplayer game.

Additionally you get in contact with game engine architecture/design, coding/scripting and modelling/art.




#5211871 who really a creative director is?

Posted by Ashaman73 on 20 February 2015 - 05:50 AM

I don't really understand your question, because you already answered it more or less yourself. Wiki has a description about the creative director in video game production, and eventually it is a little bit fuzzy job description which will change from company to company or even from project to project.

 

Peter Molyneux is one of the more famous creative directors.

 

I think that a creative director is much like the common idea guy, with the difference, that he has, besides fantastic visions, excellent skills to communicate these visions to others.




#5211858 Yet Another Procedural Planet (and some shader advice please)

Posted by Ashaman73 on 20 February 2015 - 04:32 AM


My question is: given the lack of #include in GLSL, in a situation with multiple complex shaders (as in Bruneton) where there is a lot of overlap between functions, #defined constants, uniforms, is there any good generic advice on how to structure things?

I use a pre-processor like mcpp to generate my final shader files, this way you get your include. smile.png






PARTNERS