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
################################################################################ | |
# cellular automata based off of | |
# https://gamedevelopment.tutsplus.com/tutorials/generate-random-cave-levels-using-cellular-automata--gamedev-9664 | |
################################################################################ | |
import random | |
import gen_ids, settings | |
{.experimental: "codeReordering".} | |
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
type | |
BaseButton* = ref object of Widget | |
mouse_over*:bool | |
hit_on_release*:bool | |
is_toggle*:bool | |
is_pressed*:bool | |
style:ButtonStyle | |
is_hovered:bool | |
is_down:bool |
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 strformat | |
type | |
WidgetKind = enum | |
Frame, Separator, Header, Label, Button | |
ButtonKind = enum | |
IconButton, TextButton | |
type Widget* = ref object | |
id*:int |
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
class Stopwatch: | |
var start_time = 0 | |
var stop_time = 0 | |
var counting = false | |
func start(): | |
counting = true | |
stop_time = 0 | |
start_time = OS.get_ticks_msec() | |
print(" --- Starting stopwatch at: %d ---" % [start_time] ) |
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
######################################################################### | |
# script attached to HelperPlanes.tscn, which contains: | |
# HelperPlanes - Spatial | |
# H_Helper - Area with input_event connected to the root Spatial (HelperPlanes) | |
# CollisionShape - containing a PlaneShape set to horizontal (everthing default) | |
# V_Helper - Area with input_event connected to the root Spatial (HelperPlanes) | |
# CollisionShape - containing a PlaneShape set to vertical (x=0, y=0, Z=1, d=0) | |
# | |
# Areas are not 'monitoring' or 'monitorable'. | |
######################################################################### |
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
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= | |
# Immediate Geometry Tool (0.7) | |
# | |
# experimental WIP | |
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= | |
extends Spatial | |
class_name IGTool | |
enum {A,B,C,D,E,F,G,H} # cube vertex indices |
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 KinematicBody | |
onready var head := $Head | |
onready var camera := $Head/Camera | |
onready var weapon := $Weapon | |
onready var frob_ray := $Head/Camera/FrobRay | |
onready var coll_stand := $CollisionStand | |
onready var coll_crouch := $CollisionCrouch |
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
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= | |
# Builds grid lines, grid bounds and x,y,z axis lines, using three meshes | |
# | |
# Attach this script to a 3D scene like: | |
# GridManager (Spatial) | |
# Grid (Spatial) | |
# Origin (Spatial) | |
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= | |
extends Spatial |
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 Node | |
class_name FOV_MRPAS | |
# TODO: static typing | |
var _circle_array := [] # to contain a mask to make fov rounded | |
var last_radius := 0 # to check if circle mask needs to be re-built | |
var map |
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
#******************************************************************************************* | |
# | |
# raylib [models] example - first person maze | |
# | |
# This example has been created using raylib 2.5 (www.raylib.com) | |
# raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) | |
# | |
# Copyright (c) 2019 Ramon Santamaria (@raysan5) | |
# | |
#*******************************************************************************************/ |
OlderNewer