Game Slowing Down - Looking For Help

I've been working on sports game with Gamesalad for over two years now.

It's top-down Australian Rules football inspired game, for those who don't know what the sport is (it's not rugby), see the link below:

The point is, it is a very complex game that I am making and the reason I have taken so long to make this game is I have been tinkering with, changing and developing some AI that I am pretty bloody proud of. I have developed controls from scratch that are as good as a simplified 2D FIFA game.

Throughout the development period I have made a lot of changes as I have learned more and more to improve the game's performance while hopefully keeping it realistic and fun. Normal Australian Rules football games have 18 players per team which means 36 in total on the ground at one time so I have been able to simplify things there by only having 9 players per team, yay!

Two days ago I finally reached a point where all the finalised AI was completed for all the actors in the game. This was a huge milestone for me and initial testing shows the game can run smoothly around 60 FPS for most of the time, however I am finding that as the game goes on it starts to slow down considerably. All testing is being done on an iPhone 6, ad hoc and through the viewer app.

Basically, I am looking for some guidance as to how I can improve the performance, most of the above information was probably irrelevant but I've been so stressed about this lately that it felt great to just write that all down!

Here's some key points to note:

  • There is artwork in the game as yet so image size is not an issue for slowness
  • There are currently two timers in the game that unfortunately are unavoidable and vital, most timed events do not use timers but instead the device's built in time
  • Each actor has five or so constrain attributes that are unavoidable
  • I have a lot of game attributes (mostly boolean), I have read that this could be an issue?
  • Ashamedly, I have not used tables (when I started the game, tables were just new and I didn't know how to use them), I'm guessing this could be a contributing factor?
  • I have had to use the "move" function to move the actors as part of the AI, however at most only five or so actors would be moving at once and that is rare
  • Could it just be a case that having 18 actors in a game at once, all with their own AI is simply too much?

I realise I am being pretty vague here, but if anyone has any general advice that would be much appreciated. I have read a lot of optimization posts and tips but in case if there is anything that anyone can add that would be much appreciated.

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Most of the things you mentioned really don't help performance. Those are old wives tales that have floated around too long on the forums. Real performance comes from slim and precise code. The culprit is more likely the pure amount of code. Find ways to simplify the processes.

  • vikingviking Member, PRO Posts: 322

    Five constraints per actor sounds heavy though. I found that removing constraints had a huge positive effect on my frame rate.

Sign In or Register to comment.