GS timer bug

Twayne2Twayne2 Member Posts: 458

Well, I should've said something sooner. GS has a byg with timers, and it is a really annoying and maybe fatal problem for me. Let's start with saying that I want 6 units in a wave, so, "for 6 seconds, every 1 second, make a guy". It only makes 5, which isn't the big, but it is really weird to me that it doesn't make all 6 desired units. (On the 6th second I would think it would make a unit). But, achnologing this situation, I figured adding a .1 second time to the for, "for 6.1 seconds...", would help. Now the bug. It doesn't always work. Even .2 doesn't always work. I think it's based off of processing power of the device. On my computer in PC Creator, I had problems, and then Online was better, but still problematic. Hand-tinkering with various .4s added to the multitude of .2s apparently, I got everything working in Inline Creator for a project. Move it over to Android, BAM, many levels make the wrong amount of units. (Imagine this issue on a larger scale). Okay, so at this point I have added .4 timers to the problematic timers, ( ot all .2s have this problem), hopefully. Two major things:

How can I be sure this won't happen when I publish together players?

Should I just make all timers .3 and .4 second added timers? What if this doesn't always work? Should I attempt to publish the project in a working state, say, for me, or make the system work slightly harder with extended times? A bugged game would do poorly, so I don't think I can take that chance of negative scoring because various, who knows how many, people have a weird glitch where the level doesn't end. (Even if you make it where the level detects how many units as they appear/get destroyed, that level could still be different for different people.)

Comments

  • ArmellineArmelline Member, PRO Posts: 5,354

    The internal clock definitely loses time when the device is processing a lot, but I'd avoid using timers to do the kind of thing you're talking about anyway.

  • Twayne2Twayne2 Member Posts: 458
    edited March 2020

    How would you recommend sending waves @Armelline?

  • ArmellineArmelline Member, PRO Posts: 5,354

    Rather than saying "Do x every 1s for 6s" I'd actually count how many are being spawned. I'd probably use a custom timer (you can find examples on the forums) but the benefit would be minimal, as those still rely on the game clock and so can go wonky too. But if you're saying "Spawn until x have been spawned" you'll get the correct number.

  • Twayne2Twayne2 Member Posts: 458
    edited March 2020

    Sounds interesting and certainly more accurate than me having to manually count. I was thinking that, if I get signs that the game I am working on will go well, that I will re-work everything to have every unit add +1 to the troop count, and then the current system of subtracting 1 when they are defeated will work. Only thing that's needed is an extra +1 to start with as saying if the number of troops is 0 on screen is actually true during the level, I can't say the player winds, as it's not the end of the wave. But having a last troop, actually, now that i think about it, like an enemy runner to end the wave, that counts as -2 when defeated so that an ending unit finishest he wave, and troop count equaling 0 does not actually represent the end of the level per se, although it would be 0 once the final troop is defeated. (I thought of the latter and so I scratched out the former stuff, as the troop counting actor really wouldn't represent the number of troops.)
    Perhaps I should check out those examples you're talking about. I know in the future not to rely on manual counting! Far more tedious anyways. Thanks for your posts @Armelline! :)

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,159

    If the timing between wave members doesn't matter as much, use a Loop behavior and a counter instead?

  • Twayne2Twayne2 Member Posts: 458

    I had forgotten about seeing both loop behaviors in the past. Never used them before! Since they execute really fast, wouldn't I have to set a bigger number for the counter to reach? Also, how would a loop help me spawn actors, if it would spawn an actor every 1 frame? Or make spawn actor rules based off of the number that's being increased probably?

Sign In or Register to comment.