Issue with change scene and display text
Issue:
Display text containing a changing table reference does not update anymore
Example 1: Total score in clicker game remains fix on one number even tough you click and increase the values
(Happens in all my cookie clicker games right now)
Example 2: Shown health potion is not longer shown to be subtracted on button click but reseting the scene does show the correct amount again. This also effects conditions as you should not be able to take a potion if you have none. Due this issue the text is not only not changing it also does not stop the player from keep on using it. When you change the scene, the correct amount is shown and can be somewhere in the range of "-", there for the condition was ignored during the issue.
Both worked fine on the last launch and still works fine in the live versions. But with the current engine they don't work anymore.
How?:
After a change scene behaviour with the current build of the game engine the issue appears.
A second change scene removes the issue and on the next is back again.
Games released with previous versions of gamesalad last (4months ago) did not have the issue
and I did not change anything in the project files since then.
I actually tested the live versions for it and they are working fine, launched with previous game salad versions.
I also re-downloaded the project files from the publishing page to build it once more just to get sure I did not break anything by myself.
The re-downloaded version showed the same problems in the current engine via in game simulator and adhoc version.
While there live versions, the exact same project file, in the store build with the previous version of game salad does work fine.
Comments
Edit: Scratch what I said before, I was being an idiot. I am unable to replicate your bug. Which implies it's not as simple as you explained. What happens if you take your project, save a copy, and cut it down until there's just the change table value and the display text?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
alright thanks, I am happy you can confirm it!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Whoever marked my last comment insightful, unmark it It wasn't insightful, it was sleep deprived and careless
My money is on a table reference to row or column 0, which will often mess up display texts (other logic too, but display texts in particular), on the scene.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline
i did it! ( the insightful)
The issue tends for me to appear always 100% reproducible after first change scene and 3-6 seconds in. It could be based on my code tough.
Now when I think about that could also been the reason why the custom font in finger dungeon that should show the coins counting up as you go did not calculate them correctly but the final coin counting scene at the end of the level was showing the correct amount. (btw. I use your custom font project file for all my games )
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Rules of thumb for using tables in GameSalad now:
GameSalad will break if you do a table reference that looks for a table row or column that doesn't exist (i.e. 0).
To prevent this happening, use one of these two methods (each are more suitable in different situations). If your row/column references will always be greater than 0, and less than the length of the table, guaranteed, then you do not need to worry. But if they ever might not be, play it safe!
Wrap the table reference in a rule that ensures that both the attribute used for the row number and the attribute used for the column number are greater than 0. For example, if you say "tableCellValue(mytable,game.Level,1)", put it in a rule that says "When game.Level > 0".
Use the max function. This isn't always appropriate, but in a lot of cases you could be saying "tableCellValue(mytable,max(1,game.Level),1)".
Both of these methods will prevent GameSalad from attempting to look at table row/column 0, and will avoid this problem.
It's not so much a bug as GameSalad no longer forgiving careless/incorrect logic. It's relatively new so it's affecting a lot of old projects. Previously GameSalad just ignored any references to row/column 0, now it causes problems.
Of course this might not be @BigDave's issue, but it's useful information nonetheless!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@adent42
@stevej
Is there any chance you guys look into this. I try to do the solution above but to be honest I wrote plenty of that code 1.5 years ago. And it has hundreds such calls all over the place to nail em all down for each game.. omg
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
ok i deal with it.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
ok i feel really unable to deal with this issue
its like fishing in the dark
I only get the issue by playing 3 levels in a row
The issue appears mid. level without clear trigger it feels like the issue runs calculating in the back and just surfaces at that time span.
I turned off behaviours displaying or calculating table references in the breaking actor as well in actors that influence the same reference.
No success.
I fixed Human Harvest by simply not using the changing scene behaviour.
It only pauses, shows ad and unpauses.
By NOT changing the scene the issue never appears.
Which is no solution for orcs/brofist legend etc. as I have to change to different scenes for the quests.
ARRRRRgg annoyed..
@Armelline
I know its maybe really the 0 in the table reference but they trigger problem after scene changes during run time unrelated to the root so I am most likely forced to check every single actor.
Also having re-created and fixed the issue atleast once first.
So I try now to create the issue in a new project first.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
I´m not sure at all, but it might be related to this table bug i reported: bugs.gamesalad.com/show_bug.cgi?id=1644
There´s a sample project and a video demonstrating the bug if you want to check.
In the demo file, i use the "reset game" behaviour to, well, reset the game.
Sounds similar to what you´re experiencing. There´s also a workaround in the comments, but it only works in some cases.
Mental Donkey Games
Website - Facebook - Twitter
@MentalDonkeyGames
THANKS
that sounds very related i voted for that
Is there any way to download that video?
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
I´m not sure if the attachments in the bug database are available for GS staff only, but i´ll attach it here. The bug happens 2 times out of 7 tries in the video.
Mental Donkey Games
Website - Facebook - Twitter
@MentalDonkeyGames
oh wow..
yeah that is how exactly the issue feels to me when testing.
It was horrible because it felt so random.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
At least the bug is already been confirmed, so the GS staff is aware of it.
Mental Donkey Games
Website - Facebook - Twitter
@MentalDonkeyGames
can you also give me the gs.proj
I forward it to @Hopscotch
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Sure thing.
Mental Donkey Games
Website - Facebook - Twitter
Like i wrote in the bug comments:
The attributes that are updated to the table are touch 1 X and touch 1 Y.
If in the demo project you add a "display text" to show the touch 1 X and Y, the bug does not happen. It´s very odd.
Mental Donkey Games
Website - Facebook - Twitter
@MentalDonkeyGames , @BigDave thanks.
I notice that when you give the game a second after the reset, then the bug does not happen.
Maybe GS's cleanup after the reset causes issues with the table if you start adding rows too soon. Will delve some more.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
The project attached to that bug causes a stack overflow in lua when the reset game is triggered. Anything that happens after that is suspect because the lua state is potentially broken.
I'd love to see a project that shows the issue but doesn't crash lua.
Here you go @GeorgeGS
The attached project is similar to that of @MentalDonkeyGames except:
game reset has been replaced by a scene change, and
table is no longer cleared, table is now fixed number of rows, with a pointer
The fat values are the coords displayed from table
the small font values are direct device.mouse coords.
In adhoc, the project still hangs the display text on table, unless you give it a 2 second breather after scene change.
Hope this helps tracking down the lua error.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
This may be related to a bug I was tacking yesterday. I don't think it's related to the tables (mine at least, as it has no table), I think it's related to the touch.
The way my bug manifested was this:
Actors would be spawned along the touch path. The moment a timer (or any one of a number of bits of logic) was added to the actor, these actors would be invisible on device. They'd still be there, just invisible. The moment a display text was added, the actors would become visible again. I got around the problem by adding a display text to the actor, displaying just a full stop, opacity set to 0. This was only on device - no issues in Preview.
Since this other bug is also avoided by adding a display text, perhaps they are related. But there is no table displaying/referencing going on in my project (at least in the relevant actor), so who knows!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline, the project I added has a displaytext which should have been a hack/work-around, but the project still has the issue. And the project is extremely simple.
I have the feeling that all these,
may have a single underlying cause, not under our control.
All of the above are avoidable by wrapping all code in an "after 0.1s timer", delaying execution of code for a split second.
As GS mentions, they may have been present in versions pre v1.24, but have become much more prominent for some reason.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
You're probably right! I'll try to split my bug into a demo project tonight and @GeorgeGS can try to wrap his head around it all
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Hopscotch
yes there is definitely that 1 sec. after a scene changes where it still works before it starts freezing the actor and its behaviors
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave, the symptoms are different between your game and that of @MentalDonkeyGames . You actor locks up the rules after one second, @MentalDonkeyGames 's project, and the one I posted, works if you give GS a second or two to recover after a scene change. If you interact immediately, it locks up the rule.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com