• Content count

  • Joined

  • Last visited

Community Reputation

188 Neutral

About domok

  • Rank
  1. 3D Rain Particle System

    Wow nice this works great! Thanks
  2. 3D Rain Particle System

    Ok it was easier than I thought. You just calculate the angle between the view direction (with y = 0) and the vector (0, 0, 1), then create a rotation matrix around y-axis with this angle. I think I'll find out the rest with diagonal rain Thanks!
  3. 3D Rain Particle System

    The problem with rotating the billboards is that the rotation depends on the position of the camera. If the drops fall down with a vector (1, -1, 0) and your view direction is parallel to the yz-plane then the lines should be diagonal but if your view is parallel to the xy-plane the lines should be straight down. I'd like to have them fall straight down correctly first. I disabled billboarding and the result was much better, but now if you watch from a certain angle, you can see almost no drops, because the quads are parallel to the view direction. What I need to have is billboarding that only affects the y-axis. Is that what you meant with: [quote]can you lock a rotation so it wont look directly at the camera but still follow it position.[/quote] Anyway I don't know if I can, I probably do but I don't know how...?
  4. Hi I'm working on a 3d rain particle system. Till now I have used billboards (with ID3DXSprite) but this doesn't look nice if you look up to the sky because then the rain drops (they are more like lines) still look the same. The lines can't always show the camera but I don't know how to make it look real. Another problem with billboards is that you can't make diagonal rain (or I haven't found out how...). The rain can't just be a 2D overlay because it interacts with the terrain. What is the best way to draw real looking and always correctly oriented rain drops?
  5. Ok I'm using a different algorithm now and it works great Thanks
  6. Or should I maybe use /fp:strict instead of /fp:precise? This accuracy problem is just really bad because the application now sometimes (very rarely but still..) gets the info that the player is below a lake triangle and so he gets hurt although he is not really near to the lake... But if it's the only solution I'll rewrite it to double precision or how do you all handle this?
  7. Ok now I've had the problem again and some more info: ab = 47583.820 ac = 51721.422 bc = 47070.406 cc = 51163.359 bc * ac = 2.4345482e+009 cc * ab = 2.4345482e+009 I've tried this just somewhere in the code with all floats and it really is like this... the problem doesn't occur with a double for the result of bc * ac (but bc and ac can stay floats) double bcXac = bc * ac; this gives the correct value. But although it works now I'm not really happy with it! Could someone explain this behaviour, please! And does this mean that I have to use double precision in all my collision routines?
  8. [quote name='Mussi' timestamp='1318673695' post='4872779'] You could try putting the outcome of bc * ac - cc * ab into a variable and check what value you get in the debug environment. [/quote] Thanks for that bc * ac - cc * ab is exactly 0.0 when I put it into a variable. bc * ac and cc * ab were something written in scientific notation but I can't remember if very small or very big (the problem is quite difficult to reproduce because it occurs so rarely). I have no clue what the problem could be... I mean bc and ac were normal values around 10000.0 or something....
  9. Hi I've experienced a very strange case, in which an if condition turns out to be true although it should absolutely not! The function tests if a point is inside a triangle and it works 99.99% of the time... I can also give you the values of A, B, C and Point. The point is absolutely not inside the triangle and if you reproduce it (call the functions with the same arguments) it usually works correctly... Should i use doubles for such a function? But it doesn't seem to have anything to do with floating point precision....? Below are two images of the debugging (note the yellow arrow!) [img][/img]
  10. Port mapping (with upnp)

    [quote name='hplus0603' timestamp='1314590907' post='4854944'] What you need is a good primer on how the Internet Protocol suite works. How does IP work, how does UDP work, how does TCP work, and how are hosts and services addressed on the Internet, and how does routing work. Without that understanding, it's unlikely that your network code will be robust enough to work on a larger scale. If you don't want to bother with studying right now, then I suggest you simply manually configure your router's port forwarding or DMZ for now, to make it work for your current case. [/quote] I totally agree with that but for the moment I just want this uPnP to get working and when the moment comes that I need to implement NAT punchrough and make everything more robust I will look into all this network stuff. I only need the uPnP for testing but to explain all the people that are testing it for me how to forward a port manually is even more a waste of time than getting the uPnP to work correctly. So for the server can I just use the same port, than give the testers my external ip and they connect to my computer with the port and ip. The problem is it sometimes works and sometimes not but the things that happen are so strange (like getting packages back and somethings) that I can't really explain the problems. But they neither occur on the localhost nor when accessing a pc that isn't behind nat...
  11. Port mapping (with upnp)

    Thanks for the answer! So I could use a different internal port but I it's not really necessary I mean it also works with the same port right? [quote name='hplus0603' timestamp='1314567832' post='4854832'] Second, yes, the server needs to listen to the port that you told the router to forward to (not from). [/quote] I don't really understand that could you explain this? I know that UPnP isn't really good but for a start I thought it would be enough and a bit easier then having to host a nat punchthrough server. But if you do have good nat punchthrough tutorials that would be great. I only know this one but it hasn't helped me much [url=""]NatTraversalArchitecture[/url]
  12. Hello I'm trying to forward a port with miniupnp but it doesn't work as I want it to. What I do is: the one that hosts the session opens a port with a couple of miniupnp functions but the interesting one is the following UPNP_AddPortMapping( Urls.controlURL, Data.first.servicetype, Port, Port, LanAddr, "desc", "UDP", 0, 0 ); Now as you can see I use the same port for external and internal port but I don't know why there are 2...? After that I create the server (with RakNet), with again the same Port. Is this correct so far?? No for the client: Does the client only have to connect (with RakNet) with the external ip of the server and again the same port? Or does he also need to open a port or something? Am I doing something completely wrong?? Some documentation would also be nice to have
  13. Third person cross-hair

    Ok so I will stay with the ray test. But now I found another problem: When I cast a ray from the near clipping plane to the far clipping plane it can also occur that the intersection occurs behind the player so the bullet goes backwards. How can I solve this? Can I somehow find out the depth (z) value of where the player is so I don't cast from z=0 to z=1 but from like z = 0.5 to z=1..?? Thanks for the answers
  14. Hello I'm working on a third person (kind of) shooter and until now I've made the targeting with the cross-hair with a ray test. This works well for the map, but not so well for the enemies because for the map I do a correct triangle test, but for the enemies only a ray ellipsoid test (a triangle test would be far too slow). Now I thought it would be much simpler and faster to just get the z-buffer data. Is there a problem with that? I only need the z-buffer data of one pixel (the one in the centre where the cross-hair is). How can this be done best with DirectX9? Making the z-Buffer lockable is probably not the best idea as I also need the stencil buffer..? Could I maybe do it with a pixel shader? Or is it just no good idea?
  15. How to distribute game info

    Thanks for your replies. I have now made a php program that creates a list of all the servers so you can call or something like that... The php program appends this new server to a file (say List.txt) Now I have another question: How can you do such a http request ( from your C++ program? Is there the possibility to do it with raknet (so I don't have to get another library)? And if yes, how? Or how do I have to google for it? And what is the best way to get the List (List.txt) from the internet to the C++ program? Just download the file and open it from the program?