Skip to content

Instantly share code, notes, and snippets.

@gamesbyangelina
Created August 28, 2025 20:20
Show Gist options
  • Select an option

  • Save gamesbyangelina/4bd9321d26de57c33cd94de7df5d39aa to your computer and use it in GitHub Desktop.

Select an option

Save gamesbyangelina/4bd9321d26de57c33cd94de7df5d39aa to your computer and use it in GitHub Desktop.
Run Specification: Breakout
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameFeelDescriptions.Examples;
public class BreakoutRunSpec : RunSpec
{
public BreakoutRunSpec(){
this.runsPerSolution = 1;
}
public override void OnRunStart(int run){
//Consistent seed between runs
UnityEngine.Random.InitState(0);
//Activate the autoplayer
paddleBehavior.instance.ballFollow = true;
ballBehavior.instance.ballReady = false;
}
public override void OnRunComplete(int run){
}
public override float ScoreRun(int run){
//Rating is just player score, capped at 400, and normalised
return Mathf.Min(increaseScore.instance.currentScore/400f, 1f);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment