Creating a lot of attributes can be a headache, here is an aspirin to ease the pain ..
Hey ,
So while I'm updating my game Spin The Nut ..
(the update will bring 42 new levels and 4 new game mechanics)
I need to create 42 index attributes for the "stars system" and another 42 index attributes for the "scoring system" and about 20 more for managing game stuff..
Aside the fact the GS is crawling on my top of the line 2.2 GH I7 WITH 8GB OF RAM and SSD (i guess because my project has over 100 scenes in it)
Creating new attributes can be a real pain in the a** .. I'm sure most of you already familiar with the slowdown when creating a large amount of attributes ..
So , until the talented developers at GS HQ will close every memory leak or until GS will bring us a function for creating multiple attributes at once,
Here is a pill to ease your pain .
I just found out that once GS starts slowing down on creating attributes (it can take up to 20 sec to create a new game index attribute) ,
Previewing the scene , and then go back to "edit mode" will refresh the process and bring the speed back to *fast* ,
What i did to make it even easier is i made a new scene (temporary) with nothing in it to speed up the preview process .. then when i finished creating all of the new 100+ attributes i deleted it .
Im can't promise it will work but it works on my machine , i remember TSB post where he was very frustrated about this slow down thing
Back to making games now.
Roy.
So while I'm updating my game Spin The Nut ..
(the update will bring 42 new levels and 4 new game mechanics)
I need to create 42 index attributes for the "stars system" and another 42 index attributes for the "scoring system" and about 20 more for managing game stuff..
Aside the fact the GS is crawling on my top of the line 2.2 GH I7 WITH 8GB OF RAM and SSD (i guess because my project has over 100 scenes in it)
Creating new attributes can be a real pain in the a** .. I'm sure most of you already familiar with the slowdown when creating a large amount of attributes ..
So , until the talented developers at GS HQ will close every memory leak or until GS will bring us a function for creating multiple attributes at once,
Here is a pill to ease your pain .
I just found out that once GS starts slowing down on creating attributes (it can take up to 20 sec to create a new game index attribute) ,
Previewing the scene , and then go back to "edit mode" will refresh the process and bring the speed back to *fast* ,
What i did to make it even easier is i made a new scene (temporary) with nothing in it to speed up the preview process .. then when i finished creating all of the new 100+ attributes i deleted it .
Im can't promise it will work but it works on my machine , i remember TSB post where he was very frustrated about this slow down thing

Back to making games now.
Roy.
Comments
but, now with Tables we can store/reference many columns arrays …
you can make a table and label your columns/rows: 'Stars-System'; 'Scoring'; etc. …
then just call for the tableCellValue(Table,"level1","Stars-System")
Tshirtbooth's Video for using table labels
along with his storing attributes one
@P-O-M … so nice that you do all theagony of making your games … and we get a the pleasure from playing them!
@};- MH
Always a pleasure
Am i missing something? i just don't see how tables can help me here , i have 120 index attributes , and each 1 is referring to each level , so once the player finish level 1 , the "manager actor" change "game.level1 stars" to how many stars (golden nuts) you collected in that level .
So i need to store that data to the game attribute and then save , as far as i know we can't write to table , only read , so again , not sure how tables can help here ,
If I'm missing something , PLEASE let me know !!!
Thanks MH
Roy.
Thanks,
John
Make a table that has 4rows(or what ever how many nuts is in a level, remember to count 0 too)and 120 columns(or what ever how many level you have)
Have the first row set to all 1, the second2 etc
And then make an attribute called temp, index
When you collect the nut add on to the attribute
When level finish
spawn tablecellvaule(score(or your table name), temp, levelyouron)
And then reset temp to 0
Hope this helps
Calvin
assume your scenes are numbered not named … 1 through 42
gameAttribute indexType scene#
controlActor each scene:
-with an Index Attribute my# matching the scene# it is in
-changeAttribute: game.scene# To: self.my#
in a table, it is your choice to either have the levels as columns or rows
but leave one referencing its default number for level
and label the other with the attributeName
and, of course if you are using mixedValueTypes in the columns you will have to create your table in your spreadsheet.app and import as such
to access the tableCellValue(table,"scene#","star#") if you have the rows as levels and reverse the "name" if columns are levels
a good idea to have a Note behavior listing all the labels in your table as you no doubt with an Index list
but, I find that making a copy of the project and opening both … having the copy open with the Table showing
and referencing that while working … keeps me on track
ah, Roy, you know I am trying to help with no idea of exactly what you are doing! 8-|
so tell me to take an aspirin and close my mouth!
@};- MH
i started this thread as a suggestion for how to create a big number of attributes in GS , and override the slow down , but it got way more interesting than that..
MH and calvin, sorry for not being clear
Yet, i think something is missing ,
To simplify things up :
lets say we have a game with 3 levels , you can collect up to 3 stars in each levels (so you can collect 0 or 1 or 2 or 3 stars) and you have a final score based on that ,
(for example 0 for 0 stars , 1000 for 1 star , 2000 for 2 stars , and 3000 for 3 stars)
So far so good ?!
once you finish a level , you need to save the data of how many stars you collected for that level , and what is the level score .
Now the way to do this (as far as i know) is to make :
Game.level 1 stars - index
Game.level 2 stars - index
Game.level 3 stars - index
And :
Game.level 1 Score - index
Game.level 2 Score - index
Game.level 3 Score - index
At the end of every level you save the attributes for that current level , so that the next time the player enters the game , you load them so he can see his progress for each level in the menu.
Now , you guys say tables needs to be involved in this process , but we can't store data to the tables , so I'm confused as to what you are suggesting :-?
Roy.
Writable tables will be great!
you were talking about save/load gameAttributes not level/scene active attributes!
Calvin and I love tables so much … We want to serve everything on them!
I would use scene indexAttributes to store stars and score
and before changingScene action … change the gameAttributes to the sceneIndex ones and do the save on the gameOnes then changeScene
We are suggesting that somehow or other you incorporate Tables in your game … =D>
yep! you definitively know you gotta create, by hand, those 120 gameAttributes … yuck!
@};- MH
And the 120 attributes, I hope gamesalad can just add something little like when u create actors, tables ... Have a window how many do you want to create