problems with 0.8.1 update...

harrioharrio Member Posts: 234
edited November -1 in Tech Support
what's cookin,

there are several threads with people experiencing problems with the update 'breaking' their games. well anyone who has seen my posts knows i don't need help, i can break my games all on my own...lol. but i have experienced the same thing with my macworld game 'jen'. but i found a fix for my particular problem and i shared the process with tshirtbooth. but i realized it may help lead others to finding their own fixes. so i'm posting what i wrote to tshirtbooth here in the forum.

hope it helps someone...
========================================================================
hey tshirt,

actually, i just scoured over my code and realized what was happening. it looks like the errors came because the engine is running even faster after the update. which is good for speeds sake but bad because it's hard to find the reasons for a bug/malfunction.

for my 'jen' game i have two actors; the regular ball 'active' and the ball that 'explodes'. you touch the first ball it changes instantly from the 'active' ball to the 'exploded' ball and then does the exploding routine. this was working perfectly in the last version but when i updated, it seemed like everything on screen was working but it would not do the 'try again' or 'you win' messages at the right time or for the right reason. it was not counting the balls correctly. or at least i thought it wasn't.

what i had to do was create actors on screen that showed attributes that i was tracking to check the 'try again' or 'you win' situations. sort of like debugging. each collision was supposed to register an addition or subtraction from the attributes i was tracking. but i found that one attribute was doubling every time there was a collision. at first i thought i had duplicate instances in my code for adding to the attribute but i found none. then i realized, i f i was not adding twice then it had to be colliding twice. it didn't make sense but that was the only other option. so i looked for where there could possibly be a double collision. after getting frustrated from looking for something 'not' there, then i finally just looked at what was there.

when my 'active' ball is either touched by the player or it collides with and 'exploded' ball then it becomes exploded. the way i do it is to bring a 'exploded' version of the ball into the scene and move the 'active' ball out of the scene at the same time. it is transparent to the player because it just looks like one ball in continuous movement. then i realized it. it was the order. i was bringing in a 'explosion' ball and moving out an 'active' ball. so the 'active' ball would register a collision with the incoming 'explosion' ball before it left the screen. so i changed the order. i made the 'active' ball leave the screen first then i activated the 'explosion' ball. since there was not 'active' ball to collide with it worked perfectly. just like it was doing before.

but then i asked myself, why was it working before? my only answer is everything is registering faster since the update. so i have to be very careful of how and in what order i place things.

this may explain a lot of the timer problems that people are having. now that things are faster, you have to be very careful with how you structure the behaviors and conditions from now on.

i'm going to post this 'answer' on the forum. it may help some people figure out some things.

noodles...
========================================================================

and a few noodles more
Sign In or Register to comment.