Flint Particle System Forum - flint vs pv3d (weapons, stars, collisions) 2010-12-25T19:40:21+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher flint vs pv3d (weapons, stars, collisions) http://flintparticles.org/forum/comments.php?DiscussionID=149&Focus=592#Comment_592 2008-12-30T11:45:09+00:00 2010-12-25T19:40:21+00:00 kirbysayshi http://flintparticles.org/forum/account.php?u=130 Hello! I am creating a game in the vein of x-wing/freespace/wing commander, with a little BSG thrown in for good measure. The basic flight mechanics are done, and I'm now moving on to weapons. A ...
I am creating a game in the vein of x-wing/freespace/wing commander, with a little BSG thrown in for good measure. The basic flight mechanics are done, and I'm now moving on to weapons. A couple performance-based questions have arisen that could be solved with flint, but I am unsure due to inexperience.

Question 1:

Right now, I'm using papervision 3d to generate the starfield dynamically, so that a good number of stars can be shown wizzing by your cockpit while in motion. Given that the playing area has to be large enough for a dogfight, I'm generating a particle field (pv3d particle field) 8000 x 8000 x 100depth, with 100 stars, 8000 units in front of your ship, for every 1000 units traveled. So every 1000 units, a new starfield "pops in" mostly unnoticed, and then stays in the scene until a certain limit whereupon old ones are deleted. You move at a top speed of around 100 units per frame. Right now, on my slightly-better-than-average desktop, I get about 55 fps. My work dell laptop gets about 30. You can also swivel your ship around while moving in a fixed direction ( moving forward while looking backward), so it's integral that the starts are not deleted the second they're off screen. This all works fine right now.

My first question: could Flint do this using less resources? If I disable my starfield system, I get about 60 fps. Since I'm trying to squeeze all the power I can out of flash, I'm looking to see if Flint can do this more efficiently.

Question 2:

Weapons. I want to have two styles of weapons, a blaster-type (star wars) and a machine-gun type (battlestar). These each require the rapid generation of projectiles; max of 20 per second. Using just papervision cylinders, having only 15 projectiles at any given time on the screen cuts my framerate down to 24 on my desktop (a little more than in half), which is unacceptable right now.

I know that Flint can generate the particles I want, but is it possible to detect collisions between a Flint particle and a PV3D object? Please forgive my ignorance, as wanted to see if it was even possible before I invested a lot of time into Flint.

I read a few threads detailing collisions between bitmaps and movie clips, but they seemed a little old. Thus, I figured I'd see what's up.

Thanks for any help anyone can give!]]>
flint vs pv3d (weapons, stars, collisions) http://flintparticles.org/forum/comments.php?DiscussionID=149&Focus=601#Comment_601 2009-01-07T08:43:41+00:00 2010-12-25T19:40:21+00:00 Richard http://flintparticles.org/forum/account.php?u=1 Re Q1: Flint would use a PV3D particle field to render the particles, so it will likely be a similar speed. However, if you don't need your particles to have size, but just want them to move, you ...
Re Q2: Currently Flint only detects collisions between particles. A future version will have actions to detect collisions with other objects, but not yet. However, Flint is designed to be easy to extend, so you may be able to add the specific functionality that you want without much effort.]]>
flint vs pv3d (weapons, stars, collisions) http://flintparticles.org/forum/comments.php?DiscussionID=149&Focus=614#Comment_614 2009-01-12T02:09:52+00:00 2010-12-25T19:40:21+00:00 kirbysayshi http://flintparticles.org/forum/account.php?u=130 Thanks for the reply Richard! Q1: I'm unfamiliar with the Pixels object, but after seeing the example here: http://www.iamseeker.com/?p=72, I'm excited. Can you "fly through" the pixels, ...
Q1: I'm unfamiliar with the Pixels object, but after seeing the example here: http://www.iamseeker.com/?p=72, I'm excited. Can you "fly through" the pixels, is it a true 3d object, or is it just a flat bitmap in 3d space?

Q2: Would this be something like looping through an array of the particles to check if their xyz coords were within another pv3d object? That sounds very processor intensive...]]>
flint vs pv3d (weapons, stars, collisions) http://flintparticles.org/forum/comments.php?DiscussionID=149&Focus=617#Comment_617 2009-01-12T13:57:27+00:00 2010-12-25T19:40:21+00:00 Richard http://flintparticles.org/forum/account.php?u=1 Q1: I'm not familiar enough with how PV3D displays them to answer this - the best way to know is probably to do a simple test to find out. Q2: Yes, although approximating the PV3D object to a ...
Q2: Yes, although approximating the PV3D object to a simpler shape will make it a lot more efficient.]]>