Skip to content

Instantly share code, notes, and snippets.

View anuraghazra's full-sized avatar
:electron:
Learning

Anurag Hazra anuraghazra

:electron:
Learning
View GitHub Profile

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

// Turn all HTML <a> elements into client side router links, no special framework-specific <Link> component necessary!
// Example using the Next.js App Router.
import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
function useLinkHandler() {
let router = useRouter();
useEffect(() => {
let onClick = e => {
@fabiospampinato
fabiospampinato / fast-npm-run.sh
Last active March 27, 2024 16:38
20x faster replacement for "npm run"
# 20x faster replacement for "npm run"
# - It supports scripts executing a built-in shell function
# - It supports scripts executing a binary found in PATH
# - It supports scripts executing a binary found in node_modules
# - It supports passing arguments and options to scripts
# - It supports reading scripts either via ripgrep (fast) or via jq (slower, but safer)
# - It adds ./node_modules/.bin to the $PATH
# - It handles gracefully when a script has not been found
# - It handles gracefully when "&", "&&", "|", "||", or ENV variables are used, falling back to "npm run"
@horacioh
horacioh / README.md
Last active January 11, 2023 16:38
Simple Typescript package setup

Dead Simple package setup for Typescript

Steps

  1. Initial project folder setup:
mkdir mypackage                   # Create a new folder for your package
cd mypackage
pnpm init # Create a brand new package.json
@jacob-ebey
jacob-ebey / client-navigation.js
Created January 11, 2023 00:53
Navigation and View Transition API example
import { html } from "html-tagged";
export default function ClientNavigation() {
return html`
<script type="module">
if (typeof navigation !== "undefined") {
let lastAbortController;
navigation.addEventListener("navigate", (event) => {
if (!event.canIntercept) return;
@dryan
dryan / ci.yml
Created December 22, 2022 19:44
GitHub Actions workflow that queries EC2 for a list of instances with a specified tag name and value, gets those IP addresses, then sends a command via ssh to them
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
deploy:
@pesterhazy
pesterhazy / building-sync-systems.md
Last active June 20, 2024 00:03
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@sno2
sno2 / fast-string-type-length.ts
Created August 15, 2022 21:54
A fast string length implementation in the TypeScript type system
/**
* A logarithmic string length algorithm in the TypeScript type system utilizing
* a memoizing recursive type. Computes the length of any string with far
* superior performance than any other current implementations via a doubling
* cache and string patterns backing the checks. Works for any string with less
* than 10,000 characters due to the tuple size limits for the cache (in total).
*
* @author Carter Snook <cartersnook04@gmail.com> github.com/sno2
* @license https://unlicense.org/ (credit would be nice tho)
*/
@raysan5
raysan5 / raylib_vs_sdl.md
Last active June 20, 2024 23:50
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