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
package main | |
import "core:fmt" | |
import "core:mem" | |
import rl "vendor:raylib" | |
Screen :: struct { | |
img : rl.Image, |
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_name DrawTool3DMesh extends Spatial | |
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= | |
# DrawTool3DMesh 0.7.3 (Godot 3) | |
# | |
# Uses a MultiMeshInstance to draw instances of a cube or cylinder, | |
# stretched to represent lines, and spheres for 3D points. | |
# For each line AB, scale an instance of a cube in one axis to equal the | |
# distance from A to B, and then rotate it accordingly using | |
# 'transform.looking_at()'. |
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
const vec3 WHITE = vec3(1.0); | |
const vec3 BLACK = vec3(0.0); | |
uniform vec2 grid_size = vec2(80.0, 50.0); // size of the terminal grid | |
uniform vec2 tileset_size = vec2(16.0, 16.0); // size of the font image or tileset image | |
uniform float cw = 20.0; // cell width | |
uniform float ch = 20.0; // cell height | |
uniform Image tileset; // the bitmap font image or tileset image |
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() is a custom made relative-require function | |
local Class = import("lib/middleclass/middleclass", ...) | |
local ClassProperties = import("lib/middleclass/class_properties", ...) | |
local BaseConsole = import("console_base", ...) | |
local palette = import("palette", ...) | |
local db = import("database", ...) | |
local ml = import("main_loop", ...) | |
local vec = import("lib/vec2", ...) | |
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 | |
# UI = ref object | |
include ../prelude | |
import ../terminal | |
import ../lib/rexnim | |
import theme | |
import tables, sequtils | |
import strutils |
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 rlw | |
import cell | |
import colors | |
import tileset | |
import vector2 # my own Vector struct | |
import rect | |
import nimex | |
import vertex # my own Vertex struct | |
import raylib/rlgl | |
# import common |
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) | |
# | |
#*******************************************************************************************/ |
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
#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#= | |
# 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 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 |
NewerOlder