
Anything Throws was a college project about tossing miscellaneous objects into a wall using a trebuchet. The project was designed to be completed within a semester.
This project started during my 3rd year in college. This first step was a pitch meeting, and the best pitch would be the basis of the project. This was my pitch, and I was made the de facto project lead when it was selected.
Besides my leadership role, I also hand-wrote most of the code for the gameplay mechanics.
Item Interaction

The core system of the game. I set this up to be as adaptable as possible, allowing for multiple possibilities that were never realized during development. Special behaviors, such as objects breaking into smaller pieces and barrels that contained more objects, were planned but never implemented in the final product.
Any object can be made interactable with one behavior script, which the player camera checked for on any game entity in the middle of the screen.
Code Snippet
By default, interactables have a sound and an outline, which is enabled whenever it enters the middle of the player’s view.
[RequireComponent(typeof(Collider))]
public abstract class Interactable : MonoBehaviour
{
public GameObject outline;
public AudioClip interactSound;
Collider m_Collider;
void Start()
{
m_Collider = GetComponent<Collider>();
}
public virtual void OnHover()
{
outline.SetActive(true);
Debug.Log("This item does not override OnHover");
}
public virtual void OffHover()
{
outline.SetActive(false);
Debug.Log("This item does not override OffHover");
}
public virtual int OnInteract()
{
Debug.Log("This item does not have a definition for OnInteract");
return 0;
}
}
Item Launching
The trebuchet functions are tied to the animation player, so that certain events occur during the animation. Once launched, objects enter a special layer to interact with the wall.
The github page for this project is publicly available at https://github.com/TristanPhilp/Anything-Throws-Project
Leave a comment