Pages: 1 2 [3]
  Print  
Author Topic: Chesee finder - pathfinding and collision engine  (Read 12135 times)
Offline (Female) serprex
Reply #30 Posted on: October 10, 2010, 08:10:30 AM
Smooth ER
Developer
Joined: Apr 2008
Posts: 106

View Profile WWW
http://gmc.yoyogames.com/index.php?showtopic=90437 39dll is open source, and it shows that making a DLL isn't that hard
Logged
Offline (Male) Josh @ Dreamland
Reply #31 Posted on: October 10, 2010, 09:52:25 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
How much are you paying this guy, exactly?
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) The 11th plague of Egypt
Reply #32 Posted on: October 10, 2010, 03:54:51 PM
Member
Joined: Dec 2009
Posts: 284

View Profile
25$ to do the initial work and another 20$ to complete it and make a dll.

45$=33€ as I live In Europe I get that kind of discount...Is it too much in your opinion?

I found this topic with 3d collisions, but it's not open source.
« Last Edit: October 10, 2010, 03:57:42 PM by The 11th plague of Egypt » Logged
Offline (Male) Josh @ Dreamland
Reply #33 Posted on: October 10, 2010, 06:22:41 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
Actually, I'm surprised you hired someone for that cheap without any sort of contract. Where did you dig hum up?
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) The 11th plague of Egypt
Reply #34 Posted on: October 11, 2010, 06:01:00 AM
Member
Joined: Dec 2009
Posts: 284

View Profile
I HAVE a contract, actually, a pretty nice one :D
Quote
1) I require complete and fully-functional working program(s) in executable form as well as complete source code of all work done (so that I may modify it in the future).
2) Deliverables must be in ready-to-run condition as follows (depending on the nature of the deliverables):
2a) If there are any server-side deliverables (intended to only exist in one place in the Employer's environment) then they must be installed by the Worker in ready-to-run condition (unless specified elsewhere by the Employer).
2b) All other software (including but not limited to any desktop software or software the employer intends to distribute) must include a software installation package that will install the software in ready-to-run condition on the platform(s) specified in this project (unless specified elsewhere by the Employer).
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased.
3b) No part of the deliverable may contain any copyright restricted 3rd party components (including GPL, GNU, Copyleft, etc.) unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement.

I googled "rent a coder" and found a site that does exactly that.  It's like the ebay of outsourcing.

@serprex
I've got an answer to your doubts
Quote
"consider adjusting vectors to be float[4]" - I don't think that's reasonable for our case. Because automatic SIMD optimizations are no good usually, if you do need them, then you should probably consider writing a different version of the function that properly takes advantage of them.
"This is a little epsilon trigger happy. Better would be to check if it is exactly 0, otherwise let the processor give you the nearly zero value (Unless you're using zero as a signal value?)." - that was just to prevent a division by zero or returning an invalid value, but may be there shouldn't be any checks in the first place, let the function assume the point exists.
« Last Edit: October 11, 2010, 06:05:31 AM by The 11th plague of Egypt » Logged
Offline (Male) Josh @ Dreamland
Reply #35 Posted on: October 11, 2010, 07:31:34 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
Not to mention IEEE has no problem with division by zero.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) The 11th plague of Egypt
Reply #36 Posted on: November 02, 2010, 06:11:02 AM
Member
Joined: Dec 2009
Posts: 284

View Profile
After a lot of delays, work on the dll is almost done. I'll post a beta here very soon, I hope someone will help me testing it out.

With this kind of collision system, my AI engine will treat units as spheres, which is fast, but not as precise as someone may need.

If someone fells like bbox collisions are needed, I may consider adding them to the dll and then to the AI.

BTW Josh, do you have this kind of collisions ready somewhere in your codebase? I remember you mentioning meshes collisions.
Logged
Offline (Male) Josh @ Dreamland
Reply #37 Posted on: November 02, 2010, 09:17:38 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
I have something that checks bboxes in ENIGMA, yes. Non-rotated. It's just called collision_bbox_rext(); it's like a less accurate place_free.

Also, r9k's been working on triangle/polygon collisions. Those'll be done sometime in the not-so-distant future.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) The 11th plague of Egypt
Reply #38 Posted on: November 02, 2010, 12:39:56 PM
Member
Joined: Dec 2009
Posts: 284

View Profile
I mean 3d bboxes and I'll probably need them rotated if I'm gonna use them.

If I'll ever decide to add this kind of collision detection to the dll, is there any way you (or r9k) could find it useful?
Logged
Offline (Male) Josh @ Dreamland
Reply #39 Posted on: November 02, 2010, 12:47:35 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
r9k's triangles are rotated. As far as 3D detection goes, I don't intend to use bboxes for 3D; I'll be skipping right to polygon meshes.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) The 11th plague of Egypt
Reply #40 Posted on: November 02, 2010, 02:59:23 PM
Member
Joined: Dec 2009
Posts: 284

View Profile
Really? I thought every 3D game used bboxes. ???
Logged
Offline (Male) Josh @ Dreamland
Reply #41 Posted on: November 02, 2010, 06:02:04 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
Some things use bboxes, sure; it would be horrible to have collision tests done on every face of every landform and every character. But to treat each object as a simple box isn't always a great idea. Often a simplified mesh is used for collisions instead of just a box. The meshes are, of course, composed of triangles.

A good game, though, will use more than just meshes and boxes, anyway. Since most games are not designed to use the kind of general-purpose collision functions Game Maker offers (namely, place_free(): the number one most whored function in GM), each "object" will be treated uniquely by the controller (possibly the player). I intend to offer a number of functions for resolving primitive and mesh distances. More variety = more efficiency.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) The 11th plague of Egypt
Reply #42 Posted on: November 03, 2010, 04:25:01 AM
Member
Joined: Dec 2009
Posts: 284

View Profile
Ok, I don't need any place_free() right now, I'm just asking if you could recycle some of the code I need to write and vice-versa.
Logged
Offline (Unknown gender) The 11th plague of Egypt
Reply #43 Posted on: November 09, 2010, 04:34:36 PM
Member
Joined: Dec 2009
Posts: 284

View Profile
If anybody wants to start early testing, I attached the dll C::B C++ code to this post. Licence is GPLv3.
If you'd prefer a more permissive licence, let me know. Any feedback is appreciated, just keep in mind some minor fixes are still needed.

Now the coder I rented plans on debugging it using Visual Studio because he said it's easier to make a debugging project in it.
Quote
I was meaning to create another project for testing (inside the same solution), but I couldn't find a way to do it in CodeBlocks.

Here is a brief description of the content. There should be 2 versions of the same function, one for use in C++ code and a dumber one that's GM compatible.

1) A function that, given a 3d segment and 3d planar convex

_cpp version
- if there is an intersection, returns
-- the coordinates of the intersecting points
-- distance=0
- if there isn't, returns
-- the coordinates of the closest points
-- the distance between the closest points

_gm version
- if there is an intersection, returns
-- the distance from the first point of the segment to the intersection point
- if there isn't, returns
-- the distance from the first point of the segment to the point of the segment that is closest to the convex polygon, as a negative value

2) a function that, given 2 segments

_cpp version
- if there is an intersection, returns
-- the coordinates of the intersecting points
-- distance=0

- if there isn't, returns
-- the coordinates of the closest points
-- the distance between the closest points

_gm version
- if there is an intersection, returns
-- the distance from the first point of the segment to the intersection point
- if there isn't, returns
-- the distance from the first point of the first segment to closest point of the second segment, as a negative value

3) a function that, given 2 points returns
- the distance between them

4) a function that, given a 3d point and a 3d planar convex, returns
- if the point is above the convex or part of it, the distance from the convex
- if the point is under the convex or not part of it, the distance from the convex as a negative value

5) a function that, given a 3d point and a 3d planar convex, returns

_gm version
- the x-y direction (360 degrees) to take to get away from the convex as fast as possible if you are on the point

_cpp version
- a vector pointing the direction to get away from the convex as fast as possible if you are on the point

6) a function that, given a 3d triangle and a 3d axis-aligned rectangular prism, returns
- 1, if the triangle is inside the prism or touches it or contains it
- 0, if the triangle is completely outside the prism

7) a function that, given a 3d convex and the x-y coordinates of one of its points, returns
- the the z value of that point
« Last Edit: November 10, 2010, 03:39:52 PM by The 11th plague of Egypt » Logged
Pages: 1 2 [3]
  Print