Skip to content

Instantly share code, notes, and snippets.

View MrEliptik's full-sized avatar
🎯
Focusing

Victor Meunier (MrEliptik) MrEliptik

🎯
Focusing
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

@DaelonSuzuka
DaelonSuzuka / Example.gd
Last active February 16, 2022 15:22
MenuButton.gd
extends Control
# ******************************************************************************
onready var MenuButton = find_node('MenuButton')
# ******************************************************************************
func _ready():
# Add an optional callback when you create a menu item
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active June 28, 2024 15:48
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.
@mtimkovich
mtimkovich / gif_animatedtexture.py
Created February 28, 2019 23:27
Break a GIF into its PNG frames and create a AnimatedTexture .tres for them.
import argparse
import os
from PIL import Image
parser = argparse.ArgumentParser(
description='Convert GIF into frames and then create '
'AnimatedTexture .tres')
parser.add_argument('gif', help='GIF to process')
args = parser.parse_args()
@vctr-uniq
vctr-uniq / shake_camera.gd
Last active May 8, 2024 09:57
Godot Engine - Shake 3D camera script
# usage example:
# curr_camera.shake(0.25, 40, 0.2)
extends Camera
var duration = 0.0
var period_in_ms = 0.0
var amplitude = 0.0
var timer = 0.0
var last_shook_timer = 0
@henriquelalves
henriquelalves / fisheyeeffect
Last active August 14, 2021 09:45
Godot Shader for FishEye 2D effect
// Based on http://www.geeks3d.com/20140213/glsl-shader-library-fish-eye-and-dome-and-barrel-distortion-post-processing-filters/2/
float PI = 3.1415926535;
uniform float BarrelPower;
vec2 distort(vec2 p) {
if(p.x > 0.0){
float angle = p.y / p.x;
float theta = atan(angle);
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active April 26, 2024 19:09
Using Git to Manage a Live Web Site

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@dmarx
dmarx / LinkFixerClone.py
Last active January 19, 2021 02:20
A simple LinkFixerBot clone developed as a demonstration for anyone who is curious how a simple reddit bot might be coded. To kill this code, spam "Ctrl+C" until it catches the exception.
import praw # simple interface to the reddit API, also handles rate limiting of requests
import re
from collections import deque
from time import sleep
USERNAME = "Your username here"
PASSWORD = "Your password here"
USERAGENT = "Your useragent string here. It should include your /u/username as a courtesy to reddit"
r = praw.Reddit(USERAGENT)