Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Working.

Swarnim Arun swarnimarun

🎯
Working.
View GitHub Profile
View godot_deform.shader
shader_type canvas_item;
render_mode unshaded;
uniform sampler2D tex : hint_albedo;
uniform float deform_amt : hint_range(-1,1);
uniform float deform_speed : hint_range(0.5,4);
uniform bool animate;
void fragment() {
float def_amt = deform_amt;
@swarnimarun
swarnimarun / return_yield.gd
Last active Jun 5, 2019
Examples of Yield Function uses in GDScript
View return_yield.gd
extends Node
func my_yielding_function():
print("Hello")
print(yield())
print("World")
func _ready():
var v = my_yielding_function()
v.resume("Awesome")
@swarnimarun
swarnimarun / loop_yield.gd
Created Jun 5, 2019
Yield GDScript Simple quiz
View loop_yield.gd
extends Node
func my_looper():
for x in 4:
yield()
print("I am %sx awesome" % x)
func _ready():
var v = my_looper()
@swarnimarun
swarnimarun / infinite_yield.gd
Last active Jun 5, 2019
Yield as the ultimate coroutine
View infinite_yield.gd
extends Node
func yielder():
print("Holla")
yield()
return yielder()
func returny_yielder():
print(yield())
return returny_yielder()
@swarnimarun
swarnimarun / notification.gd
Last active Jun 5, 2019
Using Yield GDScript for a Notifier Model
View notification.gd
extends Node
## NOTIFIER MODEL
class MyNotifier extends Object:
signal poke
func poke():
# this can even take arguments if you want to pass some
emit_signal("poke", "hello", "hi")
View vs_proposal.md

Proposal for Changes to Visual Scripting System

AIMS OF THE PROPOSAL

  • Moving towards modularity
  • Simplification and accessility for customization of the scripting system
  • Reloadable and Debuggable chunks
  • Cleaner and robust utilities while scripting

Primary Idea: Adding reusable Sub-Graphs/Scriptables to the Scripting System

@swarnimarun
swarnimarun / github_action_cpp_notes.md
Last active Jul 3, 2020
useful github actions for cpp projects
View github_action_cpp_notes.md
View gsoc2020-final-report.md
@swarnimarun
swarnimarun / tileset_generator.gd
Created Aug 14, 2018
Code from my video tutorial I made for auto-generation of Tilesets
View tileset_generator.gd
tool
extends Node
export(Texture) var texture
export var tileSize = Vector2(16, 16)
export var tiles_to_map = Vector2(0, 0)
export var generate = false
export(Script) var gen_script
func _process(delta):