-1 time bug in Fear Of Eights - please help me

Darkhog

  • Posts: 1243
Note Topic. This one make me nervous, because I don't know what cause it (just like Jon don't know what causes MIssing Graphics Bug, MGB  for short). I've uploaded game to forge, so anyone who feel they may help can take a peek. And yes, even print blocks didn't help with finding out where bug happens, so I thrown them out.


//edit: For some reason I was unable to upload FoE correctly to forge. The size of game was 10209 KB. I've encountered this problem before with old games on old site, so size may be problem. Maybe we shouldn't upload SWF along with game on forge?

« Last Edit: April 03, 2011, 02:17:10 pm by darkhog »

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

HNF

  • Posts: 232
If the game size is 10 megs, then it probably is from sound. Check the game's folder to see what resources it has. Try to optimize game size command in the menu. Attaching the .swf is not a large contributor to the problem.

Darkhog

  • Posts: 1243
@UP: I used this command, but SWF of game (I exported SWF just to check it) is about 5MB so half the size of upload. So it is a large contributor to the problem. At least in my case.

//edit: Anyway, please move discussion regarding bug to this thread, because current one is devoted to -1 time bug.

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Alexin

  • *
  • Posts: 3132
You do realize you didn't explain what problem you're facing, right?
"Find the fun"
alexin@stencyl.com

Darkhog

  • Posts: 1243
Because I don't even know what the problem really is! Play FoE for a while and when you get game over, before actual GO screen sometimes (pretty often, huh) in Time field on HUD there is -1 instead of zero as it should be. Tried to fiddle with game over conditions, but since -1 don't happen always and sometimes game ends with 0 I don't know what causes problem.

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Darkhog

  • Posts: 1243

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Alexin

  • *
  • Posts: 3132
I'll take a look at it later.
"Find the fun"
alexin@stencyl.com

Alexin

  • *
  • Posts: 3132
Sorry, darkhog, I forgot about this. Nudge me over IRC if I don't get to it until friday.
"Find the fun"
alexin@stencyl.com

Alexin

  • *
  • Posts: 3132
In TimerControl, you check if Time is greater than zero and decrement it by one unit. Obviously, if Time is greater than 0.0 but less than 1.0, decrementing it by one unit makes it negative. That why it's printing -1 (you use a round block when drawing).

A possible fix is to open NextLvl and wrap [HalfTime + [Time / [lev+1 * 0.88]]] in a round block, so Time always represents integers.
Another solution is to open TimerControl and set Time to 0.0, if decrementing it by one unit made it negative.


Also, I always get an error after catching an eight and that's because the actor 8 has a behavior called AddToPowerdown which kills the actor. Since you're using recycled actors you should shouldn't kill but instead recycle them. Modify this behavior too.
"Find the fun"
alexin@stencyl.com

Alexin

  • *
  • Posts: 3132
So, darkhog, did that solve the problem(s)?
"Find the fun"
alexin@stencyl.com

Darkhog

  • Posts: 1243
To all: It SEEMS to went away, but I won't be sure until some tests. FoE will be uploaded in a moment so could some of you test it to see if there is no -1 anymore.

To Alexin: I came up with even simpler solution than those you proposed, Alexin. In TimerControl I gave if round(Time)>0. But of course without you to tell me way I wouldn't be able to find out what was wrong. Thanks. Also removed kill from behavior AddToPowerDown kill (it had die when offscreen and die on collision with recycle blocks anyways). That was residual from old version when there weren't recycle blocks.

Link to game: (removed due to problems with publish game function. Will back soon)

« Last Edit: April 10, 2011, 02:41:56 pm by darkhog »

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Alexin

  • *
  • Posts: 3132
The problem still remains, it didn't went away just like that. Also, I bet it happens more frequently after the first level.

The solution you found works but isn't necessarily correct. You treat Timer as an integer, but it represents fractional numbers, so you should use the round when you set its value. Just a nitpick =P
"Find the fun"
alexin@stencyl.com

Darkhog

  • Posts: 1243
Game here isn't updated yet, because replace/publish as new dialog aren't popping up. So current version here won't work as planned. I currently uploading it to my site, so I'll edit this post with address of game.


//edit: This is current version:
http://mycrosssoft.net/games/mycrosssoft-net-play-game-fear-of-eights/

« Last Edit: April 11, 2011, 02:59:10 am by darkhog »

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Alexin

  • *
  • Posts: 3132
When some levels are completed, up to ten seconds are taken out of the remaining time. The time it takes to switch scenes doesn't justify it. I believe this isn't your intention since, most of the times, the remaining time is increased. If it is, then it isn't fair at all for the player.
"Find the fun"
alexin@stencyl.com