Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - The 11th plague of Egypt

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »
Com'on, I'm doing this for the community and I'll release the code as open source. The dll could have a MIT license, if you don't like GPL.

Well, I now have a complete C++ CodeBlocks project, and I need to make a dll out of it, so I can use it with Game Maker too.

Anybody knows how to make a Game Maker dlls? Is that any different from making a dll for another program?

The GMC dll topic sucks. It's full of C++ tutorials, and i can't find any useful information.

I hired a C++ coder to make the functions I needed, we are testing it out now. Probably it's easier (and better) to make a .dll out of it instead of converting the code to GML.

Anybody wants to help?

Announcements / Re: Proceedings
« on: October 02, 2010, 06:15:05 am »
the Red Hat team chose to write the exception off of which ENIGMA's is based
Ok, this makes me feel a little more secure.

Announcements / Re: Proceedings
« on: October 01, 2010, 07:04:48 am »
Full License Text
You should have received a copy of the GNU General Public License along with this program; if not, see <>.
You should really specify it is GPLv3 you are talking about, and link to

Announcements / Re: Proceedings
« on: October 01, 2010, 05:10:09 am »
Couldn't we hire a lawyer, or ask the Software Freedom Law Center for free help?

GLPv2 was easy to understand, but GPLv3, the one you are using, is full of legalese. It may even contain something that prohibits this kind of exception

At best we could just copy the classpath exception of GCC. Netbeans is double-licensed CDDL and GPLv3 and has similar exceptions.

Thank you. My vectors have 3 dimensions, I build them from the segments.

Your formula is correct, I found a similar one here

However, I can't get the code to work. No errors, it just returns nonsense. I think I translated the code correctly...

example here

News. I converted a 3d C++ function to find the distance between 2 segments into a GML script. Here's an example, this thing can recognized intersections too!

I'm now trying to convert another function from the same site, but i got stuck because of a vectorial cross product.

If I have 2 vectors, u(u_x1,u_y1,u_z1,u_x2,u_y2,u_z2) and v(v_x1,v_y1,v_z1,v_x2,v_y2,v_z2), how do I calculate the vector w = u x v ?

w must perpendicular to both u and w, that's all I know

The only script I really need is one that returns the distance of a segment from triangle, in 3d. If there is an intersection, I need it to return 0.

The other script, the one that returns the z of a x-y point inside the triangle is also necessary, but should be much easier to retrieve.

I would like it to work with GM too, but so far I have found nothing useful, be it C++ or GML.

If somebody can solve my problem I can buy him/her a Steam game. I'm tired of waiting, I'll have to learn C++ later this year at my university, but right now I want to finish this.

EDIT: maybe I got a chance. Here is a simple code that can account for ray/segment collisions with a triangle. If there is no intersection, then I suppose that the segment-triangle distance is the smallest distance between the segment the 3 sides of the triangle. On the same site, I also found some code that can do that.

I think I can convert this script by myself. There are custom types defined in order to use custom operations, but there's hope.
But I still another script to calculate the distance between 2 segments, and I can't find any straightforward code.

Thank you for the extensive answer. Somebody probably tryed too hard to "be smart" with that cryptic coding. What a pity.
I found the new distance functions from Wild Magic 5, maybe these work properly, although I doubt it.

segment to segment .cpp and .h
segment to triangle .cpp and .h
segment to triangle .cpp and .h

Do you know of a place where I could find similar scripts? I am no matematician.

btw is there some way I could get you to convert this to gml so that it compiles? :)

Thanks for trying, that's some complex C++ indeed. I know some of it, but objects and classes are out of my reach.

btw is Josh still around?

I've been making some projects. I found a site full of useful C++ code. Now I need to convert this C++ code to GML.

Here's the code for a segment-triangle distance script. .cpp and .h <- more important

Here's the code for a rectangle-triangle distance script. .cpp and .h

If somebody needs a prize in order to help me, we can talk about that.

Sigh, no time to do that. I'm already trying to port this in a 3d environment.

I need 2 script (pure gml please):
- one to measure the distance of a segment from a given triangle in 3d (needed to know if a bullet pierced the floor) <- more difficult
- one to find the z value of a triangle point given its x and y (needed to move units according to the height of the floor)

Ah, yes. Waypoint pathfinding. Valve's solution to bots :P.
Units can go outside of the waypoints connections as long as they don't cross walls.
It has some similarities to a navgraph.

I'll post this on the GMC when I'll get some input from this community. I posted on the U3D forum too.

So, any suggestions?

No BBox nor pixels, your units are treated as circles by the collision system so that they can and turn in place when needed, like in most RTS games,
but, unlike in most RTS, units will never overlap.
However, this may not be good for a car race game because of the simplified physics.

I'm Italian, btw, sorry for the accent.

Tips, Tutorials, Examples / Chesee finder - pathfinding and collision engine
« on: September 18, 2010, 09:50:19 am »
I guess you need something simple yet effective. I think I've got a solid solution to your problems,
wheter you are coding top-down shooters, RPG or a RTS games, this engine can help you moving
your units fast and reliably.

Doesn't matter how big your maps are, or how big your armies are, this thing is designed to SCALE
for all your needs. I've tested labyrinthic maps full of bottlenecks and get it to work smoothly.

I won't lie to you, this thing is pretty advanced, but I've worked to make it as easy to use, but with
a radical design in mind, you are the one in control. You get to know how it works when you design
map, but you can change the most important parameters of your units without a need to understand
all the underlying math. However, if you are curious to know how it works, the code is commented.

Still i suggest you watching this video tutorial in order to get started. BTW Can't incorporate vieo in post?


Here is a partial list of features:

- quick and simple BFS algorithm
- incorporated smoothing
- GM-functions free (no mp_grids)
- full GML, no dlls

Path following
- units can avoid each other without smashing into walls
- can handle queues and bottlenecks
- customizable steering options

Collision engine:
- doesn't use sprites (will be easy to port on Enigma)
- can handle really fast units
- "collision_line_width" like functions
- "collision_line_first" like functions can be implemented
- splits the maps into cells to cut down pointless checks

- easy to use
- lets you build your own paths
- eliminates the need of having dozens of wall objects

- supports units of various sizes
- GM save and load won't work, use the custom replacement

To do:
- 3d support, can be achieved through layers
- more tutorials, on demand

- units will never give up seeking their way until they can see their destination, can be changed on demand
- if the destination point is too close to a wall, units won't even try to get there, no quick fix

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »