Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411488 Posts in 69377 Topics- by 58433 Members - Latest Member: Bohdan_Zoshchenko

April 29, 2024, 03:45:04 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Can flash handle many objects - like 100 bullets?
Pages: [1]
Print
Author Topic: Can flash handle many objects - like 100 bullets?  (Read 2483 times)
MekanikDestructiwKommando
Level 3
***


Let's ROCK!


View Profile
« on: August 25, 2008, 05:03:14 PM »

Do bullet hells work in Flash? Would 100 or 200 bullets make most computers in the world grind to a halt?
Logged

Quote
There have always been interactive experiences that go beyond entertainment.  For example, if mafia games are too fun for you, then you can always join the mafia.
muku
Level 10
*****


View Profile
« Reply #1 on: August 25, 2008, 05:17:57 PM »

I think this should answer your question quite comprehensively:

http://www.8bitrocket.com/newsdisplay.aspx?newspage=7496
Logged
december
Level 1
*



View Profile
« Reply #2 on: August 25, 2008, 05:25:40 PM »

I think this should answer your question quite comprehensively:

http://www.8bitrocket.com/newsdisplay.aspx?newspage=7496
yes but how does it handle collision detection with that many objects?
Logged

Signature:
Signatures are displayed at the bottom of each post or personal message. BBC code and smileys may be used in your signature.
MekanikDestructiwKommando
Level 3
***


Let's ROCK!


View Profile
« Reply #3 on: August 25, 2008, 05:43:24 PM »

I think this should answer your question quite comprehensively:

http://www.8bitrocket.com/newsdisplay.aspx?newspage=7496
yes but how does it handle collision detection with that many objects?

Yes, exactly -- don't you have to check each unit of the bullet array with the ship array (in a SHMUP example)? Some flash games seem to go slowly, and they have much fewer objects on screen, but many run just fine fast.
Logged

Quote
There have always been interactive experiences that go beyond entertainment.  For example, if mafia games are too fun for you, then you can always join the mafia.
muku
Level 10
*****


View Profile
« Reply #4 on: August 25, 2008, 05:48:30 PM »

Here's my purely theoretical opinion, without having tried it:

If you try to collide those 100 objects against each other, that's an N^2 operation, so that would get pretty hairy. There are data structures available to alleviate that, but the brute-force approach would probably slow framerate to a crawl.

Then again, for a bullet hell shmup, as far as I know you'd only collide those 100 bullets against very few ships (perhaps even only the player ship). Then it's a linear operation, and seeing as rendering them is linear too and Flash handles that just fine, I'd say you shouldn't have a problem.
Logged
ninjascience
Level 0
***



View Profile
« Reply #5 on: August 25, 2008, 09:19:25 PM »

http://lab.polygonal.de/2007/09/09/quadtree-demonstration/

Logged
Cagey
Level 1
*



View Profile WWW
« Reply #6 on: August 25, 2008, 09:36:54 PM »

Yeah if you want to do lots of collisions use Box2DFlash, or if you want lots of graphical non-colliding particles use flint.

There are a couple more flash physics engines around, but Box2D is the most complete at the moment.
Logged

bateleur
Level 10
*****



View Profile
« Reply #7 on: August 26, 2008, 12:39:00 AM »

Yeah if you want to do lots of collisions use Box2DFlash

Although that's a full physics engine so would be a crazy choice for most shmups!

There are very fast ways to do collision detection in cases where you don't need to simulate the impact physics. And most shmups are even simpler because (as noted above) you're not even considering a quadratic number of possible collisions.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic