Tag: low level programming

  • Conference: Handmade Seattle 2020

    Conference: Handmade Seattle 2020

    Table of Contents:
    Intro
    Speakers Day 1
    Freya Holmér
    Nuno Leiria
    Joey de Vries
    Ramón Santamaría
    Elizabeth Baumel
    Andrew Kelley, Ginger Bill, Joshua Huelsman
    Speakers Day 2
    Gal Zaban
    Vegard Nossum
    Hannah Gamiel, Eric A. Anderson
    Randy Gaul
    Abner Coimbre
    Allen Webster, Ryan Fleury
    Project Demos
    Ripcord
    WhiteBox
    SYZYGY
    Footnotes

    I spent this past weekend attending Handmade Seattle which is an independent, low level programming conference. It is usually held in Seattle but due to the ongoing COVID-19 pandemic, this year’s conference was held online.

    First things first: wow. I was blown away.

    I was really impressed at the quality of speakers and the content they brought to the table. It never ceases to amaze me how many smart folks are out there deep diving into complicated topics and sharing what they learn with the rest of us. Huge kudos as well to Abner Coimbre for organizing the event and the job he did facilitating as its host. Abner did a fantastic job of being professional and informed with the topics he discussed with the speakers while managing to keep it real in true indie fashion 😎.

    Some of the talks were interviews between the speakers and the host, some were pre-recorded presentations or podcasts, but all ended with a Q&A with the speakers where all ticket holders were able to engage directly with the speakers using a private Matrix chat for which an invite was sent upon ticket purchase. It was really cool to see Matrix used like this in the wild, especially as it’s a project that my company recently invested millions into. I love the idea of this open, decentralized communication platform of the future. If you do too, we’re hiring engineers to help bring Matrix to Automattic 😊.

    Without further ado – I have included a list of the speakers below with a brief take on some of their topics with links to where you can check out more of what some of these folks are doing.

    Speakers: Day 1, November 14th 2020

    Freya Holmér
    Indie Game Dev – Developing Shader Expertise

    This was my first exposure to Freya as I haven’t dipped many toes into the shader world but oh. my. god. This is the person that accidentally created the industry standard shader editor for the biggest game engine in 2014?

    What a way to kick off this conference. Freya spoke heavily to the value in focusing on one thing and really digging down. In that, however, she emphasized a few points that I think is fantastic advice in general:

    1. Only learn the things you need to learn to do what you need to do.
    2. Don’t try to step into dozens of different topics, drill down and master one.
    3. Laser focus on one thing will result in getting more done faster.

    I love this because it’s a super common problem in the tech world and for learning in general. You start working on a project, but there is so much to learn that it’s easy to get distracted or never progress because you start looking into the various adjacent technologies. You end up becoming okay at the basics in a dozen technologies but have no deep understanding required to truly innovate.

    By the way, her YouTube channel is so good. Among other things, she has a dedicated series called “Math for Game Devs” which will make you a better game developer.

    References:
    https://acegikmo.com/


    Nuno Leiria
    Polystream Senior Engineer – Modern CPU Optimizations: From the kernel to the cloud

    This was so good. I know I probably sound like a broken record, but wow. Here was a AAA production solve for a performance bottleneck. The first obstacle had all of us laughing. Whoever had “Adobe Updater on the Server” on their systems bingo card, cash in that ticket!

    Beyond that, Nuno orchestrated a deep dive into performance profiling. On this particular project, he and his team went so deep into the matrix that they ended up discovering a bug in the Microsoft kernel. What’s more, they were able to provide specific enough information to have that bug patched, fixing their application.

    Yes, I couldn’t believe Microsoft actually patched a kernel bug either 😊.

    References:
    https://twitter.com/nunopleiria
    Full list of profiling tools at the bottom of this post1


    Joey de Vries
    Author – The History behind learnopengl.com

    Really great talk about the history behind learnopengl.com and how Joey ended up starting what many to be the definitive resource behind learning what is basically the industry standard in graphics rendering.

    Joey also has a new book: Learn OpenGL: Learn Modern OpenGL Graphics Programming in a Step-by-step Fashion which I will definitely be picking up!

    References:
    https://learnopengl.com/
    Book: Learn OpenGL: Learn Modern OpenGL Graphics Programming in a Step-by-step Fashion


    Ramón Santamaría
    Epic MegaGrants Recipient – Developing a Handmade Mindset for raylib

    This guy. I have pretty much been Ramón’s self-proclaimed #1 fan for about a year now, and I knew that this talk was going to be amazing but holy moly.

    How do you make an entrance into an indie programming conference? How about starting your presentation by compiling it from vanilla C source to web live using the software you wrote.

    Do you think it stopped there? Um…..

    I can fit on zero hands the amount of folks that thought guitar, cooking, and tree pruning would be the core tenants of a software conference talk.

    Ramón expertly translated how he applied these three passions from his life to his approach to software development. I won’t be able to give this talk its due justice here, so I highly recommend checking out the recorded video.

    References:
    https://www.raylib.com/


    Elizabeth Baumel
    Unity3D Engineer – You CAN Teach an Old Programmer New Paradigms!

    Data Oriented Design. This is the content I purchased my ticket for. Elizabeth teaches DOD for a living and expertly broke down components of DOD using various worksheets throughout her talk:

    This is my favorite software presentation slide ever:

    Slap 👏 that 👏 shit 👏 together 👏 — PREACH!

    References:
    https://twitter.com/icetigris


    Andrew Kelley, Ginger Bill, Joshua Huelsman
    Compiler Writers – The Race to Replace C and C++

    Excellent podcast between uber smart developers who work heavily with compilers and bring different perspectives to the table. Bill is the creator of the Odin Programming Language and converted many of his strong opinions into actions into his programming language. Josh is the creator of the Jiyu programming language and also worked on Johnathan Blow‘s upcoming Jai Language at Thekla. Andrew is the creator of the Zig Programming language. Abner keeps everything in order 😊.

    References:
    https://twitter.com/andy_kelley
    https://twitter.com/thegingerbill
    https://twitter.com/machinamentum

    Speakers: Day 2, November 15th 2020

    Gal Zaban
    Security Researcher – Linux Kernel Adventures: Reversing & Exploiting a Linux Driver

    🤯. A very humbling talk about exploiting systems via kernel device drivers. Gal’s talk goes deep into the matrix, discussing and breaking down ioctl syscalls in depth.

    This is one of those talks I’ll need to watch again….more than once 😅.

    References:
    https://twitter.com/0xgalz


    Vegard Nossum
    Kernel Developer – Parallelisation in the Linux Kernel

    Outstanding presentation from a true legend in the space. Check out this rig that his friend built:

    This is a computer with 6,144 cores. Yes, Linux supports this.

    As a point of reference, Windows supports a max of 256 cores.

    Linux Parallelism is state-of-the-art

    Vegard Nossum

    This talk perfectly covered the topics required to understand parallelism without going too deep into the rabbit hole on each branch (note: it is easy to do this). This is another talk I’m not capable of delivering justice to and highly recommend checking out Vegard’s work, white paper, and the talk itself.

    References:
    https://twitter.com/vegard_no
    White Paper – Ksplice: Automatic Rebootless Kernel Updates
    White Paper – Compact NUMA-aware Locks


    Hannah Gamiel & Eric A. Anderson
    Myst VR Directors – Cyan, Inc.

    Myst is upcoming VR game – but you already knew that. This interview was a cool chat between Abner and the directors of the project.

    One recurring topic in the podcast was the obstacles encountered via a sudden switch to remote work during the global pandemic. In the private chat I told Hannah she could reach out if she wanted some insight on some best practices, as I know a few folks who set the gold standard for remote work 😏.

    Other than that, it was just super cool getting a behind the scenes look at the folks @ Cyan and how they approached work on Myst and their transition to remote.

    References:
    Myst on Steam


    Randy Gaul
    Microsoft Engineer; Cute Headers

    Randy is a legend in the low level programming game space. If you’ve ever worked in this area you know about the Cute Header Libraries.

    This talk highlighted how good these small and useful libraries actually are and referenced future improvements I wasn’t even aware of, like networking libraries supporting both TCP and UDP. He also laid out the roadmap for the project and what we can expect to be released within the next year or so. It’s always cool to know awesome projects are under active development working towards features everyone wants 😀.

    References:
    https://github.com/RandyGaul/cute_headers
    https://twitter.com/randypgaul


    Abner Coimbre
    System Software Engineer – A New Terminal Emulator

    I was super looking forward to this as I basically live in the terminal, but it was postponed and totally understandably so. Abner has a working demo and is ready to present but was working so hard to host and keep everything organized that he chose to delay this a bit. Respect.

    References:
    https://twitter.com/AbnerCoimbre
    https://www.handmade-seattle.com


    Allen Webster, Ryan Fleury
    The How And Why Of Reinventing The Wheel / (Introduction To Dion)

    DION

    DION

    DION!!

    It turns out the hype was worth the wait as Allen and Ryan revealed Dion to the world in a big way.

    These guys weren’t kidding about reinventing the wheel. Imagine programming as you know it re imagined. When writing this I had a really hard time defining everything I was seeing, so I’ll let Ryan share his take:

    Dion is our experiment at a new iteration of what it means to program. Our existing programming tools are hamstrung, and it shows; they are often dumber, slower, and more difficult to use than it feels like they should be. We (Dion Systems) have a theory about why that is, and we’re focused in on demonstrating what we think is the solution.

    Dion aims to be an entire computing environment with one key tweak to the architecture of the programming systems we’re familiar with. Instead of storing code as text files, we store it as a more direct, structured representation that more closely maps to a traditional abstract syntax tree (which is a data structure that a compiler, for example, will use to store extracted semantic information from code).

    Instead of storing code as text files, we store it as a more direct, structured representation that more closely maps to a traditional abstract syntax tree

    This key tweak opens many doors. We now have the freedom to render code in different ways, achieve much smarter tools with much less effort, iterate on the user-interface and user-experience of the programmer, surface more sophisticated information about code, provide more insight for experts, improve the educational experience for beginners, and more, all with much less work.

    We’re not done with our experiment, and our demo is just a first glimpse into the kind of future that rethinking the architecture of our programming environments can bring, but we’re really excited with what we’ve found so far, and wanted to share that vision with the Handmade community.

    our demo is just a first glimpse into the kind of future that rethinking the architecture of our programming environments can bring

    There were too many “omg” moments for me to count but a few include:

    • All functions/procedures can be built by themselves.
    • How you view the code is up to you. Inline braces, newline braces, no braces, it’s all on the table.
    • Instant feedback on changes, errors, etc. The system knows not to build until something is fixed.
    • Zooming in and out on code granularity. This is crazy to watch. You can look at all definitions and calls, or just the calls or definitions.
    • Function arguments, variable declarations update their references instantly. By the way, this isn’t matching a string to do it. What? 🤯

    I’m so excited to see where this project goes. There are a few hurdles the team will need to overcome (e.g. version control) – but there are more possibilities than there are obstacles…. you can count on that.

    References:
    https://twitter.com/DionSystems
    https://twitter.com/ryanjfleury
    https://twitter.com/AllenWebster4th
    https://twitter.com/debiatan


    All of these talks were recorded and will be available soon at: https://www.handmade-seattle.com/


    Bonus!

    Between the interviews, there were “5 minute indie demos” which showcased some extremely interesting up-and-coming projects. Here were a couple that stood out to me:

    Ripcord

    This is one of the coolest cross-platform chat clients I’ve seen in a long time. It reminds me a lot of the old Trillian days. Remember Trillian? It would bring your AIM/ICQ/IRC convos into a single client.

    Built in qt, it is a program designed to bring all of your various modern-day chat programs into one place in a localized client – without needing four 2GB electron apps murdering all of your CPU and RAM.

    From the website, check out some of the features (emphasis mine):

    Features

    • Not made from a web browser
    • Tabs
    • Multiple windows
    • Multiple accounts
    • Voice chat (Discord OK, Slack WIP)
    • Graphical emoji and custom emoji
    • Tab completion for user names and emoji
    • Customizable fonts, colors, and sizes
    • Custom bookmark lists for easily accessing only the channels you actually use
    • Variable DPI and multi-monitor support
    • Low CPU and memory usage
    • Zero GPU usage
    • No tracking or analytics
    • No installer or forced updates

    Here are some screenshots of the software:

    I’m already tooling around with this, and really excited to see how this project evolves!

    WhiteBox

    A really cool tool that compiles, runs, and debugs real time as you write code 😲. Is there more to say? Check it out below:

    SYZYGY

    Syzygy is a crazy cool puzzle game which uses topology deformations as a game mechanic. I haven’t seen something like this before.

    Get it here on Steam. Releasing 20 November 2020 (this Friday!)


    Footnotes:

    1Full list of profiling tools from Nuno Leiria’s talk

    System wide profiling tools:
    https://developer.nvidia.com/nsight-systems
    https://docs.microsoft.com/en-us/windows-hardware/test/wpt/
    https://github.com/google/UIforETW

    GPU profiling:
    https://gpuopen.com/rgp/
    https://developer.nvidia.com/nsight-graphics
    https://software.intel.com/content/www/us/en/develop/tools/graphics-performance-analyzers.html

    Sampling/Instrumented profilers:
    http://www.codersnotes.com/sleepy/
    https://superluminal.eu/
    https://github.com/wolfpld/tracy
    https://github.com/Celtoys/Remotery
    https://github.com/jonasmr/microprofile
    https://www.puredevsoftware.com/framepro/index.htm

    Micro-architecture profilers:
    https://software.intel.com/content/www/us/en/develop/tools/vtune-profiler.html
    https://developer.amd.com/amd-uprof/NVIDIA Nsight Systems

  • Draw! is now playable

    Draw! is now playable

    I decided to port the game I have been working on when I have free time to the web so that anyone can check it out. It’s a simple wild west duel game inspired by Quick Draw from the original Kirby’s Adventure on NES.

    Anyone can play the game here:

    https://draw.rudyfaile.com

    If you want to check out a few videos of me working on the game (even the actual compiling for web!) check these out:

    Have fun!

  • Free game assets

    While working on DRAW! I decided to commission a few artists on Fiverr to create the art assets. My idea was to commission about ~5 different artists and choose my favorite as art for the game. After about a week I decided to use assets from the very talented @penzilladraws who is an incredible Danish artist and was very easy to work with. While I ended up using this art in the game and won’t be directly sharing the assets here, I encourage you to check out their work on Fiverr and other places. Here is a screenshot of what the assets look like put together in my game:

    The other four artists made great work as well, but I didn’t end up using it in the final project. I have never been a fan of mixed and matched assets, but I also don’t want to leave this hard work sitting on my desktop in a folder called “Fiverr stuff I’m never going to use” so I have decided to share the art here for anyone to use 😊.

    1) @surajrenuka

    Examples:

    Individual Background Assets:

    Character Sprite Sheets:

    GIFs of the character sprites:

    2) @diegorago138

    Example:

    Background Assets:

    Sprite Sheet:

    GIFs:

    3) @dara90

    Example:

    Sprite Sheet:

    GIFs:

    4) @heart_container

    The only asset is a single sprite sheet:

    I hope you enjoy and check out these awesome artists on Fiverr and other places.

  • A commitment to Handmade

    A commitment to Handmade

    This tale begins as most of the major changes in my life do during a sleepless night. It was about 3 in the morning and I was browsing YouTube videos in bed when I stumbled upon what is possibly the best dev log I’ve ever seen:


    When professor rework showed up I just about lost it 🤣

    I was laying there in disbelief between fits of laughter at what this guy was doing. Two years Thomas Randall has been working on this game. He started in Unreal Engine, Rewrote in C++, and then finally in pure C. He did everything over this period of time from completely redesigning the game’s architecture to teaching himself physics on the fly. He also moved his entire game into a new engine in a week.

    Aside from the awesome flow and humor in the videos themselves (something about Aussie sarcasm is extra funny 😀) what really intrigued me was Randall’s commitment to his vision. As a programmer and game developer, I have settled time and time again like everyone else for various reasons: burnout, time constraints, money, external factors, you name it. Randall wasn’t willing to give an inch. He wants to make the game he sees in his mind and obviously doesn’t care about what it’s going to take to get there.

    That kind of passion is contagious. As I watched more of Randall’s videos I started getting introduced to some other folks in Randall’s network via the videos. One of these guys is a fellow by the name of Ryan Fleury. Ryan developed the Telescope game engine Randall’s game currently lives in, and also created a custom tool called Data Desk for building and parsing C-like data components.

    Ryan uses Data Desk in most of his software projects and I was blown away at the level of fidelity he was able to achieve in a 48 hour game jam with a limited 2d sprite sheet. It is seriously impressive. Highly recommend watching the first five minutes of the Jam:


    This got me interested in what Ryan was working on and I came across his project “The Melodist” and again was simply blown away by the general difference in quality and attention to performance and optimization that was going into this project. I’ve made a few games, and a lot of software. I’ve played a lot of games and used a lot of software. This was next level stuff.

    I reached out to Ryan to introduce myself and ask if he would be interested in “micro-mentoring” me. Ryan is kind of busy 🙂, but was kind enough to invite me to the Handmade Network.

    The reception I have received since joining the Handmade Network community has been incredible. Handmade Network lacks the elitism or snobbishness I’ve seen in some development circles. Veterans of the community answer day 1 questions from new members or guests with the same respect and enthusiasm that they treat each other with. It’s kind of interesting because you would think folks that are doing things purposefully harder and putting invisible restrictions on themselves would feel a certain superiority. The opposite couldn’t be more true.

    It was through this Network I started meeting other folks working on extremely interesting software with a high attention to detail on performance, customization, and portability.

    This is something I’ve been curious about for years:

    I’ve been programming for 15 years now. Recently, our industry’s lack of care for efficiency, simplicity, and excellence started really getting to me, to the point of me getting depressed by my own career and IT in general.

    Modern cars work, let’s say for the sake of argument, at 98% of what’s physically possible with the current engine design. Modern buildings use just enough material to fulfill their function and stay safe under the given conditions. All planes converged to the optimal size/form/load and basically look the same.

    Only in software, it’s fine if a program runs at 1% or even 0.01% of the possible performance. Everybody just seems to be ok with it. People are often even proud about how inefficient it is, as in “why should we worry, computers are fast enough”

    – Nikita Prokopov on Software Disenchantment

    This is especially true in Web where the landscape changes drastically and tempo can be unpredictable. One moment you’re living in a dollar sign world $ in jQuery and the next it’s all about React. One minute your project has 5 folders and the next you have thousands of node modules and GitHub is overloading mail servers sending you dependency security notifications every 5 seconds. It is madness.

    All of this culminated in a few personal commitments. I have made a commitment to begin on the path of “getting closer to the metal” by developing new projects in lower level languages (particularly C) and committing myself to a greater understanding of how things actually work. Decades of abstraction and seemingly infinite storage space and processing speeds have led us here. I have also decided to participate where possible to the Handmade Network, contribute, and give back where possible. For example, one of the members: Allen Webster achieved what many programmers aspire to do: built his own editor called “4coder”. 4coder is exactly the type and quality of software that has me so intrigued with the Handmade community. There’s even a Handmade Network Podcast (it’s excellent btw) where some of these folks discuss their motivations for these projects and problems they solved along the way.

    Through Handmade Network I have found all sorts of high quality developers and projects. Among these was a library called “Raylib” written by a guy named Ray from Barcelona, Spain. I was so impressed by the quality of Ray’s library (he has a whole suite of libraries, actually) and the levels at which he was willing to go to share his work. Aside from being under an extremely generous software license, Ray has worked tirelessly to ensure his software can be used at every level, on every platform, with virtually any utility.

    I was once again moved by the passion I saw coming through in Ray’s project. Ray also actively communicates with folks interested in using his software and is extremely kind and open to working towards anything that will help someone have an easier time. It is for this reason that Ray is one of the solo developers I decided to donate to during this time of COVID-19 uncertainty:

    Speaking of Raylib, the Raylib community recently held a 32×32 pixel game jam I decided to whip up a submission in about two days and enter! I found the constraints interesting: how cool can you make a game that has to fit in a 32×32 grid of individual “LED” and be 100% generated programmatically with zero external libraries outside of Raylib? Turns out, pretty cool:

    Flappy Box – my Raylib game Jam submission programmed in C

    While the game isn’t extremely graphically pleasing, it plays well and the entire executable program is 15kb!! For reference, the above GIF is 52 times larger than the game it’s displaying.

    You can check out the source code (or grab the executable and play) here:

    https://github.com/rfaile313/RayLib32x32GameJam

    One of the cool things about making something like this is it could be easily transitioned into a hardware project. For example, very little would need to be changed to port this game onto a bookshelf, sort of like what this guy did with Tetris:

    😎

    I also plan on utilizing Ray’s suite of tools and other Handmade Network community projects and affiliations in my quest to create better software. In the meantime I will also be giving back to the community in other ways. For example, here’s a quick tutorial on creating your first project in 4coder on Windows:


    The best way to help out Handmade Network and other Handmade projects is through the Handmade Fund. Other developers like Randall and Ray usually have other ways to give back if you like what they’re doing.

    I’d like to encourage anyone who feels like donating during this time to consider folks who are making amazing open source software. If you don’t feel like donating, consider giving back by sharing links to the software, authors, and community. They deserve it.