Jump to content
• Advertisement

elis-cool

Member

1581

271 Neutral

• Rank
Contributor
1. Two polygons, finding point of collision

Quote:Original post by oliii you can just transpose the SAT with linear velocities. If you project the velocities on the separation axes, that will give you the time of impact. You need to be careful about the time intervals. clicky. Wow, very awesome examples and tutorial! this would have saved me days of work, haha! is it published anywhere? i'm sure there would be a ton of people who would find it useful.
2. Two polygons, finding point of collision

Hey guys, Im using Seperating Axis Theorem (SAT) to detect if two polygons intersect, which works great.. but now I need to find the point where they collide. How would I go about doing this? the two polygons are moving at their own individual velocities vx,vy. Obviously where they intersect there is going to be a patch of intersection, so ideally id like to be able to shift the objects back in "time" along their velocity vectors to the point where they collide, and use the first vertex to intersect with an edge of the other polygon as the point of intersection. The SAT provides a way of finding a minimumTranslationVector which can be used to shift the objects back enough so that they dont touch, but along the side which has the minimum overlap, but this doesnt take into account the objects velocities, thus yeilds an innaccurate result in determining a point of first intersection. Here is an image I threw together quickly to clarify: The blue poly has collided with the larger one, and the green poly would be the blue one shifted back along its velocity vector to the point where it first intersects. I had the idea of taking each vertex in both of the polygons and calculating a line segment between the current point=(x,y) and the old point (at time when not intersecting)=(x-vx, y-vy) for each polygon, where vx and vy is the relative velocity between the two objects (ie. polyA.vx-polyB.vx, etc) and testing that line segment against each edge of the other polygon. Not sure if im on the right track or not (espeically with the [relative]velocities), or if there is a better/standard way? Any help would be appreicated. Thanks.
3. What ever happened to hybrid hard drives?

Weren't hybrid hard drives (you know normal hard disk, but with 1GB etc of flash onboard also) supposed to be out like..last year or more ago? I was looking forward to my instant bootup times for my desktop :( (also: completely solid state drives dont count here)
4. Mastery or Variety?

I thought this was going to be some deep and insightful discussion on life, better to be a master of one or two arts/skills, or to study a large variety of things. I am somewhat disappointed..
5. Painting my new desk

mmn.. well I really need to do *something*, because otherwise this is going to stain when I spill anything on it, and it really wont like water. Will paint by itself be fine ie. not going to get scratched up too bad?
6. Painting my new desk

So I was bored yesterday and decided I needed a bigger desk... so I designed up a little something something, went to the hardware store and bought the MDF to build it (sorry no cam for pics :[), and it turned out pretty well. But now I want to paint it, and I dont know ANYTHING about painting an MDF desk.. and google wasnt very friendly.. so does anyone have any experiance with this? from what I understand I need to get a primer, then do 2 top coats of paint.. and im guessing using a roller is the only way its going to turn out any good? and do I need to apply anything to the top.. like polyurethane? Thanks.
7. Fun things to do

Quote:Original post by Charles Hwang My friends and I are supre bored and looking for things to do. What do you ugys suggest? Seriously. Spelling lessons.
8. Flipcode No more, Can we have a gamedev image of the day?

Image of the day! I loved it! gdnet should DEFINATELY add it.
9. The best designed/cleanest open source software

Quote:Original post by nes8bit your love for open source makes me sad Hey hey now, I never said I love it ;) but it's the only source for major projects people can get their hands on to to look through.
10. The best designed/cleanest open source software

So what do you think it is? and not just in code, the architecture as well. I've looked through quite a few, and I just have to say I LOVE the Mozilla/Firefox source, I was a little hesitent about COM at first, but their implementation of XPCOM is very nice. The whole message system, XUL and javascript integration make it excellent. I managed to borrow quite a few ideas from them :) Other software I had a look at such as FileZilla, Miranda and a few others were just absolutely horrible. So what open source software have you found that has excellent design, and why?
11. Ars talks to Scorched Earth developer

Aww... poor little rav didn't get any replies :( So out of pity here you go :)
12. [web] mysql is acting up...

ok, I manged to do a hack fix, but if anyone still knows how to fix it properly it would be appreciated... I just added this before the db query $title = str_replace('$', '\\\\$',$title); $heading = str_replace('$', '\\\\$',$heading); $content = str_replace('$', '\\\\$',$content); $headdata = str_replace('$', '\\\\$',$headdata);
13. [web] mysql is acting up...

Ok, so I have a webform where you enter a page's content, this is then retrieved by a php script and sent to an SQL database to be saved. And it all works until I start using '$' symbols. If I have just '$' characters in the content they are fine, but when I put a number behind them they are interpretted as a hex string. So if I have like "hello $world" then its fine, and its saved that way, but if I have "$031" it is saved as "1". And if I backslash the $then it is saved how I want it as "$031". How do I fix this? Im pretty sure it's not a php problem because if I echo the data right before sending the db query it's all correct. And reading through the mysql docs I couldnt see anything about it converting $000 numbers into hex... here is my code: if(get_magic_quotes_gpc()) define('DB_ESCAPE_CHARS', "\r\n"); else define('DB_ESCAPE_CHARS', "\r\n\\\0'\""); ... function PutPageData($name, $title,$heading, $content,$headdata) { $title = addcslashes($title, DB_ESCAPE_CHARS); $heading = addcslashes($heading, DB_ESCAPE_CHARS); $content = addcslashes($content, DB_ESCAPE_CHARS); $headdata = addcslashes($headdata, DB_ESCAPE_CHARS); db_query("UPDATE pages SET title='$title', heading='$heading', content='$content', headdata='$headdata' WHERE name='\$name'"); }
14. Flicking that voltage switch on your psu...

Quote:Original post by fractoid Heh. I did the same thing once, although not while things were actually running. I got an impressively loud bang and a bright flash, followed by worrying silence. New power supply time, all the other components survived OK. All I can say in my defence is that I'd been told that there were two switches and it was 'tricky' to switch this macine on, and that in poor light, upside down, 110 looks a lot like ON. [sad] Loofles. In other news, I managed to take the harddrive out, hook it up to my machine and salvage most of their documents :O Yay for looking through other peoples stuff ;)
15. Flicking that voltage switch on your psu...

Quote:Original post by Raduprv Did any smoke come of it? Do the fans still spin? Nope, plug it in, hit the power button, and nothing, its just dead
• 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!