Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

comfy chair

Member Since 05 Jan 2011
Offline Last Active Apr 05 2013 03:49 PM
-----

Topics I've Started

Blend animation problem

18 December 2012 - 04:54 PM

I use the XNA animation component to perform blending between animations. It uses spherical linear interpolation between matrices.

In most cases this works without problems. However, I have one model where all of the animations are blended wrong.
When I blend two animations where the character is standing, during the blend period he will face to the right and appear to be in the bind pose.

When one of the animations has the model laying on the ground, there appears to be warping of the entire model during the blend period.

I am not an expert on blending or animation and I didn't write the code, but I do have all the source code. Could anyone explain what might be going wrong with this particular model/set of animations?

How do I optimize GUI rendering

22 November 2012 - 10:42 AM

When I turn off GUI rendering in my game, I gain around 10-15 FPS. I have also determined that my game is CPU-bound. This makes me think I ought to optimize it. But how?

The GUI is rendered using many small sprites and a few custom shaders.

What is the normal way? Is it to render into a render target and somehow do occasional re-renders only when something changes?


By the way, I code in XNA. Thank you.

Production graph search

29 October 2012 - 05:35 PM

In my game, I have modelled the production of items as a graph, where each node is an item (type) and the connections between them are processes to turn one or more material items into one or more products.

Now I want the player to be able to set a production goal, that is a desired number of items he wants produced of a give type.

The task is now for the computer to find the most efficient way of fulfilling the goal. There can be a number of material items already in store, and there can be a cost in time and energy for the processes. The cost in time and energy should be minimized.

Which search algorithm should I use? Neither A* nor BFS seem appropriate...

XML with formulas/algebra for "crafting"?

29 October 2012 - 08:05 AM

Hi,

I am making a game that reads its game data from XML files.
The game designer (or user) can specify items and their relationships in XML, and the data is used in the crafting system.

If I want to make it possible for the user to specify the effect on different properties in the crafted item (such as weapon damage, accuracy etc.) from the input items and tools, how can I do that?

I suppose I need to make a sort of language that contains property references and algebraic operators. The language must be parsed and be able to run efficiently in the game.

Any suggestions are welcome. I code in C#, by the way, and I use the XmlSerializer class in XNA.

Determine 'gradient' of interpolated value in pixel shader?

04 October 2012 - 10:35 AM

Hi,

I am working on a terrain shader where I use interpolated terrain weights in the pixel shader to determine the alpha that I draw the corresponding terrain texture with.

Now I would like to apply some noise to the line where one terrain type (like sand) blends into another type (like dirt).
However, I do not want noise where the two terrain types are blended together over large areas.

Is there a way in HLSL that I can see not just the interpolated value of the terrain weight, but also its degree of change? That would allow me to see where there is a sharp line between two terrain types.

If not, is there some other way I can achieve what I want?

Thank you.

PARTNERS