Hello community!
Since I have experienced some lag with my project, I have been going trough it all over and over rewriting and reorganizing behaviors. I must say that I am quite surprised by the the importance of writing efficient and organized behaviors. By doing that I have almost doubled the number of enemies my game can compute smoothly!
Special shout out to Timers Are For Chumps!!
(http://forums.gamesalad.com/discussion/44707/timers-are-for-chumps-gs-optimization-tips)
and Ian
http://www.gamingdebugged.com/2013/01/15/31-gamesalad-optimization-tips/
Here are a couple of questions I am asking myself
1. Say my Enemy actor has a random Integer EnemyType
IF EnemyType=1 changeimage to img1
IF EnemyType=2 changeimage to img2
IF EnemyType=3 changeimage to img3
IF EnemyType=4 changeimage to img4
Would it be more efficient to write it like this:
IF EnemyType=1 changeimage to img1
ELSE
----IF EnemyType=2 changeimage to img2
----ELSE
--------IF EnemyType=3 changeimage to img3
--------ELSE
-------------IF EnemyType=4 changeimage to img4
2. is there an easy way to go trough a large set of data in a single frame?
hyper loops are fine but a bit of a hassle
In C# this is done easily with For loops ex:
foreach (DataColumn col in rightsTable.Columns)
{
---foreach (DataRow row in rightsTable.Rows)
---{
------//output
---}
}
3.Do you have any Key concept that makes you game run smooth?
4What do you think of my project? All feed back is appreciated
http://arcade.gamesalad.com/games/135351
http://arcade.gamesalad.com/games/131986
(I update on both to keep a backup version)
5 is there any way to use spaces to make sense of the code i wrote in this post?