How to code PONG w/ Rust and Geese

Sdílet
Vložit
  • čas přidán 2. 09. 2023
  • This video provides a tutorial on using the Geese event framework to build Rust projects of any scale! Geese is an event system library that allows one to compose actors by building a dependency graph. We cover the common ways that Geese is used, including:
    • Creating a context
    • Raising events
    • Defining event systems
    • Listening for events
    • Declaring and accessing system dependencies
    Music used in the video:
    Chris Doerksen - Shopping
    Chris Doerksen - Going Up
    David Cutter - Setting 1
    AdhesiveWombat - 8 Bit Adventure
  • Hry

Komentáře • 16

  • @DouglasDwyer
    @DouglasDwyer  Před 10 měsíci +6

    For those interested in additional voxel content, see 18:17 for a quick update! This tutorial is a one-time departure from normal videos - I will make more voxel devlogs soon :)

  • @Voxelphile
    @Voxelphile Před 10 měsíci +8

    Keep it up douglas! Your doing such excellent work here. We really love your content and your an instant click for many of us when we see you on the homepage.

  • @nazarigonzalez8620
    @nazarigonzalez8620 Před 10 měsíci +2

    This is a nice and simple example. I am wondering, can you call events from a system with a callback on another systems?

    • @DouglasDwyer
      @DouglasDwyer  Před 10 měsíci +1

      To keep things simple, when you raise an event that event is sent to all other listening systems. There's not a builtin concept of a callback. However, you could emulate that functionality yourself by putting a closure (or some other primitive for communication) inside the event structure, invoking it from listeners.

  • @randcoding
    @randcoding Před 10 měsíci +1

    Yaay! New video!!

  • @phylliida
    @phylliida Před 10 měsíci +1

    Has the geese been a way for the birds to land when outside having feathers? I’ve been thinking about the cycle and can’t frame query often enough

    • @DouglasDwyer
      @DouglasDwyer  Před 10 měsíci +2

      If I understand your question correctly, you're asking when event cycles can be invoked and how often you have to send the frame event? When you invoke an event cycle using geese::GeeseContext::flush(), all events spawned during that cycle complete processing before flush returns. You can invoke an event cycle with the flush command whenever you'd like. Let me know if you have additional questions.

    • @phylliida
      @phylliida Před 10 měsíci +1

      @@DouglasDwyer thank you

  • @tryangle6152
    @tryangle6152 Před 10 měsíci

    wow the api looks awesome

  • @alphenex8974
    @alphenex8974 Před 9 měsíci

    hey, unrelated to this video but how do you ray-cast in your voxel engine? I know that you use compute shaders but how do you basically give the shader the Voxel Quadtree data? Do you have a Quadtree system in your shader or something like that?

    • @DouglasDwyer
      @DouglasDwyer  Před 9 měsíci

      Great question! I've explored a number of rendering techniques during this project. In the latest iteration of my engine, I don't use ray casting - I use pure rasterization with greedy meshing and LODs. This allows my engine to run on low-end hardware like integrated GPUs.
      In previous versions of my engine, I have tried pure ray marching and ray-raster hybrid techniques. In devlogs 1-3, I do ray marching in a compute shader. This is accomplished by uploading voxel octree data to a GPU buffer and traversing it in shader code. In devlogs 4-7, I rasterize the bounding boxes of small groups of voxels and then ray march inside those bounding boxes. This approach is accomplished by uploading the voxel data to a big 3D texture, and sampling it in a fragment shader.

    • @alphenex8974
      @alphenex8974 Před 9 měsíci

      @@DouglasDwyer Thanks you for answering this quickly and answering in the first place. For uploading Voxel Octree Data can't we just use UBOs?

    • @DouglasDwyer
      @DouglasDwyer  Před 9 měsíci +2

      For large-scale voxel data, it's usually necessary to use an SSBO. The OpenGL specification only guarantees that UBOs can be up to 64 KB in size (or something even smaller, depending upon the version) which generally is not big enough for voxel volume data. For instance, the big tree model shown in my devlogs is upwards of 500 KB in my uncompressed voxel octree representation.

  • @BusinessWolf1
    @BusinessWolf1 Před 8 měsíci

    You haven't uploaded in a while. Sad.

    • @DouglasDwyer
      @DouglasDwyer  Před 8 měsíci

      I am currently studying at university, and thus do not have as much free time to make content. Rest assured, I am still actively working on the voxel engine!