Problem mit der Pause

  • #1, by SmooshiepoofSunday, 05. July 2015, 18:25 9 years ago
    Hallo,

    ich arbeite gerade an einem Spiel, und bisher konnte ich für jedes Problem eine Lösung hier im Forum oder selbst finden. Aber hierfür finde ich seit Wochen leider keins (bis auf ein paar Sachen wäre dann mein erstes Chapter fertig...)
    Ich möchte, dass der Char von einem Eimer auf ein Brett springt und das dann das Schaf durch das Fenster fliegt. Soweit so gut habe ich das auch alles realisieren können. Zuerst hatte ich eine eigene Animation für den Sprung erstellt, jedoch hat das nicht so geklappt wie ich es wollte, da der Char nach der Animation sich nicht wie gewünscht weiterbewegt hat. Also hab ich den Sprung durch "setz Char an Position" improvisiert und das ganze sieht auch gut aus. Zwischen den 2 Zielpositionen wollte ich allerdings eine Millipause, damit man auch erkennt, dass der Char "sich bewegt". Ich habe eine Pause von 1 Millisekunde eingestellt, jedoch ist diese viel länger und ich erhalte einen Effekt wie im Matrixfilm .... nehme ich die Pause raus, wird der Char direkt an den 2. Zielpunkt gesetzt...
    Gibt es eine Möglichkeit eine Pause von wirklich nur ein bis fünf Millisekunden einzustellen?
    Ich habe mal ein VIdeo gemacht, damit ihr das Problem seht und poste auch mal meine Einstellungen....
    Danke für die Hilfe schonmal.

    hier das Video
    http://www.smooshiepoof.de/moep.mp4

    und die Einstellungen
    http://www.smooshiepoof.de/pics/einstellungen.png

    Newbie

    14 Posts


  • #2, by afrlmeSunday, 05. July 2015, 19:13 9 years ago
    The pause is based on the system loop. The min pause value is something like 16ms which works out at about 60fps. So setting 1ms will still only pause for until next system loop.

    Just watched the video. It seems to hang in the air for a long time. Why not just create it as an animation? You could then edit the required animation frame to trigger the action which determines when plank should go down & the sheep thing should fly off into open window.

    Imperator

    7278 Posts

  • #3, by SmooshiepoofSunday, 05. July 2015, 19:24 9 years ago
    thank you for the answer! I first made a jump animation before I tried to "trick" but it wasn't as expected, the sheep was thrown after the jump animation was finished, that looked weird in my eyes... I deactivated the "wait till animation is finished" but it was the same, so I tried the "set char to position" thing. Also after the jump animation, the char didnt move as she was told to roll


    EDIT

    I tried your way and it worked! Hooray for you. I didn't ever think to trigger the flying sheep animation in the animation frames of the jump...shame on me. Thank you so much!

    Newbie

    14 Posts

  • #4, by afrlmeSunday, 05. July 2015, 19:51 9 years ago
    No problem. I find it's the best method for getting the timing right on when you need other animations or actions to trigger during specific animations.

    Imperator

    7278 Posts

  • #5, by SmooshiepoofSunday, 05. July 2015, 19:59 9 years ago
    I will keep it in mind, cause I got sooo many animations, and to be honest I didnt knew I can set actions with the animations frames. I saw the menu, but it seems I simply ignored it... Should have asked earlier, wasted weeks cause of trying to find the mistake. Thank you again!

    Newbie

    14 Posts

  • #6, by afrlmeSunday, 05. July 2015, 20:08 9 years ago
    Here's a couple tips if you plan on using lots of animations or animations with lots of frames...

    http://wiki.visionaire-tracker.net/wiki/Image_Encoding -- webp conversion.
    http://wiki.visionaire-tracker.net/wiki/Game_Optimization -- reduce game size, load animations / animation frames faster.

    Imperator

    7278 Posts

  • #7, by SmooshiepoofSunday, 05. July 2015, 20:20 9 years ago
    thank you, I'm gonna fav the tuts, so I can reread when definatley going to need them!

    Newbie

    14 Posts