Faster Renderer, New Minimap, Dockerization, and Service Health Monitoring [Golang MMO Devlog]

Поділитися
Вставка
  • Опубліковано 28 тра 2024
  • ⁍ Discord: / discord
    ⁍ Twitter: bit.ly/UnitOfTimeOnTwitter
    ⁍ Play: mythfall.com
    ⁍ Github: github.com/unitoftime
    // Articles
    ⁍ Left (Sander Mertens): / doing-a-lot-with-a-lit...
    ⁍ Right (Michele Caini): skypjack.github.io/2019-05-06...
    // Description
    This week I worked on improving the rendering pipeline of our game, including doing better mesh caching and also adding a minimap. After that I wanted to make my deployments easier, so I ported my deployment system to Docker and Docker Compose. Lastly I added some service health monitoring and dashboarding with Prometheus and Grafana. Enjoy!
  • Наука та технологія

КОМЕНТАРІ • 31

  • @TheDanalo23
    @TheDanalo23 Рік тому +5

    Glad there is more devlogs, keep it up, Unit!

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

    Oh man, this is a really good video. Thank you for sharing!

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

    nice video series Unit! keep doing this amazing content

  • @sveculis7369
    @sveculis7369 Рік тому +2

    Even though this is not something EXTREME, it represents a rare symbol of what Go is capable of. A shame a lot of developers don’t know Go allows you to go as low-level as you want, whilst still providing a SOTA GC. Bravo!

    • @UnitOfTimeYT
      @UnitOfTimeYT  Рік тому +2

      Yeah I agree! I think if you're careful enough you can make Go code very fast. But honestly, one big selling point for me is just how easily I can snap things together :) Thanks for watching!

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

      it can't go super low level like linux kernel because it relies on sys calls from the operating system to work properly, but i love using go!

    • @sveculis7369
      @sveculis7369 Рік тому +1

      @@dandogamer Well you can always bind it with C or just use GOASM, but that’s not really what I meant.
      Go’s low-level and optimization models are opt-in, unlike other languages like C++ or Rust which enforce them due to lack of a GC.
      That being said, I wouldn’t write single-threaded, nano-optimized code in Go, but would rather use C and wrap the rest of the codebase/non-hot paths in Go.

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

      @@UnitOfTimeYT Always looking forward to your great content, especially in Go!

  • @billynugget7102
    @billynugget7102 Рік тому +1

    The ci/cd system is crazy. Impressive af

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

      Yeah Github has definitely worked hard to make Actions very simple to use. And it pretty much is. There's still a little user friction with setting up credentials to other cloud providers, but other than that I've been pretty happy. Then docker and docker compose are suuper nice. I highly recommend them if you just want to deploy a bunch of containers to a single host

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

      @@UnitOfTimeYTive definitely gotta check that out!

  • @bobsmithy3103
    @bobsmithy3103 8 місяців тому

    4:38 I love webrtc xD

    • @UnitOfTimeYT
      @UnitOfTimeYT  8 місяців тому

      Haha yeah. WebRTC has been super nice so far. If you're using Go, I highly recommend the Pion stack!

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

    For Prometheus and graphana are you storing the data on a Mounted volume? I had it running once with docker compose and when I restarted all the data disappeared since it was stored on the ephemeral container disk.
    There may be a way to specify a port for your compose setup to not have to use the host network, if usually is some env var on the image (unless it’s your own image)

    • @UnitOfTimeYT
      @UnitOfTimeYT  Рік тому +1

      haha Yeah I ran into that exact same problem! It would lose all my monitoring data every time I redeployed. I ended up switching to the mounted volume after that.
      For the WebRTC problem, I think I would have to expose the entire UDP port range because I'm not sure which port is going to get used for the connection. The WebRTC library I'm using has two functions which I think might help my situation:
      1. pkg.go.dev/github.com/pion/webrtc/v3#SettingEngine.SetEphemeralUDPPortRange
      2. pkg.go.dev/github.com/pion/webrtc/v3#SettingEngine.SetNAT1To1IPs
      I think I'll play around with these in the future. WebRTC is still somewhat mysterious to me.
      Thanks for watching!

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

    Let's gooo

  • @jomy10-games
    @jomy10-games Рік тому

    Noice

  • @PicoBellum
    @PicoBellum 8 місяців тому

    Hi, from what I am seen with the amount of rendering that you are doing you should be ok with regenerating the a batches each frame. There is no need for caching system you just rebuild every thing each frame. For less than 5k sprites it should not take more than 1ms (I am talking about a native executable not WASM, maybe WASM is the problem). From what I see you are using a generic Mesh type, I would recommend to use a Sprite type with (pos, rot, scale, texture_id, ...) and create a batch of sprites, that way you get continue chunk of memory and only need to do two copies, first you fill the buffer and then you send it to the gpu (Using the Sprite type will also allow you to use instancing more easily because you know your data).
    Also if you want animated tiles you can animate them in GPU by sending the current tick (or dt) to the vertex shader and calculating the current frame in the shader, no need to rebuild the geometry if it is static.

    • @UnitOfTimeYT
      @UnitOfTimeYT  8 місяців тому

      Thanks for the suggestions! I'll definitely agree. WASM is a bit slower than native, so caching probably helps a little more there. I think that I'll eventually rewrite my rendering library from the ground up, now that I understand how it works a bit more (and hopefully learning from the mistakes of my first try). Luckily, like you said, 2D doesn't take that much performance - But it would be nice for it to run smoothly on low-end devices. Anyways, thanks for watching!

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

    I love your devlogs they are really neat.
    Suggestions :
    [you speak too fast.
    Please edit out the mouth noises.

    • @UnitOfTimeYT
      @UnitOfTimeYT  Рік тому +1

      haha thanks. I appreciate the feedback. Yeah I agree, I'll try to work on both those things!

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

      @@UnitOfTimeYT But apart from that, I liked the explanations. And the art is cool. Cant wait to see more gameplay !

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

      ​@@milosancheztv8432 Thanks! Yeah, I'm always wanting to improve the quality of my videos, so please continue to say something if you think there are areas that need improving!

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

      @@UnitOfTimeYT Well apart from that I think everything is really great but If i find something ill tell you.
      Cant wait to try your game !

  • @betakors
    @betakors Рік тому +3

    f i r s t :p