Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Nov 2006
Offline Last Active Today, 06:22 AM

#4961301 Hardware Occlusion Queries, why use them next frame?

Posted by Ashaman73 on 20 July 2012 - 06:42 AM

What I don't get is how occlusion queries are different from, for example, multiple render passes. In deferred shading, you render to a G buffer, and afterwards you get the buffer back and use it instead in the lighting shaders pass. Wouldn't that cause some kind of stall just like getting back occlusion query results?

When you call the graphics API, your command is most of the time enqueued in a command queue, the GPU will process this command queue independently of the API call. We talk about a stall, when you enqueue a command which requires an immediate feedback, in this case the CPU has to wait until the GPU has processed all commands up to the according API call, which is more or less some kind of busy waiting (aka flushing the command queue, the CPU is not actually busy waiting, but your processing thread is paused at least).

Therefore it is very important to almost never call such a feedback API function to optimise the usage of CPU and GPU. A simple OGL error checking call can already flush the command queue, requesting the result of an occlusion query will flush the command queue up to the occlusion query command at least, therefore the safest way to check it, is once the framebuffer is displayed (most likely in the next frame when the framebuffer has been swapped).

So I'm wondering if my first pass is a bad idea. I read that Battlefield 3 and Cryengine 3 do this kind of thing with software occlusion queries instead to avoid the CPU stall and use the results in the same frame instead of next frame. Am I effectively halfing my frame rate by doing this with hardware queries?

Occ queries, much like geometry shaders, sounds awesome first, but fall short of your expectation once you understand their limitations.

#4961286 Casting problems

Posted by Ashaman73 on 20 July 2012 - 06:10 AM

A guid has only 16 bytes, so your char[32] are actually real 32 digits in hexadecimal format ? Then transform your hex digits into 16 bytes,which can be casted then to:

[source lang="cpp"]byte byteArray[16];//.. convert 32 digits to 16 byte array, 2 digits creating one byte// .. shift bytes according to endianness to fit following structure/*typedef struct _GUID { DWORD Data1; WORD Data2; WORD Data3; BYTE Data4[8];} GUID*/GUID* myGuid = (GUID*)byteArray;[/source]

#4960900 I want to gather a team for making a game-book

Posted by Ashaman73 on 19 July 2012 - 05:55 AM

Where can I find people to help me?

In the classified section.

#4960817 Sick Blood Work: A Hybrid Horror Experience

Posted by Ashaman73 on 19 July 2012 - 12:36 AM

However, in the main stream, horror themed games are not what they used to be and they rely more on visuals for the scare than the game play and underlying story line.

Scary games are really hard to get right and I think, that it depends heavly on the players game experiences. Scare and fear depends a lot of not knowing the known, that is you know that there's something evil, but you don't know enough about it.

This has a dramatic impact on games (and movies), because experienced gamers already know too much about the genre to get scared any longer.

Seeing your idea, you are working with a lot of cliches and cliches should be really avoided if you want to create a scary game. A cliche game can be fun (zombie games), but will most likely not be scary.

#4960814 Update server

Posted by Ashaman73 on 18 July 2012 - 11:48 PM

People are reading your topic and will answer your question when they know the answer. There's no need to post the same topicagain when you don't receive an answer after 1 day !

I've not made any update server myself, but here are some ideas:
1. Keep version informations about your files, i.e. a version file per directory which keeps track of the current version of each file.
2. Write a launcher, this launcher will connect to your server to get the current version files.
3. Compare every entry of the version files to check if some files are out-of-date.
4. For each file out-of-date, download them per ftp or something else, replacing the old version.

#4960390 2d games, need help choosing API/Engine

Posted by Ashaman73 on 18 July 2012 - 02:45 AM

Given that we, for now, are interested in 2D games only, with reasonable physics simulation, I've thought of coding in C++ with OpenGL and Box2D to handle the graphics and physics interaction.

One of the most fun will come from crossplattform :-)

Take a look into sfml, a lib which already utilize many other projects including opengl and some simple 2d graphics api. Using a physics simulation is always tricky, even if it easy to tumble some boxes over, it is very hard to control actually a player avatar (ok, depends on lib).

If you want to start really small, start with sfml and use it 2d API, no phyiscs or opengl at first.

#4960337 2D with 3D, or just full 3D?

Posted by Ashaman73 on 17 July 2012 - 11:23 PM

2D game engine with 3D things in it

If you have no experiences in managing a team or making a game I would sugguest to keep the feature list as small as possible (features will creep in all the time), therefore my vote for 2d with some 3d elements.

#4959855 Easy OpenGL Directional Lighting Question

Posted by Ashaman73 on 16 July 2012 - 09:39 PM

I realize the final coordinate, the w-coordinate, should be 0.

This is the case, because you don't want to affect the vector by a translation, when multiplying with a transformation matrix. The transformation should only rotate the vector.

First define your two points.


Then you should define a source point, I think you want to have (0,0,0), right ?

The direction is (target-source):
(1,0,1) - (0,0,0) = (1,0,1)

After that you need to normalize it, directions are often needed in unit length:
(1,0,1) * (1/length(1,0,1))

Also, are there any gotcha's with lighting when it comes to directional lighting? I saw something about having to apply the light's position AFTER pushing in all of your geometry, otherwise it doesn't translate/move correctly.

When you transform a vertex or vector you move it from one space (i.e. world space) into an other space (i.e. camera space aka eye view). Lighting is often done in camera space, therefore you need to transform all vectors/vertices into the same space. When transforming a model this is done automatically by the transformation matrix, when you set a direction vector for lightning you need to transform it before uploading it to the GPU, that is transform * (lx,ly,lz,0) .

Edit: correction due to the comment of dpadam450.

#4959551 Database Primary Key

Posted by Ashaman73 on 16 July 2012 - 05:42 AM

What happens when a player changes his name ? This should answer your question.

#4959487 MVC

Posted by Ashaman73 on 16 July 2012 - 01:12 AM

MVC is just a programming concept, nothing more, nothing less. It is used in several places, reaching from frameworks, libraries to game engines. Most often the MVC concept is used in a modified way, suiting better the project requirements

#4958827 Unique artists and art styles

Posted by Ashaman73 on 13 July 2012 - 09:57 AM

Boris Velaho - Think Conan the barbarian with less clothes

Frank Frazetta !

#4958727 3D Mathmatics

Posted by Ashaman73 on 13 July 2012 - 04:08 AM

Realtime renderingis a very good book giving an excellent overview over graphics and necessary linear algebra.

An other good book seems to be Mathematics for 3d Game programming.

#4958717 Did you succeed in building a game from a Game Engine?

Posted by Ashaman73 on 13 July 2012 - 03:31 AM

- engine used

Own engine.

- game (if you can provide a link to see how more complex it is compared to what we want to do)


- the time it took to get a beta version

Not in beta yet, but almost alpha. Engine+Game took more than 12 years sofar Posted Image

- size of the team?

~1 (+part sparetime artist for the last years)

Concluse: hmmm... use some existing engine if you want to make faster progress Posted Image

#4958671 Embarking on the big one.

Posted by Ashaman73 on 13 July 2012 - 12:53 AM

My first instinct is to write some kind of 200+ page design doc covering the main elements of the design and the story(s), then use parts of that (or just email the whole thing to whoever is interested) to attract programmers and artists.

In short: epic fail

Noone, really no one, will read a 200+ design doc without being paid for doing it. Yes, this topic has been discussed very often. The consent which I remembered so far is:
1. Either pay someone who develop your game...
2. ...or learn a skill which contribute to the implementation of your idea (artist,coder etc.).

Else you will have a very hard time to find someone who want to help you out, sorry, but game designer in the hobby/indie community (aka idea guy) is more of a team role than a individual role.

#4958655 Drawing Sprites using SpriteBatch

Posted by Ashaman73 on 12 July 2012 - 11:41 PM

take 20 - 30 fps hit

Measurement in fps is worthless (30 of1000 <> 30 of 50), what is the real time in ms ?

I still use immediate opengl to draw my gui with a few hundred icons, it has a performance impact and I will get rid of it in the future, but in my case when the inventory is open, you don't need to keep up high fps.