[Disc/Ideas] Isometric Sidescroller
Right now I'm working on something I've never seen implemented before in Flash, an isometric sidescroller, sort of like the old arcade games. Sorta like Teenage Mutant Ninja Turtles on NES. Anyways.
I'm looking for ways to do hit detection. I have some ideas right now, but I would like to hear some of your ideas about it too. I can't really do tiles, since it would make it very difficult and impractical. Plain old hitTesting won't work either, since then you could be at the bottom of the screen, jump, and attack and you could hit a guy in the middle. Right now I'm shooting for a bounding box 3d system. I'd like to hear some input and ideas on it.
Link: http://qdervish.netfirms.com/iso_scroller.html
Ideas!
Derek
P.S. Please excuse the graphics, as they're all hand-drawn with the mouse, and we all know that sucks.
tonypa posted in my thread...
Hi.
I'm not opposed to tiles at all, its just I don't really think they would mesh with the ideas I have in mind. Since it's in semi-3d, tiles don't really show all that needs to be hit-tested. Elevation, for example. Maybe you could add an elevation property to the tile? And I know for sure I don't want to have it rendered tile-wise, as that would be too restrictive.
But, the methods I use to display objects isometrically, and do depth sorting, are very conducive to hit testing a rectangle. Since I keep track of all x, y, and z values, its really quite simple to add the character's width and depth to calculate max and min, width and depth. Make sense?
In fact, the more I think about this, relatively to a super-imposed tile based system, the more sense it makes. It seems like, using some of the code modified from your tutorials, I could pull off some of the hit detection much easier than I thought. Even some of the rendering *could* be done like that.
But still, there's the object to object testing. I'm not sure how I'd go about that. Which was really my main issue the whole time... The only way I can wrap my mind around doing that is SOME sort of bounding box system. That's basically how tile-based systems work (I think). Get the corners, check if the point is within them. Just add another dimension.
Just me thinking here.
Derek