Skip to content

Instantly share code, notes, and snippets.

@jamesu
jamesu / Dockerfile
Created February 19, 2024 23:15
Generic build env
FROM ubuntu:latest
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -y build-essential cmake libsdl2-dev libsdl2-mixer-dev libogg-dev libopenal-dev
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*
@jamesu
jamesu / STB Font Prototype Code
Last active January 22, 2024 13:42
SDF Font Code prototype
AUTHORS
James S Urquhart (jamesu@gmail.com)
#
# Simple script - Print out pseudo-code for glTexGen* states
#
# Author: James Urquhart, jamesu@gmail.com
#
# Put your code in the doCode at the end of the file.
#
require 'json'
GL_TEXTURE_2D = 1

Critiques of MatrixNode

  • Feels a little too heavy for a "node" class. My generic in-head idea is to provide a lightweight abstraction over existing stuff in order to compliment it
  • Doesn't seem to allow for scaling ranges which some animations use, though may be impractical to implement anyway

NodeTransforms:

  • Feels hard to read - why do we need links etc?
  • NodeTransforms::NodeTransforms constructors - whats itterative do?
//
// Copyright (c) 2014 James S Urquhart. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
@jamesu
jamesu / main.go
Created October 22, 2021 01:07
Experiment getting gitlab runner to run jobs without gitlab
package main
import (
"fmt"
"net/http"
"log"
"os"
"io/ioutil"
"encoding/json"
b64 "encoding/base64"
@jamesu
jamesu / marble.cpp
Last active November 22, 2020 16:03
marble.cpp
/*
Reverse Engineered MarbleBlast Marble class attempt
TODO: pretty much everything
*/
class MarbleData : public ShapeBaseData
{
private:
typedef ShapeBaseData Parent;
@jamesu
jamesu / decrypt_onverse.rb
Last active February 1, 2019 21:12
Decrypt Onverse script files
# Decrypts and prints a rudimentary decompilation of onverse script files
# Usage: ruby decrypt_onverse.rb in.cs
#
require 'json'
$is_encrypted = true
def decrypt_data(size, data)
if !$is_encrypted
return data
Tribes 1 Model Formats
----------------------
Tribes 1 uses file formats which are similar to file formats used in the Torque Game Engine, with the major difference being more use of tags and versioned objects serialized by class name (working on the same basic principle of class instantiation in torques' console system). Also a lot more emphasis on paletted textures.
Currently this document only covers enough to render .dts and interior (.dig,.dis,.dil) shapes present in Tribes 1. For tribes 2 file formats, your best bet is to check out the earlier torque code.
We'll refer to each field as [type] [name or tag value]. If successive fields need to be at a specific offset indicated by a field, that will be noted with "@nameOffset:" where appropriate. In addition if there is a list of typed data, it will be listed as "type[size]:" followed by the fields of that type.
@jamesu
jamesu / TorqueVisRules.natvis
Created April 3, 2018 16:22
Torque3D vis rules for Visual Studio
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Vector&lt;*&gt;">
<DisplayString>{{ size={mElementCount} }}</DisplayString>
<Expand>
<Item Name="[size]" ExcludeView="simple">mElementCount</Item>
<Item Name="[capacity]" ExcludeView="simple">mArraySize</Item>
<ArrayItems>
<Size>mElementCount</Size>
<ValuePointer>mArray</ValuePointer>