Jump to content

  • Log In with Google      Sign In   
  • Create Account

bioglaze

Member Since 24 Oct 2012
Offline Last Active Today, 03:21 AM

#5185504 [Issue Solved]

Posted by bioglaze on 07 October 2014 - 05:38 AM

It would be nice to know what the issue was and how it was solved. As is, this thread adds no value.




#5172562 FBX model load

Posted by bioglaze on 10 August 2014 - 01:56 AM

Tell me what format 3D models for games is better to choose?

 

Games usually have their own model formats to keep runtime dependencies low and loading performance high.




#5159680 What happens if I don't deallocate dynamic memory on application exit?

Posted by bioglaze on 11 June 2014 - 12:48 AM

Operating system frees it, but does not necessarily overwrite it, so if you have passwords etc. in memory, you should overwrite them.




#5158745 how to design my programs and games structure?

Posted by bioglaze on 06 June 2014 - 11:20 AM

Separation of Concerns

Separate different parts of your code into logical units. For example, file system access could be in its own module so it can be replaced more easily when porting to another platform. Also, don't mix low-level UI code and game logic so it's easier to replace UI libs if needed.

 

DRY (Don't Repeat Yourself)

If you find using a chunk of code in several places, extract a method and replace usages with a call to that method.

 

Tell, Don't Ask

If you find some object getting various data from another object and performing logic on it, consider moving the logic into the target object's method instead.

 

Avoid magic numbers

Unnamed numbers are confusing and if a certain value is used in many places, updating it will easily lead to mistakes when you forget to update all occurrences. Use well-named variables instead.

 

Avoid excessive branching

Control flow is hard to follow if there are many nested branches. Some branches can be converted into methods.

 

Declare variables close to their usage

The smaller the scope, the easier is your mental load.

 

Express intent

If you find yourself doing a for-loop to find a value from a collection, use a specific find-method instead. It makes it clear to the reader what you're doing.

 

Comment "why" instead of "what"

Don't write in comments things that can be seen from the code.




#5157772 better 3d model file

Posted by bioglaze on 03 June 2014 - 04:24 AM

You should write your own model format to keep engine runtime dependencies and loading times to the minimum.




#5153077 is this a correct tangent computation?

Posted by bioglaze on 12 May 2014 - 09:24 AM

You are not calculating handedness:

const Vec3 cp = Vec3::Cross( normal, Vec3( tangent.x, tangent.y, tangent.z ) );
tangent.w = Vec3::Dot( cp, bitangents[v] ) >= 0.0f ? 1.0f : -1.0f;




#5152233 Modern C++ looking for information

Posted by bioglaze on 08 May 2014 - 12:41 AM

This article summarizes elements of modern C++ style:

http://herbsutter.com/elements-of-modern-c-style/




#5151607 Replacing glMultMatrixd with Shaders ...

Posted by bioglaze on 05 May 2014 - 07:26 AM

You should have a very well-reasoned use-case to use double data type in matrices, because they are much slower than floats.




#5151441 What's the Hot/New/Modern OpenGL Debugger/Profiler?

Posted by bioglaze on 04 May 2014 - 11:17 AM

Valve's VOGL is coming to Windows.




#5150766 Screenshot of your biggest success/ tech demo

Posted by bioglaze on 01 May 2014 - 11:57 AM

I refactored the renderer and wrote shaders for this game:

t




#5145362 where to start Physical based shading ?

Posted by bioglaze on 08 April 2014 - 09:06 AM

I found this article useful, includes source code:

http://content.gpwiki.org/D3DBook:%28Lighting%29_Cook-Torrance




PARTNERS