I have a laser in a game I'm making that is the length of the screen, and aims in 360 degrees. It runs smoothly until I try to test for collisions. I tried box collisions, but the collision box doesn't rotate with the laser, and results in incorrect collisions. Any thoughts?
You want to make like "Laser Pointer" for a gun or something like that?
Develop games in your browser. Powerful, performant & highly capable.
Close enough (it acts similarly), but it needs to shoot stuff. The game runs smoothly until an enemy comes within the bounding box of the laser and construct starts testing per-pixel collisions.
Ok i get it, Here's an example of the laser killer stuff
Laser and Targets have Collision per pixel.
That's what I tried - I miscommunicated, sorry. What I mean is how can I do it without dropping the frame rate? You example seems to run smoothly, but in the game I'm working on, at 800x600 and with a larger laser, doing that causes the framerate to go from 120fps to about 10.
How big the laser is from beggining? if its small? mine is 32x32 then i stretch it.
The graphic itself is about 300x100, and it's stretched to the length of the screen. Construct has no problem displaying it at all, it's the collisions that cause the frame rate to be at 10fps, because when there are no enemies on screen it runs smooth as silk.
Doppels example ran fine on a laptop with no real video card at 800 x 600.
Is it still slow if you build an exe, close Construct and run that?
Hmmm i can't figure it out —@. Maybe post screenshot or better a .cap itself.
Same framerate issues with an exported .exe. I'll make a .cap.
http://www.fileshack.us/get_file.php?id ... merate.cap
Sorry it doesnt lag on my computer even if i duplicate 20 enemies.
Well, that's good news, I guess. What's your cpu speed? I guess it's because my computer's got a P3 600...
Umm im a bit quicker i have Pentium D 2,67 GHz, well maybe you should set fixed framerates?
Setting a fixed frame rate certainly won't help the issue. Well at least I know it'll run smoothly on faster machines. Thanks anyway!