Skip to content

Instantly share code, notes, and snippets.

View johnfredcee's full-sized avatar
🚀
On an intergalactic cruise

John Connors johnfredcee

🚀
On an intergalactic cruise
View GitHub Profile
@MrWen33
MrWen33 / vscode-clangd-ue.code-workspace
Last active November 11, 2024 12:28
.code-workspace template file for vscode clangd to work on unreal engine project
// Author: @MrWen33
//
// 0. Install Clang and add to your PATH
//
// 1. Replace "{YourUnrealEnginePath}" to your unreal engine absolute path.
// Replace "{YourProjectName}" to your project name
// Replace "{YourUprojectPath}" to your .uproject file absolute path
//
// 2. Open this file with vscode and run task "GenCompileCommands"
//
@ryanschmidtEpic
ryanschmidtEpic / subtract_actors.py
Created March 1, 2022 22:38
Sample UnrealEngine 5.0 Python Script for using Geometry Scripting to do a Boolean Subtract operation
#
# Unreal Engine 5.0 Python Script that takes in N >= 2 selected StaticMesh Actors,
# and subtracts Actors 1..N from the first Actor
#
import unreal
# output path and asset name (random suffix will be appended)
BooleanResultBasePath = "/Game/PythonBooleanTest"
BooleanResultBaseName = "PyBoolean"
@iUltimateLP
iUltimateLP / DynamicTexture.cpp
Last active November 10, 2024 02:24
Implements dynamic textures into Unreal Engine 4, which can be dynamically written at runtime using the fastest way possible: by directly manipulating the pixel buffer of the texture.
// DynamicTexture
#include "DynamicTexture.h"
// UTextures have a BPP of 4 (Red, Green, Blue, Alpha)
#define DYNAMIC_TEXTURE_BYTES_PER_PIXEL 4
void UDynamicTexture::Initialize(int32 InWidth, int32 InHeight, FLinearColor InClearColor, TextureFilter FilterMethod/* = TextureFilter::TF_Nearest*/)
{
// Store the parameters
@tavinstitute
tavinstitute / testing-narrative-and-text-games.md
Last active October 15, 2020 12:35
A brief overview of the work involved in testing complex narrative multimedia

Testing Large and Branching Narrative Entertainment

Overview

One of the most significant challenges in producing large works of text-driven multimedia is the work of testing. There’s a few basic reasons for that:

  • Games are designed in-flight, through iterative and playful processes, and so a pre-written set of test plans or user stories will invariably need further labor to keep pace with design.
  • Testing is easy to ignore in the context of deadlines.
  • Understanding and visualizing any narrative as a complex tree or directed acyclic graph, rather than a piece of “static” fiction which moves from A-Z (or א to ת, if you prefer), is extremely difficult. If this sounds hyperbolic, ask literally anyone who’s ever contracted with a VC-funded interactive televisual or multimedia startup.
  • Testing is subjectively different from programming in that nothing, not even the compiler, tells us whether we did it right. There’s no model, even in senior software engineering, which tells you whether your tests a
//------------------------------------------------------------------------------------------------------------------------------
// FOR USE IN VISUAL STUDIO IMMEDIATE WINDOW
//------------------------------------------------------------------------------------------------------------------------------
// Dump Blueprint Callstack (UE4 Editor Build)
{,,UE4Editor-Core}::PrintScriptCallstack()
// Dump Blueprint Callstack (UE5 Editor Build)
{,,UnrealEditor-Core}::PrintScriptCallstack()
(defun doit ()
;; This goes in INITIALIZE-COMPONENT
(let ((vao (gl:gen-vertex-array))
(vbo (gl:gen-buffer))
(buffer (static-vectors:make-static-vector
1 :element-type '(integer 0 255)
:initial-element 0)))
@shawngraham
shawngraham / historygen.py
Last active October 28, 2020 14:57
A History Generator; Also Does Timelines!
#!/usr/bin/env python
# source: https://gamedev.stackexchange.com/questions/23659/is-there-a-way-to-procedurally-generate-the-history-of-a-world
# to create a visualisation, run like this:
# ./historygen.py --dot | dot -Tpng > filename.png
# brew install graphviz to get the dot files rendering
# to have the story, run like this:
# ./historygen.py
# have your state names in the names.txt file
# now, all of this *could* be done with tracery i suppose, but you can see the bones of the
# history system could be expanded to model other aspects, keep track of things, calculate new things.