This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type canvas_item; | |
uniform float scale = 0.0; | |
uniform float max_scale = 10.0; | |
uniform float intensity = 2.0; | |
void fragment() { | |
vec2 offset = SCREEN_PIXEL_SIZE * scale; | |
offset.y = 0.0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import subprocess | |
import discord | |
import version | |
BUILDDIR = '/home/john/code/games/gravity/build' | |
STEAM_COMMAND = '/home/john/code/games/gravity/build/sdk/tools/ContentBuilder/builder_linux/steamcmd.sh' | |
STEAM_APP_CONFIG = '/home/john/code/games/gravity/build/sdk/tools/ContentBuilder/scripts/app_build_1003860.vdf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
BUILDDIR = '/home/john/code/games/gravity/build' | |
CHANGELOG = '/home/john/code/games/gravity/changelog.md' | |
def get_changelog(): | |
f = open(CHANGELOG, 'r') | |
n = 0 | |
log = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import configparser | |
import os | |
VERSION_FILE = '/home/john/code/games/gravity/game/version.cfg' | |
GITDIR = '/home/john/code/games/gravity/game' | |
''' | |
Fix for fatal: not a git repository: '.git' | |
Removed all os.chdir() statements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import version | |
import subprocess | |
import os | |
GODOT = '/home/john/apps/godot/godot3' | |
BUILDDIR = '/home/john/code/games/gravity/build' | |
PROJECT = '/home/john/code/games/gravity/game' | |
OPTIONS = ['--no-window', '--resolution', '640x360'] # --no-window doesn't work on linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gd_resource type="SpatialMaterial" load_steps=2 format=2] | |
[ext_resource path="res://mask/transparent.png" type="Texture" id=1] | |
[resource] | |
albedo_texture = ExtResource( 1 ) | |
metallic = 0.42 | |
metallic_specular = 0.76 | |
roughness = 0.3 | |
emission_enabled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a function for capturing screenshots with GDScript | |
func screenshot(): | |
# Capture the screenshot | |
var size = OS.window_size | |
var image = get_viewport().get_texture().get_data() | |
# Setup path and screenshot filename | |
var date = OS.get_datetime() | |
var path = "user://screenshots" | |
var file_name = "screenshot-%d-%02d-%02dT%02d:%02d:%02d" % [date.year, date.month, date.day, date.hour, date.minute, date.second] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cameraShakeIntensity = 0.0 | |
var cameraShakeDuration = 0.0 | |
func shake(intensity, duration): | |
if intensity > cameraShakeIntensity and duration > cameraShakeDuration: | |
cameraShakeIntensity = intensity | |
cameraShakeDuration = duration | |
func _physics_process(delta): | |
# Camera shake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extends PinJoint2D | |
var rotation_fix = 0 | |
# Connect both bodies to the joint, save the relative rotation, and | |
# connect signals to disconnect the joint if either body is deleted | |
func connect_bodies(body1 : PhysicsBody2D, body2 : PhysicsBody2D): | |
node_a = body1.get_path() | |
node_b = body2.get_path() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type canvas_item; | |
uniform vec2 camera_pos; | |
uniform vec2 camera_zoom; | |
uniform vec2 viewport_size; | |
uniform vec2 viewport_size_override; | |
uniform sampler2D normal_tex : hint_normal; | |
uniform sampler2D noise_tex; |
OlderNewer