HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.96k stars 432 forks source link

Decouple collision system from FlxObject #1078

Open Beeblerox opened 10 years ago

Beeblerox commented 10 years ago

Maybe like in Phaser, where you can have different collision systems (classin flixel collision system, "ninja" physics and advanced physics using some third-part engine)

Beeblerox commented 10 years ago

plus, we could port "ninja" physics system from Phaser, which have better support for sloped tiles

Gama11 commented 10 years ago

I'm not sure sloped tiles are a big issue. Support for shapes other than rectangles would be much more important (polygons ideally).

Tiago-Ling commented 10 years ago

I suppose this decoupling could be the first step towards having more than one possibility of collision system in the framework. Ideally we could have both an AABB traditional implementation (maybe something like in Phaser) and a polygonal implementation (using Nape). Tilemaps would benefit a lot from a polygonal collision system

impaler commented 10 years ago

This would be a great structural change. There is also hxcollision on haxelib.