▲ Recommended
0 hrs
It truly is just doing nothing, all the code is in a single file.
Here it is:
Edit: I never expected this 💩 post to actually become the top review lol.
For everyone wondering and asking questions in the comments I'll try and answer some.
- most of the file size of the game comes from the unity engine and its libraries. It's basically stripped down to the minimum, but could be stripped further with some engine optimizations
- I decompiled this using a program called ILSpy, which is free and can decompile most unity games as long as they were compiled with Mono and not IL2CPP
- yes there are inefficiencies and bugs in this code, but they really don't matter.
- yes this is technically not allowed and if the dev requested it, I would take it down. However, it's basically free advertising as there's really nothing worth keeping secret in this file. (If there was, they would've compiled it to IL2CPP to obfuscate)
All in all, this took about 30 seconds to do from downloading the game to posting the review. Try it out on some of your favorite unity games, it can be fun to see how they work. All the C# scripts get compiled into a file called CsharpAssembly.dll in the managed resources folder.
Here it is:
// Nothing
using TMPro;
using UnityEngine;
public class Nothing : MonoBehaviour
{
private enum GameState
{
NotStarted,
InProgress,
GameOver
}
private GameState currentState;
private float inactivityTime;
private float startupPeriod = 1f;
private float stateChangeTime;
public TMP_Text timerText;
private string nothingLabel = "<color=#FFFFFF>Nothing</color>";
private string somethingLabel = "<color=#000000>Something</color>";
protected bool didSomething
{
get
{
if (!Input.anyKeyDown && !Input.GetMouseButtonDown(0) && Input.touchCount <= 0 && !(Input.acceleration != Vector3.zero) && Input.GetAxis("Mouse X") == 0f)
{
return Input.GetAxis("Mouse Y") != 0f;
}
return true;
}
}
private void Start()
{
timerText.text = "Press any key to start doing " + nothingLabel + "\n";
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}
switch (currentState)
{
case GameState.NotStarted:
if (Input.anyKeyDown)
{
currentState = GameState.InProgress;
stateChangeTime = Time.time;
}
else if (Time.time >= startupPeriod)
{
timerText.text = "Press any key to start doing " + nothingLabel + "\n";
}
break;
case GameState.InProgress:
timerText.text = "You have been doing " + nothingLabel + " for\n" + TimeTextFormatted() + "\n";
inactivityTime += Time.deltaTime;
if (Time.time - stateChangeTime >= 1f && didSomething)
{
stateChangeTime = Time.time;
currentState = GameState.GameOver;
}
break;
case GameState.GameOver:
timerText.text = "You did " + somethingLabel + ", you lost\n You did " + nothingLabel + " for " + TimeTextFormatted();
if (Time.time - stateChangeTime >= 1f && Input.anyKeyDown)
{
ResetGame();
}
break;
}
}
private void ResetGame()
{
currentState = GameState.NotStarted;
inactivityTime = 0f;
timerText.text = "Press any key to start doing " + nothingLabel + "\n";
stateChangeTime = Time.time;
}
private string TimeTextFormatted()
{
int num = (int)inactivityTime;
int num2 = num / 86400;
num %= 86400;
int num3 = num / 3600;
num %= 3600;
int num4 = num / 60;
num %= 60;
string text = "";
if (num2 > 0)
{
text = text + num2 + ((num2 == 1) ? " day" : " days") + ", ";
}
if (num3 > 0)
{
text = text + num3 + ((num3 == 1) ? " hour" : " hours") + ", ";
}
if (num4 > 0)
{
text = text + num4 + ((num4 == 1) ? " minute" : " minutes") + ", ";
}
return text + num + ((num == 1) ? " second" : " seconds");
}
}
Edit: I never expected this 💩 post to actually become the top review lol.
For everyone wondering and asking questions in the comments I'll try and answer some.
- most of the file size of the game comes from the unity engine and its libraries. It's basically stripped down to the minimum, but could be stripped further with some engine optimizations
- I decompiled this using a program called ILSpy, which is free and can decompile most unity games as long as they were compiled with Mono and not IL2CPP
- yes there are inefficiencies and bugs in this code, but they really don't matter.
- yes this is technically not allowed and if the dev requested it, I would take it down. However, it's basically free advertising as there's really nothing worth keeping secret in this file. (If there was, they would've compiled it to IL2CPP to obfuscate)
All in all, this took about 30 seconds to do from downloading the game to posting the review. Try it out on some of your favorite unity games, it can be fun to see how they work. All the C# scripts get compiled into a file called CsharpAssembly.dll in the managed resources folder.
3890 found helpful
Steam ↗