Skip to content

Instantly share code, notes, and snippets.

@raysan5
raysan5 / raylib_vs_sdl.md
Last active April 27, 2025 11:52
raylib vs SDL - A libraries comparison

raylib_vs_sdl

In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.

Hope it helps future users to better understand this two libraries internals and functionality.

Table of Content

@aerosoul94
aerosoul94 / dc-disassemble.py
Last active November 14, 2024 17:05
The Last of Us script disassembler
import struct
import sys
import re
import os
#
## StringId Generation
#
def create_table(poly):

你可能其實不懂繼承 - 什麼是 Covariance 跟 Contravariance

在近代高等程式語言快(ㄏㄨˋ)速(ㄒ一ㄤ)演(ㄔㄠ)化(ㄒㄧˊ)的狀況下,很多 strong type 的程式語言都開始有了 generic 的設計, 舉例來說:

(這只是大略分類)

  • Mobile: Swift, Kotlin
  • Frontend: Flowtype, TypeScript
  • 後端語言:Python (pyre), Scala, C#, Java (沒錯!現在連 Java 都有)
@Horusiath
Horusiath / Fibers.cs
Created November 24, 2019 22:09
Minimal example of working async method builder
using System;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Threading;
namespace Fibers
{
public struct AsyncFiberMethodBuilder<T>
{
private Fiber<T>? fiber;
@sabresaurus
sabresaurus / ConsoleCallStackHelper.cs
Last active May 2, 2020 09:56
Jump to file/line in the Unity console window callstack via this helper window
// MIT License
//
// Copyright (c) 2018 Sabresaurus
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@mafaca
mafaca / UnityStructGen.cpp
Last active December 24, 2024 04:15
Unity 2017.3.0f3 type information
// UnityStructGen - Dump the Unity Runtime base type info
// Compile with /MT(d), NOT /MD(d) (i.e. use static-linked runtime)
// Tested with VS2015 x64.
//
// To use:
// Compile Inject.cpp:
// $ cl /O2 /Zi /MT Inject.cpp
// Compile UnityStructGen.cpp:
// $ cl /O2 /Zi /MT /LD UnityStructGen.cpp
//
@valyard
valyard / TestWindow.cs
Created November 6, 2017 01:06
Export current profiler frame to Chrome Trace Event Format
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditorInternal;
using System;
using System.Text;
using System.IO;
public class TestWindow : EditorWindow
@idbrii
idbrii / botw-cedec2017.md
Last active January 29, 2025 23:58
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo

本文件主要係提供使用公共運輸整合流通服務平臺(Public Transport Data eXchange)各項資料服務加值業者,在程式開發過程中常見問題的處理方式及資料使用的注意事項,使開發者能更快速地掌握PTX APIs的資料特性,並避免在旅運加值應用上資料運用錯誤。

【平臺使用會員分級說明】

交通部公共運輸整合資訊流通服務平臺會員將分為網站會員及API會員,API會員將細分為一般會員進階會員專案用戶;請詳見下列會員權益說明

更多申請會員FAQ請參閱連結