Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

247 Neutral

About grinliz

  • Rank

Personal Information

  1. grinliz

    pathfinding on a 2d map

    I am such a fan of A* that I wrote a library for it. If you are using C++ it might be a quick way to get pathfinding working for you: https://github.com/leethomason/MicroPather
  2. grinliz

    SDL vs SDL2

    I'v converted from SDL1 to SDL2, and found it well worth the effort. SDL2 cleans up some conceptual weirdness in SDL1 (what's in texture mem vs. low mem?) as well as enabling new OS and platform features (consistent multitouch.)   And, as others have pointed out, it's clearly the future of SDL development.
  3. Cleaning up the 'const', removing the extra casts (as NightCreature83 suggests) and using a QueryAttribute to get an unsigned, the main loop looks like: tinyxml2::XMLDocument doc; if(doc.LoadFile("resources.xml") == tinyxml2::XML_NO_ERROR) { for( const tinyxml2::XMLElement* child = doc.FirstChildElement("resources")->FirstChildElement("resource"); child; child = child->NextSiblingElement()) { if(child->Attribute("UID")) std::cout << "UID = " << child->Attribute("UID") << std::endl; // assuming you want UID as an unsigned: unsigned uid = 0; child->QueryAttribute( "UID", &uid); std::cout << "UID = " << uid << std::endl; std::cout << std::endl; } }
  4. Thanks! The _SECURE_SCL makes the problem much better. Great tip!
  5. Spoonbender -- You may have hit on something there. I did, but I assumed it was only in debug mode. That may be a wildly incorrect assumption - for security reasons, they may check in release mode as well. I'll look in to that.
  6. mikeman -- I know what you mean...they are all within that 30ms error one would expect. I think I have vsync turned off (although the driver settings don't make that perfectly clear, so I'll check at runtime). However, more telling, Lilith3D works when I compile the source on the same machine...so I think it has to be a compiler setting.
  7. I recently moved my C++ OpenGL game engine (http://grinninglizard.com/lilith/) to VS 2005. When compiled on 2005, the graphics stutter horribly: one frame will take 40ms to draw, the next 20ms, the next 45ms, etc. The average speed remains the same as it did in VC 6. The engine works fine on VC6, mingw, and Mac XCode. Only 2005 shows this stuttering. The problem occurs in both Debug and Release, but I haven't found anything from profiling to point to the problem. (Since the average framerate is unchanged, it may simply average out of a profile run). What comes to mind is a problem either with 1) the STL implemenation (memory flushing?) or 2) compiler settings. Any guidance on what the problem might be? Has anyone else seen this? thanks
  8. grinliz

    ShadowMapping Artifacts

    "shadow acne" is well put. Your offset (0.1) is about on the same scale as you shadow pixels. You can see the pixels pretty clearly on the projection of teacup in the background. The problem gets worse as you lose resolution in the background. I second xycsoscyx suggestion of using closed shapes and rendering backfaces for your shadowmaps instead of front faces. Its a much easier solution than trying to work out bias and floating point resolution.
  9. grinliz

    Quake 2 MD2 v_weap models

    Polycount still has lots: http://www.planethalflife.com/polycount/
  10. grinliz

    SDL IMG_Load

    I have had similar troubles statically linking to SDL_image across various compilers. Since it is one dll/so with one (useful) entry point, I would recommend just loading it dynamically. In SDL, something like this (I haven't compiled it): void* handle = SDL_LoadObject( "SDL_image" ); libIMG_Load = (PFN_IMG_LOAD) SDL_LoadFunction( handle, "IMG_Load" ); will find the IMG_Load for you. You will have to put in some #ifdefs to load the correct filename: SDL_image, SDL_image.so, or SDL_image.dylib. But overall I find, for this case, a dynamic load easier to get working. lee
  11. grinliz

    Multipass Texturing

    Terrain texturing a subject near and dear to my heart: http://www.grinninglizard.com/lilith/ If you are comfortable with the hardware requirements for shaders, I strongly recommend shaders combined with multitexturing. I haven't used the DirectX API for multitexturing, but assuming it's roughly comparable to OpenGL then setting up the API for just the right blend and color combinations is difficult and frustrating to experiment with. On the other hand, it's very easy to write a fragment shader that combines the textures just the way you want, and adds special visual effects on the way. For example: perhaps you want specular reflection just on the snow layer. Or add a little random height noise so the terrain doesn't look to regular. Or experiment with texture splatting. Straightforward with shaders, time consuming with the fixed function API. lee
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!