Game States and Game Loops

Поділитися
Вставка
  • Опубліковано 10 гру 2024

КОМЕНТАРІ • 20

  • @Gogglesofkrome
    @Gogglesofkrome 4 роки тому +5

    A hero to so few, but a hero no less. In other words... uh, thanks man. I hope you one day get the recognition you deserve

  • @JZSNooB
    @JZSNooB 4 роки тому +4

    Dang this video is a masterpiece. I've come back to this video at multiple points in time in my relatively little time programming and learned something brand new each time. It's seriously a shame this getting the right treatment from the youtube algorithm. I think every aspiring game dev/programmer needs to see this!

  • @I_Lemaire
    @I_Lemaire 3 роки тому

    Thank you for this newb friendly and comprehensive explanation of a game loop.

  • @PoisonWhisp3r
    @PoisonWhisp3r 8 років тому +10

    unfair , so few views.. this is extremely helpful.. thank you !

  • @jayaganthan1
    @jayaganthan1 Рік тому

    Awesome video. Thanks for making it!

  • @seabass6106
    @seabass6106 4 роки тому

    Very helpfull! You have my undying grattitude for your explanation! 🖖

  • @elneutrino90
    @elneutrino90 11 років тому +3

    Ok so physics and collisions need regular intervals of time to function properly, I guess thats why, in ksp game, your chances to die when you're about to land, increase when you're using time warp

  • @briantwill
    @briantwill  12 років тому +2

    Addendum: by default, a Pyglet window uses vsync, and because the run loop that drives schedule_interval performs the page flip, the update speed of any schedule_interval registered function will be limited by vsync, likely capping at something less than your refresh rate. (On my system, my refresh is 60hz, capping my updates to about 30 times per second.) To disable vsync, invoke window.set_vsync(False) on your window object. With vsync off, my update loop can run over 1000 times a second.

  • @Surkimus
    @Surkimus 11 років тому +2

    Thank you so much for doing this. You've helped me a lot.

  • @mirlumerar4707
    @mirlumerar4707 9 років тому

    This is awesome! Coming from the very simple and basic pygame event system this was exactly what could explain the idea behind pyglets event functions. I got one question, though: As I see things, the window event "on_draw" is only triggered whenever something is drawn on the window surface (or the window is created), triggered for example by a function dispatching a different event, or by a scheduled function. When I insert a print statement in the program at 21:24 behind "label.draw()", the message is printed exactly one, in a game that constantly updates state using a scheduled function it is printed out constantly as well. Has this changed in pyglet version 1.2?
    Thanks in advance,
    Mirlu Merar

    • @briantwill
      @briantwill  9 років тому

      I'm rusty on pyglet as it got abandoned (which is one reason I never fully completed this series). I believe the example at 21:24 only prints once because pyglet won't redraw unless some other event has been triggered. With no events triggering, the state won't possibly have changed so the image won't need changing. Later, when we register an update function to the clock, Pyglet knows the window might need redrawing again. No idea if this differs in 1.2 vs earlier. Have I answered the question?

    • @mirlumerar4707
      @mirlumerar4707 9 років тому

      Brian Will Thanks, this answered my question perfectly :)

  • @markwright2408
    @markwright2408 8 років тому +2

    You sir, made the game loop "click". ;)

  • @NathanSmutz
    @NathanSmutz 11 років тому

    These are listed in order on codeschool.org/game-programming/
    I haven't found a native UA-cam playlist yet.
    Did I overlook one?

  • @Darfail
    @Darfail 10 років тому

    awesome tutorial

  • @floppycooldog
    @floppycooldog 10 років тому

    Good video thanks for this information. :)

  • @handsome_man69
    @handsome_man69 8 років тому +4

    so you do like OO?

    • @shipper66
      @shipper66 8 років тому +4

      +Felix T-Rex lool :) not anymore i guess, this is old video :P