Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Nov 2006
Offline Last Active Today, 01:51 AM

#5161646 AMD GLSL "subtle" or "quiet" error.

Posted by Ashaman73 on 20 June 2014 - 12:37 AM

If nothing is rendered, most likely your shader program does not compile on ATI. Nvidia is known for more relaxed enforcement of correct GLSL code, therefor you might have an GLSL specific error which will be accepted by Nvidia but rejected by ATI. Best to log out the error messages after compiling your GLSL code, this will help you to quickly track down your error.

#5161292 Attribute and Formula Help

Posted by Ashaman73 on 18 June 2014 - 06:23 AM

Well, you should start on a very abstract level, which is the condition of a unit: eg 0% = dead, 100% full health, therefor

hp = [0...100]


Now you need to consider how damage is applied, try to make it as simple as possible, eg

hp_new = max(0,hp - dmg)


Now, how does defense make sense ? It should reduce the dmg linear (eg dmg' =dmg-def) or it could reduce it percentally (dmg' = dmg * 1/def) or you could scale your hp like this

hp_combat = hp * (100% + def%)

hp_combat_new = max(0,hp_combat -dmg)

hp_new = hp_combat / (100% + def%)


You can put this into a single formula

hp_new = max(hp - dmg/(100%+def%) )


This way your def value of x increases your hp for a single strike for x%. I like it this way, because it is simple and you can scale dmg and def without fearing to hit some scaling pitfalls (eg. if you have a linear effect, what happens if def>dmg ? If you use a percentally effect, what happens if def approaches 100% ?) Thought the percentally formula is the same concecpt as hp scaling, hp scaling is simpler to design (Is a differenrence of 99.986% def and 99.973% def of late game content still readable ?).


Well, after this you can try to add some obfuscation and specialisation. Eg. add defense for special elements (eg fire), add some additional hp scaleing (thought it is the same as def, but has some other name) etc.

#5161282 Share the most challenging problem you solved recently! What made you fee...

Posted by Ashaman73 on 18 June 2014 - 05:45 AM

I switched most of my AI code (~80%) from single core to multi-core. Most challenging was to get the logic, which is written in lua (which does not support multithreading), distributed on several cores. All without using any additional lock-synchronsation like critical sections or semaphores etc., thought most of the sync is done in the 20% left for a single core.


Nevertheless, it works and make me proud biggrin.png

#5161233 Pathfinding for large units

Posted by Ashaman73 on 17 June 2014 - 11:06 PM

There are some ways to ease this issues, one approach (influence map like) has been mentioned already by apochPiQ. You can althought try to work on different voxel resolutions (2x2x2 block is considered as single block for medium creatures, 4x4x4 for large etc.), you can work with predefined voxel representations and build a graph (a cone voxel).


But I would re-think my physics/movement/pathfinding approach in a modifiable voxel world. If you really intent to move large entities in a more or less realistic way through a voxel world, then you will encounter lot of issues (getting stuck most often) and modifing the world will result in breaking stuff really quickly. Eg it would be much easier, if every entity would be the size of one voxel, this will result in lot of clipping, but getting rid of clipping will be extremly hard. Separating the movement phyiscs representation from the visuals and optional hit-boxes, have lot of benefits (minecraft do it this way ?).

#5160775 FSMs vs Behaviour trees in gameplay programming?

Posted by Ashaman73 on 16 June 2014 - 01:08 AM

BTs are not really a superset of FSM, because a tree does not contain any cycles. I'm sure, that you can implement the same or atleast similar logic in both representations, but it will most likely get more complex in one of the two representations.


BTs are very flexible and easy to expand, therefor you can integrate other AI logic as special nodes, therefor adding FSMs should not be a problem. Both, BT and FSM, have kind of memory (path in BTs and state in FSM), but the follup interaction is strongly defined in FSM (state transitions) whereas a BT have the option of interrupting running actions and initiating new actions (priority nodes).


My rule of thumb is to use BTs where you have more script like behavior, eg the approximation of the AI of a human being and to use FSM where you have more rule/state based behavior. 

#5160258 [DX11] Why we need sRGB back buffer

Posted by Ashaman73 on 13 June 2014 - 04:03 AM

The result is almost the same

Yes, almost is the little, but important, feature. Standard images and displays still work with 8bit only, and 8 bits are really low nowadays. Most game engines will work internally with 10,12,16,32 bit per channel and the final rendered images needed to be converted (pressed) into 8 bits to be displayable by your devise (monitor). The trick with the sRGB color space is, that it distribute the visible distinguishable colors better on just 8 bits (the human eye can't distinguish dark color as good as bright colors) and therefor displaying the image reproduce less artifacts. That's it, just an improvement of display quality while keeping the memory impact the same.


PS: the devise should support the sRGB color space, else you would encounter artifacts or it would be converted back to a devise compatible mapping.

#5159751 Location, job, education

Posted by Ashaman73 on 11 June 2014 - 06:30 AM

See it as service and eventually as economic system, this way it is more or less a standard demand and supply scenario.


Eg teacher:

supply: teaching service with different degrees of quality (education)

demand: (children) population dependent demand of getting teached


Supply >> Demand

You need to get a better education as teacher to get a job and you can not expect to get high salaries (teacher might change the job to earn more).


Supply << Demand

The politics needs teacher, reducing the requirements of education. People of other industry branches, but still with some kind of hi-level education, will be headhunted. The salary will be increased.


Instead of making it depending sole on level of education/quality of the teacher (supply), try to add a demand (eg 5% of popultion) .

#5158646 Full Model Shader

Posted by Ashaman73 on 06 June 2014 - 03:24 AM

As always, it depends on your engine. Writing such a shader is not a problem, the issue is how to integrate it into your engine. Here is what I  have done in my engine to highlight objects (deferred engine):


1. ensure, that your engine is capable of rendering emissive pixels

2. extend the standard model pixelshader (which renders the color of your models to the color/material buffer):

- add a color parameter to the shader, so that you can choose an optional emissive color for each rendered model

- calculate the emissive color intensity by taking the normal into account (eg fresnel or just normal-z value)

- add color.rgb * color.a* normal_dependent_intensity to the emissive buffer


If you dont want to hightlight an object, just set the color to black or the alpha value to 0.

#5158625 Screenspace Shadow Mapping Help!?

Posted by Ashaman73 on 06 June 2014 - 12:56 AM

"Efficient virtual shadow maps for many point lights" It's

I know this paper, it is still more theocrafting than practically useful (~15-20ms frametimes on NVIDIA GTX Titan GPU + Intel Core i7-3930K CPU isn't awesome for games yet). I've hoped for a more pratically useful solution, we will see what useful changes happens once the new API approaches/consoles kicks in.

#5158617 Screenspace Shadow Mapping Help!?

Posted by Ashaman73 on 05 June 2014 - 11:34 PM

you can get hundreds of point light shadows in the same scene.

Ahh cool, can you point me to some demo, game or presentation which managed this, especially the hundreds part sound really interesting, I'm not interest in caching single shadow maps, but multiple, point light shadow maps, because my game would profit from such a feature too.

#5158613 Screenspace Shadow Mapping Help!?

Posted by Ashaman73 on 05 June 2014 - 11:00 PM

Right now Telanor has chosen to use cube map shadow mapping for the point lights ( creating a big issue with peformance ).

That is the way to go:

add cube map shadow mapping for point lights

-> be happy about how cool it looks 

-> add more lights

-> see how bad the performance go

-> remove pointlights smile.png


To be honest, point light shadows are really extremely expensive, all shadow mapping variances are just too expensive to handle more than a handful of lights. One major issue is, that you need to render the scene multiple times which kills your performance by too many batches (this might change with new API approaches AZDO [Approach Zero Driver Overhead], Mantle,DirectX12), but for now shadow mapping is really,really expensive and real screen-space shadow mapping does not exist in any general, acceptable way.


The most common workaround:

1. use only point light shadows , if it is really necessary (even paraboloid shadow mapping), e.g. one major gameplay feature use one pointlight shadow

2. use shadow mapping for the most important light sources only (sun/moon plus some major light sources).

#5158064 First Things to Do in Bringing a Game into Business

Posted by Ashaman73 on 04 June 2014 - 05:06 AM

You dont have any experiences in making games and want to create a game with a team, which dont have any experiences too ?




For the mean time, I build the game on my own so that they're convinced about my intention regarding making a game;

Well, this would be a good idea, make a small game to learn what is necessary to actually create a game. One or two small games to start with would be a good idea....




I should stick with my friends. But what should I do next?

Well, this would be a good idea too, have some fun with a small team, try to motivate each other, try to teach and learn from each other. Make a small prototype.




Do you have any other advices?

If you dont have any experiences, dont try to make a commercial game (no reason to create a dev company). Try to learn and have fun, but as soon as money enters the stage, or atleast the ambition to earn money, it gets complicated, stressful and a lot less funny... Creating a game is really lot of work and the underestimated by beginners by far. Try to start small, with either small games or with modding an existing game engine. Both will help you to establish a feeling about what is needed to create a game.

#5157780 3rd person camera versus Diablo III style camera

Posted by Ashaman73 on 03 June 2014 - 05:04 AM

The camera setups are very similar (both are 3rd person camera), what differs is control. Point'n'click vs WASD with either fixed, free or shoulder attached 3rd person camera.

You can deliver an interesting story with both approaches, what is more important is the level of immersion. Immersion depends on a lot of factors, camera is only one. In my opinion the level of immersion decreases with following camera setups:

1. FPS camera (best)

2. shoulder attached third person

3. free third person


But it only matters if your story elements are equally embedded in an immersive world. If you only have some text, cut scenes, dialogs, the camera doesnt matter much at all in my opinion. In this case it would be more important to setup the camera to support the game play.

#5157729 Bullet Physics - Objects pass through certain triangles in mesh

Posted by Ashaman73 on 03 June 2014 - 12:23 AM

Hmm... watching your video, it seems to happen at the transition between the left and right terrain-blocks. At some times you can observe, that the sphere movement got blocked for a small duration until it falls through the mesh. Maybe it got caught between two different tri -meshes and the upper one (+gravity) pressed it through the other one. Double check the transition of your two blocks, check if it works on a single block only. Check your forces (are they building up too fast ? ).

#5157728 better 3d model file

Posted by Ashaman73 on 03 June 2014 - 12:04 AM

which kind of thing will I need to my games (resources, mesh, bones, camera, ligths, scenes, etc)?

Most likely

- mesh

- textures

- bones

- keyframes (animation)

- vertex color

- general object information (this object represents a billboard/lightsource/effect in your engine)


Is It necesary create that files?

More or less, yes, because most other formats filled up with stuff you don't need. Best to have a binary, hi-performance format, which is very similar to your engine internal data structures (you just need to load them and don't need to convert stuff during loading time).


Thought, writing your own export is not the best idea, better would be a converter from a common format (collada/FBX) to your own format, regardless of the modelling tool you use.


Is there a file like Collada DAE that It has all information?

FBX is quite common and Open Game Engine Exchange seems promising.


Is It better create all my own files or read .blend file?

Create your own format (see above).