Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bullet hell (Touhou) fangame  (Read 16638 times)

0 Members and 1 Guest are viewing this topic.

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
Bullet hell (Touhou) fangame
« Reply #15 on: April 06, 2010, 12:19:42 pm »
Quote from: "Sivak"
Neat.  I'm also doing a Shmup, though wanna do my own twist on things.  I'm in the process of trying to figure out a good way to get enemies to get loaded in from a file properly.  I'd like to know how you got the blue glowing effects on things.  The whole graphic side of this concerns me.


It's just a sprite with BlendMode.Add

SuperV1234

  • SFML Team
  • Full Member
  • *****
  • Posts: 190
    • View Profile
Bullet hell (Touhou) fangame
« Reply #16 on: April 09, 2010, 08:06:47 pm »
I have a performance problem. Spawning 64-128 bullets at the same time gives a big slowdown that lasts about 0.4 seconds; however after that everything is back at 60 FPS. How do I prevent this? I already "recycle" bullets (I don't create new bullets).

m00npirate

  • Newbie
  • *
  • Posts: 18
    • View Profile
Bullet hell (Touhou) fangame
« Reply #17 on: April 28, 2010, 01:33:16 am »
Have you tried spawning, say 30 bullets a frame for 4 frames? To the player that is pretty much instantaneous.

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
Bullet hell (Touhou) fangame
« Reply #18 on: April 28, 2010, 02:30:38 am »
Quote from: "SuperV1234"
I have a performance problem. Spawning 64-128 bullets at the same time gives a big slowdown that lasts about 0.4 seconds; however after that everything is back at 60 FPS. How do I prevent this? I already "recycle" bullets (I don't create new bullets).


Without seeing your code or anything, my guess is you either have a very poor performing object pool, or that you are very expensive bullet object creation (or insertion). Both acquiring a bullet object from the pool, and inserting it into the list of bullets (or however you track your bullets) should be very cheap and O(1) operations.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Bullet hell (Touhou) fangame
« Reply #19 on: April 28, 2010, 06:32:45 am »
If it's happening on the first spawn it sounds like you are creating many images instead of just using sprite copies.

Mindiell

  • Hero Member
  • *****
  • Posts: 1261
    • ICQ Messenger - 41484135
    • View Profile
Bullet hell (Touhou) fangame
« Reply #20 on: April 28, 2010, 03:48:05 pm »
And using Sprite in your bullet class is bad for memory too ;)
Mindiell
----

 

anything