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; } }
  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!