Skip to content

Instantly share code, notes, and snippets.

@darkerbit
darkerbit / FileDialog.cs
Created January 28, 2025 15:23
C# wrapper for the SDL file dialog API... 2!
using System;
using System.Collections.Concurrent;
using System.Runtime.InteropServices;
using System.Text;
using MoonWorks;
using SDL3;
namespace Segadora.UI;
public unsafe class FileDialog : IDisposable
@darkerbit
darkerbit / SDLFileDialogs.cs
Created January 26, 2025 09:51
C# wrapper for the SDL3 file dialog API
using System;
using System.Runtime.InteropServices;
using System.Text;
using SDL3;
namespace Segadora.UI;
public static class SDLFileDialogs
{
private unsafe class DialogData : IDisposable
@darkerbit
darkerbit / ImGui.frag.hlsl
Last active July 16, 2025 11:42
Dear ImGui Backend for MoonWorks
struct Input
{
float2 TexCoord : TEXCOORD0;
float4 Color : TEXCOORD1;
};
struct Output
{
float4 Color : SV_Target0;
};
@darkerbit
darkerbit / programming.md
Created July 22, 2023 23:26
Programming first steps (copied from elsewhere)

Alright, so there are people here that want to learn programming (more specifically for gamedev)

Here is a collection of (imo) good places to start:

Block programming: Don't let the snobs discourage you from this, block programming is an entirely valid way to learn things!

  • Scratch: You know what this is. It's a really good way to learn in my opinion, though it's changed a lot since I last used it
  • Hour of Code: A collection of short block programming courses. Minecraft Adventurer and Designer are good ones, in my opinion. (Hour of Code is aimed at a younger audience so may feel slightly patronizing)
  • Blockly Games (https://blockly.games/): A much more obscure and older block programming course, but also very good in my opinion! Not as... "annoying" as Hour of Code, lets you focus more on your code
@darkerbit
darkerbit / sumic8.c
Created April 25, 2023 13:39
Single-file CHIP-8 emulator
/* sumic8.c: single-file chip-8 vm */
/* Copyright (c) 2023 darkerbit
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it