• Content count

  • Joined

  • Last visited

Community Reputation

200 Neutral

About teamonkey

  • Rank
  1. Quote:Original post by Eelco Quote:Original post by Trap RK4 is the best of the 3. is it? id say it depends. It does, but 3 times out of 4 it's the best solution, anecdotally speaking. It has the best balance of speed, stability and accuracy for general complex simulations. If you need more accuracy or stability than RK4, you're usually better off finding some way of reducing your time step (e.g. by doing two steps of half the size). RK4 is a good tool for practically any simulation, even if it isn't the best. Mid-point (I assume you mean RK2 or something similar) is good when speed is more of an issue, but one RK4 step is usually better than two RK2 steps of half the size (depends what you're doing). Euler's right out - RK2 is more accurate for a smallish speed overhead and Verlet integration is much more stable for virtually no overhead.
  2. should help, I think. Also try googling the ODE mailing list. You can do this by adding "" to the search string. E.g. search for " ragdoll sample" (without the quotes). [EDIT]The zip pointed to in that mail doesn't actually contain any source. Try this place though - - I hear it's got some decent ragdoll code.
  3. Why Verlet more stable than Euler

    Quote:Original post by ajas95 The reality is people who find these instability problems with euler is that they use a timestep not close to 1.0f. What happens with Euler is that you calculate a velocity by dividing by the timestep... then next frame, you'll end up calculating a change in position by multiplying the timestep. The further away from 1.0f this timestep is, the more precision you lose in that mul/div. Well that does happen, but it's pretty inconsequential. The amount of accuracy you lose is miniscule. Here's an example of why the Euler method is inaccurate. Try plotting y=x^2 on a graph using the Euler method. To get the next point, take the current value calculated at the current point, add on dx/dt at the current point and multiply by the timestep. For y=x^2, dx/dt = 2x. I get these figures for x=0 to x=1 in a table when I use timestep=0.1 x y=x^2 Euler 0 0 0 0.1 0.01 0 0.2 0.04 0.02 0.3 0.09 0.06 0.4 0.16 0.12 0.5 0.25 0.2 0.6 0.36 0.3 0.7 0.49 0.42 0.8 0.64 0.56 0.9 0.81 0.72 1 1 0.9 It's easy to see that the Euler line gets further and further away from the desired values. If you use a smaller timestep it gets closer, but it can be proven that you need the timestep size to be zero in order for it to fully match the line. Note that if you were trying to match the line y=x, the Euler method would get it perfectly correct. It's only when there's a deviation from a straight line that Euler breaks down. The Verlet method looks at the current position *and the previous position* in order to make a more informed guess at the next point. Mathematically it's not any better than the Euler method, but it tends to be more stable in practice (that is, even though it's not too accurate it doesn't get worse and worse like you can see the Euler method doing here). The RK2 and RK4 methods are mathematically better because they take several sample points along the way. The RK2 can calculate y=x^2 perfectly, but doesn't like more complex equations (good for physics with gravity though).
  4. SDL_OPENGLBLIT is being completely removed in the next version of SDL anyway.
  5. Quote:Original post by Yamian Yeah, specifically Dev-C++ is what I was aiming for. SDL 1.2.8 has pre-compiled MingW libraries, but none of the SDL extensions. There should be like a *.lib to *.a converter then all my problems would be solved. Or maybe I should just get Visual, which I too have been concidering. They should just work anyway. gcc can work with C *.lib files under Windows.
  6. loading a web page w\c++

    Seriously, the curlpp interface to libcurl is the way to go. Here's an example. class do_something_with_data : public curlpp::output_trait { public: virtual size_t write( void *buffer, size_t length ) { // Whatever } }; curlpp::initialize(); curlpp::easy curl_handle; // use the easy interface curl_handle.url(""); // :) do_something_with_data my_trait; curl_handle.m_output_trait.trait(&my_trait); // tell it to use your handler curl_handle.perform();
  7. loading a web page w\c++

    Because when you code in C++ life's just not that easy. ;) You want libcurl
  8. Quote:Original post by Skizz Windows doesn't support multiple CPUs - you need to get a multiple CPU version of the OS (NT only IIRC and I'm not sure it even supports HT). You pay a license per physical CPU, so a dual CPU in one chip counts as one. So, in Windows, your multithreaded app was running on one CPU so it was never going to be quicker. That's only true for a certain licence agreements with Windows Server on high-grade server machines, certainly not true for workstation editions. NT, Win2K and XP Pro handle multiple CPUs and HT processors fine, right out of the box. XP Home, however, has been crippled and only supports one CPU (and HT is disabled).
  9. Quote:Original post by Xtremehobo I agree with the annonymous poster. It's very difficult to create a webpage that's compliant with today's XHTML and CSS standards using a WYSIWYG type editor such as Dreamweaver and Frontpage. However, if you know what you're doing, you could create a very involved layout by hand faster than you could in Dreamweaver. I'm pretty sure that most of the Dreamweaver MX users here (myself included) primarily use it for the IDE and not for the WYSIWYG component. I've not found a web IDE to match it yet, especially one with PHP support. Maybe one day there'll be one for Eclipse... Apart from Dreamweaver MX I use VIM6 (with syntax highlighting) when editing pages directly on Linux servers and the Web Developers Toolbar plugin for Firefox as a real-time CSS editor.
  10. New Indie Self-Publishing Model

    Quote:Original post by codeandroid Hmmm. I'm pretty sure I recognise a couple of those titles from a display in a bookshop near here. Which is a good thing. It might not be Game, but it seems like a fairly inexpensive way of getting a real life product in the shops.
  11. threads in games

    So say it's 2006 and we have the 6-cored (or whatever) Xbox 2, the n-cored PS3 and an awful lot of people have dual or quad AMD64s, Intel chips with HyperThreading and multi-cored G5s. How would you structure your game then? I mean, would you have, say, a number of equal-priority parallel threads and give them tasks when one had a bit of processor time spare? Would you give each code block (AI, sound, graphics, networking) a different thread? Would you give each tiny little task a separate thread in the hope that the OS/underlying hardware could manage it better than you could?
  12. You can use C or ASM to program the GBA (and the NDS too, I imagine). It's a little different to PC programming though - try The DS has slots for GBA cartridges and it's own media cards. You can play GBA games on the DS and I imagine that you can use GBA flash linkers on the DS. No-one's managed to write to DS media cards yet to write DS-specific games, AFAIK, nor have they managed to hack the wireless link so that you can upload games from your PC to your DS. It's only been a week, give it time :)
  13. Passing a object into another class.

    Easiest way is to use function overloading. class B { public: void print(); } class C { public: void read(); } class A { public: void action(B &b_in) { b_in.print(); } void action(C &c_in) {; } } action(B) is essentially a different function to action(C). Templates might prove to be more flexible though.
  14. Hmmm. Under investigation, it's actually the $categories[] line that crashes it, not the while statement. If you comment out the $categories[] line it doesn't crash. If you replace it with a line like $tmp = $link_array; it dies. It seems like something's resetting the each() counter, throwing it into an endless loop. No idea why it works for PHPBB though. [EDIT] Yes I do - it's because it doesn't try to modify the equivalent array in any way.
  15. I think Drupal should do what you want. Check out the filestore module.