JB Advanced Collision Tutorial

Programming Tools, Tips, and Tutorials.
AndyAmaya
Posts: 35
Joined: Sun Sep 17, 2006 8:12 pm

JB Advanced Collision Tutorial

Post by AndyAmaya » Fri Aug 28, 2009 4:25 pm

It's taken a lot longer than I had anticipated, but here's a tutorial that presents no less than 12 different ways to detect different types of collisions!

Once you understand using the collision techniques, you should be able to program the following types of games:

Graphical RPG (single player only not MMORPG)
Duck Hunt game
Shooting Gallery
Hidden Object
Mirror Picture
Railroad Tycoon
Road Race
And many more!

Attached is a .zip file that has:
> The tutorial in both Word .doc format and HTML
> The source code for all of the collision functions.
> Simple example code to see how everything works
> The solution to "flaxen's dilemma" (discussed in tutorial)
> A simple triangle game that starts out easy and later becomes frantic
> A puzzle game (see Point In Polygon Function.bas)

Update: 2009.09.08
> Have added a missing example program highlighting the "Point In Polygon" function.
> Re-named R2R.bas to "Rectangle To Rectangle Collision Function.bas" as stated in tutorial.
You do not have the required permissions to view the files attached to this post.
Last edited by AndyAmaya on Thu Jul 21, 2011 2:22 pm, edited 1 time in total.

stpendl
Site Admin
Posts: 60
Joined: Wed Jan 18, 2006 10:05 pm
Location: Austria

Post by stpendl » Wed Sep 09, 2009 9:31 am

Thanks for the update :)
Stefan
The invisible Admin

AndyAmaya
Posts: 35
Joined: Sun Sep 17, 2006 8:12 pm

Another puzzle

Post by AndyAmaya » Mon Sep 14, 2009 4:54 pm

Attached is another version of the jig-saw puzzle provided in the last update.
This version is significantly harder than the last one :)
You do not have the required permissions to view the files attached to this post.

AndyAmaya
Posts: 35
Joined: Sun Sep 17, 2006 8:12 pm

New Collisions Types!

Post by AndyAmaya » Fri Jun 17, 2011 1:31 am

Here's 3 new collision types:

1) Circle To Rectangle Collisions
2) Circle To Ellipse Collisions
3) Circle to Triangle Collisions

Included are simple examples to see how things works.

In all 3 examples you move the sprite with your mouse to make the collision occur.

(NOTE: The Circle To Triangle function ONLY checks for collisions with the lines defining the triangle (including vertices), but not if the circle is entirely inside the triangle.)
You do not have the required permissions to view the files attached to this post.

AndyAmaya
Posts: 35
Joined: Sun Sep 17, 2006 8:12 pm

Re: JB Advanced Collision Tutorial

Post by AndyAmaya » Wed Nov 02, 2016 7:22 pm

The original Polygon Editor has a couple of minor mistakes, so those have been fixed, and have added a couple of minor improvements to the output data.
Updated Polygon Editor.7z
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests