Skip to content

Instantly share code, notes, and snippets.

@BrastenXBL
BrastenXBL / pixel_game_with_gui_hd.tscn
Created July 14, 2024 05:21
An example of setting up a Godot scene for a Pixel game with higher resolution GUI.
[gd_scene load_steps=5 format=3]
[sub_resource type="Gradient" id="Gradient_8q6eo"]
offsets = PackedFloat32Array(0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1)
colors = PackedColorArray(0, 0, 0, 1, 1, 0, 0, 1, 1, 0.6, 0, 1, 0.8, 1, 0, 1, 0.2, 1, 0, 1, 0, 1, 0.4, 1, 0, 1, 1, 1, 0, 0.4, 1, 1, 0.2, 0, 1, 1, 1, 0, 0.6, 1, 1, 0, 0.0166664, 1)
metadata/_snap_enabled = true
[sub_resource type="GradientTexture2D" id="GradientTexture2D_qsl38"]
gradient = SubResource("Gradient_8q6eo")
width = 160
Getting better help -video, and a form to fill to format the request.
https://www.youtube.com/watch?v=HBJg1v53QVA , https://school.gdquest.com/guides/get_answers
A general Bug Report template, fill as many as apply:
Godot Version:
Render Mode:
@BrastenXBL
BrastenXBL / ae.gd
Created July 5, 2024 00:50
An Autoload hack for Godot Android editor to pre-test for NULL crashes.
class_name GodotAndroidEditorRuntimeErrorDebugger
extends Node
## Singleton(Autoload) containing global helper methods for the Android Editor.
##
## This class is intended to be used as a Singleton(Autoload), the [code]gdaererrd[/code] plug-in will
## automatically add [code]aerr[/code] as an Autoload. The Singleton name and method names are
## intended for easy typing on QWERTY digital keyboards found on phones and tablets.[br]
## [br]
## Use [code]aerr.t(arg)[/code] to test if a single variable is_instance_valid().[br]
## Failure will cause the program to print the error to console Output.
extends Button #replace with other BaseButton classes as needed
@export var action : StringName
@export var feedback : bool = true
func _input(event):
if event.is_action_pressed(action):
accept_event()
var toggle_mode_default
if feedback: