Gold Spawn Optimization Problem

hello

I make endless running game.
While gold spawn, live fps drop.
or shape of an article, I would spawn at a time.
for example, will create a z-shaped gold.
Will consist of 20-under.
I would spawn all at once.
While at 60 fps, dropping to 35.
gold, to create what the best algorithm?

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited September 2013
    How are you doing it at the moment? An actor that spawns 20 coins with 20 spawn actor behaviors attached to it? Or an actor with a timer that runs at 0 seconds with a counter, a rule that stops after 20, and one spawn actor behavior that uses an algorithm to place the spawned actor accordingly, based on the counter number?

    I don't think I can help but you got me wondering what would be the best way myself now, and the best way to do other letters and even shapes
  • Nexo55Nexo55 Member Posts: 48
    Build 20 units more than the bottom.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    I don't know what you mean in your last post, but I mucked about with it yesterday by having 1 actor called "C" that spawns about 14 coin actors in the formation of a C, that all scrolled at a speed of about 180 in one direction (C was easier to build then a Z). It wasn't really laggy until I spammed the screen with them. I spawned the letter C everytime I pressed the C key.

    I had 14 or 15 spawn actor behaviours on the C actor each with a particular x and y position as I found getting it to layout in correct formation with a loop a little messy.

    I couldn't think of a smarter/sensible way with less code.
Sign In or Register to comment.