No worries, that's okay! I'm on a Mac, so I totally get it! Thanks for at the least feedback on the pictures! :D
Josh McMillan
Creator of
Recent community posts
I understand there’s many controversies over this subject matter, particularly in the world of asset creation. Is it acceptable to use AI tools in the creation of the games, or should all assets be custom?
Typically, I utilize the free Chat-GPT when trying to break apart and understand complex mechanics and story concepting, while very rarely using AI for asset creation.
I see both up and downsides to AI usage and wanted to clarify per the “attribution” rule on premade assets.
Thanks!
Here's the corrected code ;P
using UnityEngine;class M:MonoBehaviour{}using UnityEngine;class H:M{public bool h;public Rigidbody R;public Transform T;public Animator A;void OnTriggerEnter(Collider c){if(c.tag!="p")return;if(h){R.velocity=Vector3.zero;R.position=T.position;}else{A.SetTrigger("r");}}}using UnityEngine;class G:M{public Rigidbody R;public float S;public Transform C;void FixedUpdate(){R.AddForce(new Vector3(Input.GetAxis("h"),0.0f,Input.GetAxis("v"))*S);C.position=transform.position;}}
I've done it. Here's the code for my game now!
using UnityEngine;class M:MonoBehaviour{}using UnityEngine;class H:M{public bool h;public Rigidbody R;public Transform T;public Animator A;void OnTriggerEnter(Collider c){if(c.tag!="p")return;if(h){R.velocity=Vector3.zero;R.position=T.position;}else{A.SetTrigger("r");}}}using UnityEngine;class G:M{float i(string a)=>Input.GetAxis(a);public Rigidbody R;public float S;public Transform C;void FixedUpdate(){R.AddForce(new Vector3(i("h"),0.0f,i("v"))*S);C.position=transform.position;}}
And here's each individual script broken out:
// MonoBehaviour wrapper (to avoid repeating such a long inheritence)
using UnityEngine;
class M:MonoBehaviour
{
}
// Hole/Story Object (This is a two-object script. One handles entering a trigger and teleporting the player which is the hole, the other shows an animation whenever a trigger is entered.)
using UnityEngine;
class H : M{
public bool h;
public Rigidbody R;
public Transform T;
public Animator A;
void OnTriggerEnter(Collider c) {
if (c.tag != "p") return;
if (h) {
R.velocity = Vector3.zero;
R.position=T.position;
}
else
{
A.SetTrigger("r");
}
}
}
// And this is the player controller, which captures input using a small macro optimization
using UnityEngine;
class G : M {
public Rigidbody R;
public float S;
public Transform C;
void FixedUpdate() {
R.AddForce(new Vector3(Input.GetAxis("h"),0.0f,Input.GetAxis("v"))*S);
C.position=transform.position;
}
}
... I just did the math. I was wrong. I did my input wrong, complicated it, and added characters. The NEW character count is now 473, down from 488. Still, super excited to finally have mechanics! Now to build a game :P
In the end, I gutted the whole "golf controller" style for directly controlling the golf ball rolling (which is oddly similar to Unity's primary tutorial, Roll-a-Ball), which yielded a lot more fun ideas and results.
You can also use a wrapper for the MonoBehaviour class like this : using UnityEngine;public class M:MonoBehaviour{}, and that helps greatly cut down the number of characters used from 50 to merely 19 per script, doubling the theoretical number of scripts with only a 37 character penalty in doing so. For multiple scripts, this is the way to go.
If anyone is curious about the code for the Simon Says game, here it was (it literally ran everything from animations to logic and input):
using System.Collections;using System.Collections.Generic;using UnityEngine;class G:MonoBehaviour{[SerializeField]Animator a;List<int> s=new List<int>();bool p;void Start(){StartCoroutine("l");}bool k(string i)=>Input.GetButtonDown(i);void q(int c){a.SetTrigger(c);}IEnumerator l(){while (!p){yield return new WaitForSeconds(0.5f);int val=Random.Range(1,5);s.Add(val);q(val);foreach (var i in s){int c=0;while (c==0){if (k("R")) c=1;if (k("G")) c=2;if (k("Y")) c=3;if (k("B")) c=4;yield return null;}q(c);if (i!=c){p = true;break;}}}}
So far, I've made two attempts at this challenge with Unity. The main issues you run into are:
- Every MonoBehaviour you create costs an immediate 50 characters for boilerplate alone. This includes the class definition and referencing the through "using UnityEngine;"
- Storing components using GetComponent are very expensive character-wise. Direct references or using SerializedFields are much cheaper by comparison.
- Your most expensive code calls will be to the engine. Best practice would be to create a single character wrapper method for the engine call if it is used more than once (just once can be left as that's the minimum characters you can make - a wrapper would be more expensive in that case.
The two games I attempted were:
- An overly ambitious tank game (very impractical, didn't get far), and
- A nearly complete Simon Says game, complete with animations (boilerplate code brought the codebase to 530 characters, a massively strong attempt!)
So the last attempt I'll make is a mini-golf game, that 1) a single script that 2) uses a wrapper method for input, no calls to System.Collections.Generic (what killed my Simon Says game), and 3) heavily utilize physics and animations (native to engine, need few calls if any)
I'm currently working on a game in Unity, not an easy task. I did employ the use of ChatGPT to help prototype the core structure of my game (Simon Says, because why not?)
The results are incredible. It made every change I wanted, and even removed whitespace when asked. It complained about the code not being readable, but I guess that's not the point of this jam ;)
using System;using System.Linq;namespace SimonSaysGame{class P{static void Main(string[] a){Console.WriteLine("Welcome to Simon Says!");int[] s = new int[1];s[0] = R();Console.WriteLine("Simon says: " + string.Join(", ", s));Console.WriteLine("Repeat the sequence one color at a time (1 = red, 2 = green, 3 = blue, 4 = yellow):");for (int i = 0; i < s.Length; i++){Console.Write($"Color #{i+1}: ");int p = int.Parse(Console.ReadLine());if (p != s[i]){Console.WriteLine("Game over!");return;}}Console.WriteLine("You win!");}static int R(){Random r = new Random();int n = r.Next(1, 5);return n;}}}
Overall, not bad stuff. It did every request I ask, and it came out to 572 characters long (probably long due to the Console.Writelines and strings associated with them). Overall, I'm impressed, still needs a massive amount of engineering in order to get it into Unity and then cut the code down in size.
Just as an experiment, I asked it to fit the code into 500 characters, and it pulls this off:
using System;namespace S{class P{static void Main(string[]a){Console.WriteLine("Simon Says!");int[]s=new int[1];s[0]=R();Console.WriteLine("Simon says: "+string.Join(", ",s));Console.WriteLine("Repeat the sequence (1=red,2=green,3=blue,4=yellow):");for(int i=0;i<s.Length;i++){Console.Write($"Color #{i+1}:");int p=int.Parse(Console.ReadLine());if(p!=s[i]){Console.WriteLine("Game over!");return;}}Console.WriteLine("You win!");}static int R(){Random r=new Random();int n=r.Next(1,5);return n;}}}
Verified it with a character counter: 496 characters total.
The question now becomes, is constructive use of Chat-GPT allowed? I don't plan on copy-pasting it to actually build the game, I'd rather take a much more thoughtful approach, but this at least gave me a feasibility look at whether it could be built or not.
So far, I'm starting to get the makings of a game. I've had to scale back making every asset myself, as it was taking too long (writing shaders is the last thing anyone should do in game jams, yet I was trying anyways :P ). Regardless, it's going to be fun no matter how far I get, so I'll probably post it anyways
It's all good! I'm not an administrator, but even if you don't submit anything, you're free to check out the games! Additionally, even if the game isn't 100% done, feel free to submit regardless for feedback and give others a chance to try your game regardless. Who knows? Maybe the game being broken is a chaotic mechanic ;)
It seems like materials are fair game (referring to a few other threads.) Even ShaderGraph seems to be okay (in so far as using default Unity texture nodes, such as noise. ) The biggest thing is you can't use custom textures/sprites, so no albedo/UV maps, but solid colors seem to be fine, am I correct?
Thanks for playing! The soundtrack was entirely written by me, so if you want to hear more of my original music, you can check out some of my other games. I would recommend my games "Nightfall" and "Financial Getaway" (which I've been told are some of the most fun games to play that I've created). You can also watch the credits in "Wormhole" to hear more or less all of the variations on the game's main theme.
Thanks! The game is inspired by Mario Party, so I'm not surprised that the board movement feels second nature (since in those games board movement is completely secondary to getting stars, whereas in this game board movement happens to be the main mechanic.) I'll think about adding some other mechanics, maybe ones that reinforce the idea of moving around the board a bit more. :)
Thanks for the compliment! I thought about distance rendering early in development, but never really did anything with it. I could have turned the camera clipping up more, but I also wanted the player to be able to see important objects from far away (those being animated helped a lot!) Thanks for playing!
Glad to hear you like the visual style! One thing I wished I had paid closer attention to is making sure that there was always contrast in whatever you looked at- from the walls and floor contrasting to give a sense of spacial presence to the items rotating and having clearly defined shapes. Unfortunately, I made the texture randomizers have the option to closely match walls and floors. Sorry for that, and thanks for playing!
Sounds would have made a big difference, from on collecting artifacts and batteries, to when you lose battery/low battery sound. Unfortunately, sound did not make it into the final build. I simply ran out of time. Maybe in the nearby future I'll put sound into the game like I had planned. Thanks for playing!