Hardwire

Members
  • Content count

    70
  • Joined

  • Last visited

Community Reputation

194 Neutral

About Hardwire

  • Rank
    Member
  1. J2ME soft-body physics library

    Glad that the source code is readable :) I haven't much time to tidy the sample up, but hopefully it's clear enough.
  2. As a part of my Bachelor's Degree work I've developed a soft-body physics library for J2ME. I've optimized it on real-world devices and successfuly released a commercial mobile game using the library - Gish Mobile. Now I thought that it could be useful for other J2ME game developers as well, so I've made it open-source: bloft.hardwire.cz The name is kinda weird, but I couldn't come up with a better one :) The library is written in Java, so it can probably be used for J2SE development as well, but I guess there are more sophisticated J2SE libraries out there.
  3. 2D top down water effect

    Quote:Original post by jdindia http://freespace.virgin.net/hugo.elias/graphics/x_water.htm The ripples are too small, it looks like if you were directly above the water...but thanks for the link, I'll try to play with that and see if it works when I create big ripples.
  4. Hi, I'm currently working on a 2D game which takes place mostly on water. The camera is top down and can be zoomed in and out quite a lot. Well, it can't be zoomed in more then what you would see from an airplane flying above water as close as it can. I'd like to make a nice water effect which would work well when zoomed both in and out, but I couldn't find anything on the net - almost every water effect is in 3D or it's a side-scroller. It doesn't have to one effect; I could somehow transition from one effect to another while zooming in. I got some ideas, but as I have no expiriences with these effects I think it wouldn't look very good. So I would appreaciate some examples of how I could do it (or similar games - I couldn't think of any topdown game with a water effect!). Thanks in advance.
  5. My Game Physics Demo, and speed questions

    You should profile your code and determine which part is slowing it down.
  6. Good free 2d physic engine?

    If you look to the first sticky post "List of physics engines and reference material", you will find links to some sites containing lists of physics engines. Of of those is mine:) http://physics.hardwire.cz/index.php?action=show&sortby=order&parent_id=24 EDIT: Oh, and my personal favourite is Box2D.
  7. Need a fixed-point math library (C++)

    I was using this one: http://wiki.yak.net/675 If you need the SQRT for computing the vector length then you better do it like this (rewritten from the Graphics Gems): public static int vectorLength(int x, int y) { int X = (x < 0 ? -x : x); /* absolute values */ int Y = (y < 0 ? -y : y); if (X == 0) return Y; if (Y == 0) return X; if (X < Y) /* swap X and Y if (X < Y) */ { /* See WYvill (G1, 436) */ X ^= Y; Y ^= X; X ^= Y; } int t = Y + (Y >> 1); return (X - (X >> 5) - (X >> 7) + (t >> 2) + (t >> 6)); } And finally there is a fixed-point SQRT algorithm: http://www.worldserver.com/turk/computergraphics/FixedSqrt.pdf
  8. Fixed-point physics engines?

    IMHO the fixed-point operations would be slower on today's computers because floats are now really fast. Or there will be almost no difference. It is not worth the trouble with overflows and underflows. It could be useful on platforms when you don't have support for floats. There is a patch for Box2D (it's in the SVN currently) which adds support for fixed-point numbers (more about the patch here: http://www.box2d.org/forum/viewtopic.php?f=3&t=517&st=0&sk=t&sd=a&start=10). I ported Box2D to Symbian and made some tests on my N70. When using fixed-point number one frame took cca 15ms and when using floats one frame took cca 25ms, so there is a difference, but on PC the difference was negligible. Also, compiling with fixed-point numbers the code size almost doubled.
  9. Bounding Volume Hierarchy Tree (BVH)

    There is a very detailed description (cca 50 pages) in Real-time Collision Detection book by Christer Ericson: http://realtimecollisiondetection.net/
  10. Help with racing physics

    Also you can try one of these: http://physics.hardwire.cz/index.php?action=show&sortby=order&parent_id=42
  11. AFAIK SAT can't give you the collision point, only the normal. You can then use the normal to find supporting points. In a case of a polygon it is a vertex of the polygon which is most far along the normal direction (you find it by projecting all vertices to the normal and taking the vertex with maximum "projection", meaning dotproduct). It doesn't need to be only one point, it is good to take more, if they differ from the maximum only by some small delta. In a case of a circle you simply take the center of the circle and add the normal times radius. Then when you have the supporting points you have to distinguish all the cases which can happen and treat the situation accordingly:) For example when you have 1 supporting point A on the first object and 2 supporting points B and C on the second object you will project A on the segment BC and it will be resulting collision point. This is explained (with source code) in Oliii's tutorials: http://uk.geocities.com/olivier_rebellion/Polycolly.zip
  12. Help with simple 2D car physics

    Few more resources: http://physics.hardwire.cz/index.php?action=show&sortby=order&parent_id=42
  13. I am making a jump'n'run game. I already have my own map editor, but it is not very user-friendly, so I would like to try Tile Studio, which could probably be easier use for the level designer. In my game I have moving platforms which I activate when the user touches a trigger. So, I need a way to attach the trigger to the platform it triggers...how can I do this in Tile Studio? In my editor I place platforms as special tiles and I hardcoded trigger placement into it.
  14. To speed up the simulation I wanted to update only visible objects. But many problems emmerged - for example I have 2 objects, one is visible and one not. One object gets updated, moves so it penetrates into the other object, but the collision is not solved (I check collision only against objects with higher ID and the other object can have lower ID). Also, if I have an object connected to the world by two springs at each side of the object, on spring is visible and one not, then the object is dragged just to the one side. How do you treat these problems? Do you even use this technique? Or do you update all objects in the world each step and hope not many objects will be updated (because they will sleep for instance)?
  15. Making a physics engine for XNA

    Or you can use existing physics engine for XNA: http://physics.hardwire.cz/index.php?action=show&sortby=order&parent_id=20 (look at these which have C# before their name)