XNA Creators Club Online
community forums

Search Forums

Page 1 of 13 (128 items) 1 2 3 4 5 Next > ... Last »
  • Re: ACh water gives me headaches

    Read through your code and make sure that you're setting up the reflection matrix properly; is the reflection taking into account your camera angle? Reimer's method is hard to get right, so how about trying a different method where you simply flip the whole world about the water plane then render that into a texture. You then project the ...
    Posted to Game Algorithms (Forum) by zanders on 9/30/2009
  • Re: Radial Blur?

    Implement radial blur using HLSL. Radial Blur is a lot like Gaussian Blur, except for each successive sample you magnify the image (by multiplying the texture coordinates). Off the top of my head it's something like this... sampler TextureSampler;float screenScale; float3 RadialBlur(float2 centre, float2 texCoord){ float3 color = ...
    Posted to Game Algorithms (Forum) by zanders on 9/30/2009
  • Re: More efficient way to do Object/Instance system?

    Another way if you don't want to do things internally inside a class (which is probably the better way), is to check if the subclass is a specific type; something like this... GameObject obj = GameObjects[i];if (obj is Ball){ (obj as Ball).Health = 10;} Another way is to implement a Find() function that takes a generic type T that must extend ...
    Posted to Game Algorithms (Forum) by zanders on 9/30/2009
  • Re: Artificial Intelligence for my Tower Defense game

    Why not store an 'effectiveness' value for each tower type for every unit type, then divide that effectiveness by the amount that the tower has been upgraded by (so e.g. a level 2 tower would be twice as good at destroying enemies so therefore that enemy is half as good at surviving that tower). Loop over the board, summing up the ...
    Posted to General (Forum) by zanders on 9/24/2009
  • Re: Threading: Is it possible to use multiple threads and multiple ContentManagers and avoid causing threading issues?

    [quote user="jwatte"]if you use BeginRead()/EndRead() to do asynchronous I/O[/quote] oops! Well you learn something new every day.. :S Looks like you should be able to get away with having multiple content managers with one for each thread... as long as they don't all load in parallel.
    Posted to Game Algorithms (Forum) by zanders on 9/22/2009
  • Re: Locking Frame Rate In 2D Tile Engine

    You can change this by changing the Game.IsFixedTimeStep and Game.TargetElapsedTime in the Game() constructor. To set the game to 30fps, do this in the game constructor: this.TargetElapsedTime = new TimeSpan(0, 0, 0, 0, 32);
    Posted to Game Algorithms (Forum) by zanders on 9/21/2009
  • Re: Threading: Is it possible to use multiple threads and multiple ContentManagers and avoid causing threading issues?

    All Content Managers do 'under the hood' is load the compiled .xnb files from the hard disk using the File System. You will certainly have problems trying to read files from more than one thread since File IO is exclusive to a single thread so you'll get thread locking issues. For example if thread #1 is reading some content, and then ...
    Posted to Game Algorithms (Forum) by zanders on 9/21/2009
  • Re: Best Tunnelling Solution For Ball And Paddle Game?

    My method to prevent tunnelling is to check for collisions both at the ball position, and at ball + velocity. This won't catch some cases where the ball is moving really fast (you could another check at position + velocity*0.5f would fix that) but is probably good enough. (I suspect this is what you're already doing) Here's some ...
    Posted to Game Algorithms (Forum) by zanders on 9/21/2009
  • Re: Shadow mapping question

    That banding *might* be caused by 2 things: 1. the shadow depth map doesn't have enough accuracy (try using SurfaceFormat.Single, or look into splitting a float value into a 4 value color buffer) 2. the area that is being rendered by the shadow map is not being covered by the shadow map, which can lead to weird lines, spikes and other strange ...
    Posted to Game Algorithms (Forum) by zanders on 8/27/2009
  • Re: Rendering high detail 3d Models

    [quote user="SpidieMan"]Do I need to code something that takes care of level of detail on these models? Or does XNA/DirectX take care of that itself[/quote] The DirectX SDK has some samples on dynamic level of detail that allows you to simplify the models during runtime. It is in C++/DirectX though, but still worth a look.
    Posted to Direct3D 10 (Forum) by zanders on 8/24/2009
Page 1 of 13 (128 items) 1 2 3 4 5 Next > ... Last »