.
Did all previous browser flash SWF games use Box2D?
.
May I ask how previous flash games implemented collision detection?
.
Is it directly using the hitTest of the display object?
.
Still using Box2d
Such a physics engine?
.
I just want to know how collision detection was implemented in previous flash games?
.
Both simple display object hit testing and physics engines were used to implement collision detection in Flash games. Which one was chosen depends on the type of game being made. Simple hit testing is often enough. Physics engines can require more resources, so they may be overkill if you don’t need all of their features.
Does the text box not support htmlText?
It should work. Refer to the API docs, then if you run openfl create AddingText and change the “textField.text” line to “textField.htmlText” you can experiment.
For creation of banners that used physics, ie ballons on a string then released.. I remember taking box2d and stripping out everything to just what was needed to hit the size restrictions. But you can do similar. I think with games it all depends, you can implement your own solution or use an engine, or the bones of an engine. Made a mini game where you kick a football and see how far it goes so IK type person that kicks like a football. This was in france, initially I used physaxe but they wanted it from scratch. For a mini game of Zorro ( linked to film) I used basic custom physics as needed bare minimum. You can build it up with basic newton physics.
I believe Joshua has ported Bit101 book on making it move this may hold some idea.
so look at Kinematic equations, and look at things like hitTesting a circle, a square, a triangle, color hitTest.
Friend, we’re talking about starling!
“Did all previous browser flash SWF games use Box2D?”
No.
“May I ask how previous flash games implemented collision detection?”
By using hittest algos, either custom ones or via physics engines, quad trees and such
“Is it directly using the hitTest of the display object?”
I guess some did that, too
“Still using Box2d” No I don’t, but you could.
“Such a physics engine?” It all depends on what kind of collision detection you want, if it’s just about a dozen of rectangular or circular objects overlapping each others with a basic function call on contact (kill(), explode(), etc…) like that for instance https://www.youtube.com/watch?v=PpeIUGnOH3o you don’t even need a physics engine, at all, not even a quad tree, just go for a loop with hittest over rectangles or simply calculate distance between objects and trigger the hit function when distance is inferior to a given radius, even on a Z80 processor it’s going to be just fine
What do want to do ?
