Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411511 Posts in 69375 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 12:11:27 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Metanet's N/N+/N++?/Ninja? collision code in AS3
Pages: [1]
Print
Author Topic: Metanet's N/N+/N++?/Ninja? collision code in AS3  (Read 1586 times)
sonder
Guest
« on: May 12, 2016, 08:20:47 AM »

I've been googling and googling, and can't locate the port that apparently they did of their "ninja physics" code from AS1 to AS3.  Does anyone know where it is?
« Last Edit: May 18, 2016, 06:43:35 PM by kidfingers » Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #1 on: May 12, 2016, 09:19:41 AM »

here you go

http://www.metanetsoftware.com/technique/tutorialA.html
Logged

raigan
Level 5
*****


View Profile
« Reply #2 on: May 13, 2016, 09:59:46 AM »

Unfortunately the tutorials are all AS1; we never ported that code because we ended up finding a better, simpler approach (and also, the AS1 code is optimized in ways that are useless now).

The ideas in the tutorial still work, there are just better/easier ways to approach it rather than having each tile be a convex shape.

For N v2.0, what we do is generate the line- and circle-segments that are on the surface of the world, then we add that geometry to a grid and use distance-to and ray-intersect queries to collide against it.

We haven't released the source yet, although we gave it to someone for haxeflixel so it should be on a github somewhere (sorry, I can't find the link!). It's pretty straightforward except for generating the geometry on the surface of the tiles, that's a bit tricky... and I suspect there are easier ways to do it than our approach.
Logged
raigan
Level 5
*****


View Profile
« Reply #3 on: May 15, 2016, 05:28:03 AM »

Here's a link to source from N v2.0, showing the new way of doing things (loose linesegs/circlesegs in a grid): https://github.com/HaxeFlixel/flixel/issues/1808#issuecomment-213016493
Logged
voidSkipper
Level 2
**


View Profile
« Reply #4 on: May 15, 2016, 08:25:08 PM »

Unfortunately the tutorials are all AS1; we never ported that code because we ended up finding a better, simpler approach (and also, the AS1 code is optimized in ways that are useless now).

The ideas in the tutorial still work, there are just better/easier ways to approach it rather than having each tile be a convex shape.

For N v2.0, what we do is generate the line- and circle-segments that are on the surface of the world, then we add that geometry to a grid and use distance-to and ray-intersect queries to collide against it.

We haven't released the source yet, although we gave it to someone for haxeflixel so it should be on a github somewhere (sorry, I can't find the link!). It's pretty straightforward except for generating the geometry on the surface of the tiles, that's a bit tricky... and I suspect there are easier ways to do it than our approach.

Can I just fanboy a little bit and say N was pretty much the reason I almost had to repeat 11th grade, and the Metanet tutorials on collision detection played a huge part in my development as a programmer.  Kiss
Logged
raigan
Level 5
*****


View Profile
« Reply #5 on: May 16, 2016, 12:04:11 PM »

Can I just fanboy a little bit and say N was pretty much the reason I almost had to repeat 11th grade, and the Metanet tutorials on collision detection played a huge part in my development as a programmer.  Kiss

Thank you so much! Smiley
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic