Skip to content

Instantly share code, notes, and snippets.

View DearthDev's full-sized avatar

Nathan Dearth DearthDev

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode, System.Serializable]
public abstract class Rail : MonoBehaviour
{
[SerializeField] public RailMaterial material;
[HideInInspector, SerializeField] protected List<Segment> segments = new();
# This file contains a series of functions used to control a volleyball for a
# beach volleyball game. The game's design required a solution that allowed
# accuracy and strength be different for each character. The scripts rely on
# algebra to meet the games design requirements and allow animations to line
# up with the ball when being hit.
# The player or AI aims where they want to hit the ball and this function finds
# how best to hit the ball to reach that part of the court.
// A pathfinding algorithm with a novel change to the path simplification algorithm
// to make for more believable crowd simulations.
// While traditional methods for pathfinding on navigation meshes work great for
// individual agents, they have problems with crowds. Since all agents try to
// follow the same shortest path from one point to another, agents end up
// in traffic jams, funneling towards single points and in single file lines.
// My algorithm returns a simplified set of triangle edges to walk through instead of a
// Audio library made in a single header library style for my game engine.
#pragma once
struct Sound {
u32 frameCount;
i16 *samples;
};