Skip to content

Instantly share code, notes, and snippets.

View devsleeper's full-sized avatar

djames devsleeper

  • British Columbia, Canada
View GitHub Profile
@devsleeper
devsleeper / SPSCQueue.cs
Last active June 16, 2026 02:16
FIFO lock-less SPSC queue (unity 2022+)
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using JetBrains.Annotations;
using Unity.Collections.LowLevel.Unsafe;
/// <summary>
/// Simple Single-Producer Single-Consumer (SPSC) FIFO queue with batching support.
///
@devsleeper
devsleeper / Recursive Backtrack Maze Algorithm
Created June 1, 2022 04:17
A (Unty) C# Conversion of the C++ Recursive Backtrack Algorithm provided by javid9x
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SimpleMazeGenerator : MonoBehaviour
{
public GameObject WallPrefab;
public GameObject FloorPrefab;
public GameObject CenterPrefab;