Skip to content

Instantly share code, notes, and snippets.

View petrocket's full-sized avatar
💥
Trying not to cross the streams

Alex Peterson petrocket

💥
Trying not to cross the streams
View GitHub Profile
@petrocket
petrocket / GameResources.md
Last active September 10, 2023 00:22
Game Resources & Assets
@petrocket
petrocket / O3DE_Mac_Setup.md
Last active July 10, 2023 19:16
O3DE Mac Setup Instructions
  1. Install Xcode and make sure the Xcode command line tools are installed via Xcode > Preferences > Locations > Command Line Tools
  2. Install Homebrew
  3. Install Git LFS and CMake
brew install git-lfs
git lfs install
brew install cmake
  1. Clone the repo
@petrocket
petrocket / O3DE Fastbuild HowTo.md
Last active June 29, 2023 03:40
O3DE CMake Fastbuild HowTo

Download FASTBuild and make sure the binaries including the FBuildWorker are in your PATH.

Clone and build CMake with FASTBuild generator support from https://github.com/petrocket/CMake/tree/fastbuild

git clone https://github.com/petrocket/CMake --branch fastbuild
cd CMake
"c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake -S . -B build
cmake --build build --config release --target cmake
@petrocket
petrocket / make_build.bat
Created March 3, 2023 04:15
Lumberyard 1.28 Build Export Script
@ECHO OFF
SETLOCAL enableextensions ENABLEDELAYEDEXPANSION
REM set the current directory to where this script is located
pushd %~dp0
SET VERBOSE=0
IF "%~1"=="" (SET VERBOSE=1)
REM verify we have a Bin folder ot copy from
@petrocket
petrocket / O3DEGameJamSetup.md
Last active June 26, 2022 05:00
O3DE GameJam Solo Setup

Setup

  1. get latest o3de
  2. create project using script scripts\o3de.bat create-project -pp path/to/project
  3. cd into project folder
  4. (optional)edit IMGUI cmake so IMGUI is availabe in release build - change IMGUI_DISABLED to IMGUI_ENABLED
  5. configure and build project-centric so all binaries are in project build folder
  6. run editor and create a game level e.g. game.prefab
  7. edit autoexec.cfg with something that loads the level, turns off debug text and enters fullscreen
loadlevel game
@petrocket
petrocket / deploy-lfs-service.yml
Last active August 11, 2020 02:31
AWS CloudFormation template to stand up a serverless LFS service using API Gateway, Lambda, S3 and SecretsManager
AWSTemplateFormatVersion: 2010-09-09
#
# This AWS CloudFormation template will set up a serverless LFS service using
# API Gateway, S3 for storage, Lambda and SecretsManager for credentials.
# It will also create a few IAM roles.
# When deployed you will be able to use your git lfs endpoint using
# the API Gateway endpoint which will look like this
#
# https://example.execute-api.us-west-2.amazonaws.com/lfs
#
@petrocket
petrocket / lfs-lambda-function.py
Created August 9, 2020 23:08
Single file AWS Lambda serverless LFS service using S3 for object store and SecretsManager for credentials
import json
import boto3
from botocore.exceptions import ClientError
from botocore.client import Config
import json
from base64 import b64decode
import logging
import os
@petrocket
petrocket / nodejs_sequential.js
Last active August 9, 2020 21:59
NodeJs Sequential Promises
// a list of sequential tasks (promises)
var sequentialTask1 = []
sequentialTask1.push((result)=>{
return new Promise( (resolve,reject) => {
console.log('sequential task 1 a with 2 seconds delay ...');
setTimeout(resolve, 2000);
});
});
sequentialTask1.push((result)=>{
return new Promise( (resolve,reject) => {
@petrocket
petrocket / tri-planar-sphere.fx
Created April 2, 2014 01:25
NVidia FX Composer Tri-Planer Sphere
/************* UN-TWEAKABLES **************/
float4x4 WorldITXf : WorldInverseTranspose < string UIWidget="None"; >;
float4x4 WvpXf : WorldViewProjection < string UIWidget="None"; >;
float4x4 WorldXf : World < string UIWidget="None"; >;
float4x4 ViewIXf : ViewInverse < string UIWidget="None"; >;
float3 Lamp0Pos : Position <
string Object = "PointLight0";
string UIName = "Lamp 0 Position";
string Space = "World";
@petrocket
petrocket / GameKeyboardInterface.h
Created April 2, 2014 00:21
Game Keyboard Interface
void setKeyboardVisible(bool visible);
void setKeyboardVisible(bool visible, const std::string& text);