Advertisement Jump to content
  • Advertisement

Rasmadrak

Member
  • Content Count

    949
  • Joined

  • Last visited

Community Reputation

196 Neutral

About Rasmadrak

  • Rank
    Advanced Member
  1. Hi there, Either... a) Put the timer into it's own thread (hard) b) use different update speeds for the timers. (easy) c) you fail to describe the problem (???).
  2. Rasmadrak

    [A-Star] blocking diagonal movement

    You can also use a metric - i.e if distance to next waypoint is larger than 1.4 * the length of a non-diagonal link it must be a diagonal and can be skipped. EDIT: My bad, did'nt notice that you didn't want to block ALL diagonal moves. I also suggest raising the cost of adjacent tiles to each block/tower to force the units to move a bit away from the blocks.
  3. Rasmadrak

    real-time glow

    Maybe this can help. http://tinyurl.com/2u9zcx2 Hope you find something!
  4. Rasmadrak

    Vertex Array speed

    Usually you sort stuff after materials (textures + shaders) and render all type A first, then type B, type C ... etc.
  5. Rasmadrak

    How road creation works?

    Hi there, It depends. If it's to complicated or large it's usually devided into regions by the game engine. You could also load several display meshes of varying detail and do region based LOD (level of detail) on the track. This doesn't mean you have to divide it before loading it into the game engine - usually the game engine splits meshes as appropriate.
  6. Rasmadrak

    My button gets mad in release mode!! D:

    uninitialized variables? :)
  7. Rasmadrak

    Streaming Terrain

    Hi there! How about sending an update to all nearby (affected) players with "dig a 50x50 hole at x,y" and let the clients perform the changes as needed? Meanwhile - the same command is sent to the server that does the necessary changes on its map (which will be streamed by any other player coming afterwards). That way you offload the server and traffic and rely on the clients to change their approximation of the game world. EDIT: I realized you've thought this through yourself already. What I would do is simply to store each change in a list. Upon login that list (hash nr etc) would be compared to the clientside version and recreated appropriately. At a certain point the list would be to time consuming to recreate and the remote copy of the mapfile is downloaded and replaces the old one.
  8. Hi everyone! I will check out your answers in detail later. Thank you very much! I'll let you know of my progress! Quick comments: rneckelman: "Any particular reason that you absolutely want it allocated dynamically?" I thought that I would leave the pointer NULL as long as there's no returned rows. If the SQL return any rows the pointer is initialized and handled later in the program. But also - I want to avoid pointers as much as possible to minimize the risk of memory leaks, so I'll try creating a pointer to a static adress instead. :) zahlman: "But why are you making a vector of vectors if every "row" vector will only be one element long, anyway? " Right now it's only because I'm testing. I will try passing a "result" object later with expected number of columns etc that will handle everything correctly. The trouble was for me to get anything returned at all from the callback. iMalc: "*result = something;" Good call! Sorry for this. These kind of mistakes happen when you're tired, stared at code for 8+ hours and under stress. :)
  9. Hi there! I need to get data from a callback function, but I can't get any values returned. Does anybody know why the following doesn't work? //destination... std::vector< std::vector< std::string> > *result; //called by: rc = sqlite3_exec(db, command.c_str(), callback, result, &zErrMsg); //callback static int callback(void *DATA, int argc, char **argv, char **azColName) { int i; std::vector< std::vector< std::string> > *result = (std::vector< std::vector< std::string> > *) DATA; if (!result) result = new std::vector< std::vector< std::string> >(); //it doesn't matter if I new it here or outside callback, the result is the same... for(i=0; i<argc; i++){ std::vector<std::string> row; row.push_back(argv != NULL? argv:"0"); (*result).push_back(row); } //DATA = (void *)&result; //doesn't matter, same result... return 0; }
  10. Rasmadrak

    GPS coordinates conversion?

    Hi! I'm wondering if anyone could help me create a formula for converting RT90 to WGS 84 (decimal) GPS coordinates...? A open-source library would also suffice, but a formula would be appreciated. See example below: RT90: 6404811, 1271753 = WGS 84 - decimal: 57.71002, 11.97501 Thanks for your time! All the best, Robert
  11. Rasmadrak

    Flipper Physics

    My tip is to use an already established (free) physics engine for this unless you want to learn the physics as a part of learning. If you just want to make a game, go for the third party libraries :) But as a tip: Check for intersections on each triangle both before and after the movement, if the sign (direction to the triangle) changes from start to finish you know you have passed through the triangle at some point. React appropriately.
  12. Rasmadrak

    Bullet - Things fall through my heightmap!

    No offense, but how can we possibly answer your question with so little information?
  13. Judging by this thread, I'd say it would be a pain to work with you right now in any project.... You should be less defensive and more open since it's basically YOU who's asking for help.
  14. Rasmadrak

    Polys lighted on the wrong side

    You are defining the normals correctly, I assume? And just in case you don't know - OpenGL standard lights are not casting shadows, so things in front of another object does not cast shadows.
  15. Rasmadrak

    Pathfinding Optimization

    Couldn't this be done with regular A* ? Simply penalize direction changes when calculating the cost and possible increasing the cost of each point the further away from its local "line-center".
  • 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!