You are browsing as a guest. Sign up (or log in) to start making projects!

JPR

@JPR

Joined July 2nd, 2026

  • 2Devlogs
  • 1Projects
  • 0Ships
  • 0Votes
16yo trying to get into tech
Open comments for this post

6h 28m logged

Game fully working!
The full game is done with the Main Menu, Minigame 1 and Minigame 2.

I added small new things
Minigame 1:

  • Tutorial Page at the start fully works, including displaying the layout of the breadboard and the testing part works too. Here, the P1ZPos variable (the variable that stores the reading of the potentiometers and turns the range of 0->1023 into -6->6) has maths done on it to fit it onto the range of the screen. Each potentiometer controls a car icon, and the car has to be on the very right (aka potentiometer to the max), on top of it’s green silhouette. Both cars need to remain there for 5s for game to start.
    Minigame 2:
  • camera elevates each block so it doesn’t go off screen
  • also tutorial page now works with the test, where both players have to hold onto their button for 5 seconds before starting. there was an issue i had to fix for these buttons, figuring out a way to only send one reading when the player holds it down to click once, because readings are sent really frequently, a hold for less than a second led to 20 occasions of button being held down, so I added another variable, buttonPressedOnce, did some logic operations with buttonHeld (the readings) to make sure the signal is sent once. (side note, I know realise I should have done devlogs more frequently because i could’ve gone into more detail explaining the things I’ve learnt, but alas, I tried to explain as much as I could in my actual code, for anyone checking it out)

Here’s the new major stuff!
The Main Menu came with a lot of challenges. The idea was for the user to use a potentiometer and a button to scroll between games and select. Issue was, multiple instances of Arduino Connector happened, with scenes being reloaded and led to all kinds of chaos. So I had to do some Instancing, removed Arduino Connector from Minigame Scenes. I also had to add a score manager, that also would be permanent and instanced, so variables could stay the whole time the game was run. Also, to connect the winners of the minigame to the score manager, I had to include win conditions to each of the minigame game handler scripts. Then the Score manager would read from the public variable “winner” in those Game Handler scripts, to see who won and increment the respective score.

Then, I realised a small flaw. The Arduino Connector script was static to the usual port that I used on my computer, but a different user would be using a different port. So, I added a textbox and a porthandler to recieve info from that textbox into a public variable for the Arduino Connector script to retrieve and refresh the port entered, to ensure connection still works if changed.

That was it, the game functions perfectly fine, however there is one major thing I have to do before shipping. I had to showcase this prototype of a game to a summer program I was doing, and realised that when I was showcasing, everything was already setup for people to use. But I was only able to setup the game since I knew the way. I never showed a setup schematic in the main menu, nor did I even give the user the Arduino IDE code to send to their board. These crucial extra details I will do in future devlogs, but so far, that was my game!

0
0
12
Open comments for this post

10h 36m logged

Core concept added + Almost done with Minigame 1 + Minigame 2!
PS: Devlog is long because I forgot to post a previous one…

To start the proof-of-concept I had to figure out how I could get the Arduino Uno to connect to Unity. Learning from a tutorial by DIY TechRush, I found out the main method was by having code sent to the board from the IDE where readings are sent to the Serial Port.

After I understood that, I could finally start on my first idea, a Timeline-based race through a city between two cars that have to avoid obstacles. Since I’m working on a time crunch, I used some free low poly models:

Once I added the models, I changed potentiometer readings from rotation to transformation on the Z axis, so the car could go left and right to avoid things.
Since I was using two potentiometers (for two players), before printing, I had to concatenate “1:” or “2:” for the Unity script to find out which is which. I also encountered some delay issues, which I fixed by increasing baud rate from 9600 to 115200 and adding a delay function in the boards code.

Then, it was time to make a rig for the players and their cameras (cameras made two split screens). The rig was so that I could animate the position of the player using the Timeline feature.
Then, on the same timeline, add animation tracks for the ‘enemies’ (just buses and vans). Added some variety, some were static some were driving to the player, some fell out the sky from no where. Also, to make it clear they were enemies, I added some outline shading to them from this tutorial by ‘AAvirusAA’.
Then, I added box colliders and rigidbodies to the player cars and the enemies while tagging them as ‘player’ and ‘enemy’ respectively. Each time there was a hit, it would increment a counter for each player. Then used the canvas/UI feature to display the counter!

Finally, I got started on the tutorial at the start. I wanted to show the player(s) a TinkerCad setup including what they need and what pins to connect. Then, (kind of inspired by those switch games where they joycons are taken off, and before the game starts a button must be pressed to ensure connectivity), created an image to show the setup before the game, and to only disappear once the test has passed!

Got bored of M1 so started on M2

The concept for this was to do that simple mobile game where the blocks slide and you have to stack them by pressing it. The foundation of the game was from a tutorial by Jason Weimann, and I added the following things:

  • Instead of “Fire1” from the Input Package, it was connected to a boolean variable that was based off of the Serial Readings of whether a button was pressed. Only Player 1 button could affect player 1 turn, etc.
  • Alternating colours of blue and purple to match the cars
  • Game over screen
  • Tutorial/setup at start

Thanks for reading this far! If anyone has any suggestions on improvements please let me know!

0
0
19

Followers

Loading…