Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

805 Good

About DrunkenHyena

  • Rank
  1. You can also use D3DTA_TFACTOR which should be supported everywhere. Shaders are also another option.
  2. DrunkenHyena

    2D and 3D drawing

    No, mixing the 2 is asking for trouble. If you need to draw a few pixels, then you can still use D3D. If you described exactly what you're trying to accomplish it would be easier to suggest things though.
  3. DrunkenHyena

    Sprite alpha blending

    Quote:Original post by Sc4Freak I'll assume you're loading your textures with D3DXCreateTextureFromFileEx(). From the D3D documentation: Quote: ColorKey [in] D3DCOLOR value to replace with transparent black, or 0 to disable the color key. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque color keys. Thus, for opaque black, the value would be equal to 0xFF000000. That means, that the colour your specify in this parameter is the colour used for colour-keying. So if you specify blue, (255, 0, 0, 255), then all pure blue pixels will be rendered transparent. The colour key doesn't actually change the alpha value of the texture. Passing blue as the colour key to D3DXCreateTextureFromFileEx will load the texture and change all of the blue pixels to transparent black. it very much does change the texture. This is important to know because you need to specify a texture format that is capable of storing alpha. To actually render it as transparent you'll need to enable AlphaTest/AlphaBlending either directly or via D3DXSprite, depending on what you're doing.
  4. DrunkenHyena

    World and texture dimensions

    3D units are completely arbitrary and different models can use radically different scales. Some might use 1 unit as 1cm, 1m or 1km.
  5. DrunkenHyena

    Animation in 2D Tile Based Game

    I would recommend checking out these resources: Those resources will cover just about everything you need to know about the basics (and beyond) of tile-based games. Likely none of it will be in C#, but you really need the theory at this point. It can be tough going at the beginning, but if you stick with it you'll make it.
  6. DrunkenHyena

    int pointer address

    I don't believe you can. But more importantly, why would you want to? Assign the value to a variable and make all the pointers you need.
  7. When it fails, what error code is it returning? Are you running with the debug runtime? What does the debug spew show? (See Forum FAQ for more information on this)
  8. DrunkenHyena

    D3D9 - Palettes?

    it depends on the type of colouring you want to do. One easy way is to have a greyscale sprite and then use colour modulation to tint the sprite to any colour you want. If you have multiple recoloured areas (blue boots, green helmet) then you could do it by splitting your one sprite into multiple subsprites each with their own tinting. This breaks down if you need radical changes in the sprite colouring. At that point your best choice would likely be shaders (as mentioned above), or just manually recoloured sprites.
  9. DrunkenHyena

    Triangle Strip Question

    Also, clear your background to something other than black. That way you can see the difference between rendering nothing and rendering blackness. If something does show up, then it is quite likely an issue with lighting.
  10. DrunkenHyena

    DDS File Format

    Googling for DDS loader shows a number of hits including this one:
  11. DrunkenHyena

    XNA on Linux

    If you Google for Mono XNA you'll see that work is underway. I wouldn't hold your breath though, if it gets done it'll be a long time coming.
  12. DrunkenHyena

    Problem With Vairable Width Bitmap Font

    I haven't noticed that but I'll be going through all of the code soon so I'll check it out.
  13. DrunkenHyena

    IDirect3DSurface9 Question

    You really really shouldn't use surfaces for sprites. It's very inefficient and more importantly it doesn't work very well. If the book you're reading recommends this technique, then it probably isn't a book you should be reading. There are a number of wonderful (and free) resources available in the Forum FAQ.
  14. DrunkenHyena

    simple sample from DirectX

    There is a ton of information in the Forum FAQ as well that's worth reading.
  15. If you don't mind me asking, what is the point of this new class? It looks like you inherit from D3DXVector3 and then rewrite every single method to do what D3DXVector3 did anyway. Also, since everything will know go through a vtable lookup, it will be much less efficient.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!