Dana Vrajitoru
I355/C490/C590 3D Games Programming

I355/C490/C590 Lab 1B / Homework 1

Due Date: Wednesday, September 9, 2026.

Lab Part

Complete Lab 1 B first. Demo Part 1 ; Demo Part 2.

Homework Part

Set some materials with the colors you like to the walls of the box and to the ball. You can play with the transparency in the Base Color component of the materials to see if that makes it look better.

Change the formula for the initial speed of the ball so that the Z component of the speed is between 0.5 * speed and speed.

Your game should be ready to go. Test it to make sure it works in both cases. Comment out any debug statements.

Experiment with the angular drag, freezing the ball's rotation, and other factors in the rigid body to find an optimal setting for the ball's movement. You can add some extra velocity to the ball when it hits the racket.

Create another cylindrical object called Target with the goal of giving the player extra points if the ball hits it. Set the target close to the back wall and give it a tag called "target". Add a case in the collision function where if it hits this target, you add 10 points to the score and output it.

Executable

As a last step, after you make sure everything works, from the File menu choose Build Profiles. First, click on Windows to create an executable I can test. Scroll down to the Scene List and click Open Scene List. Unselect the sample scene if you see it there, and click the button Add Open Scenes. You should see the Game object in the list now. Make sure it is selected. You can close this dialog now.

Then another useful thing is to go to the Edit menu - Project Settings, and click on Player on the left. Expand Resolution and Presentation and switch the Fullscreen Mode from Fullscreen Window to Windowed. You can switch on other settings you may find useful. Close this dialog.

In the File menu, click on Build and Run. This will create a stand-alone executable for the platform of your choice. Create a folder called Build inside the project folder (not inside the Assets folder). Create an executable for your architecture (so you can test it) and one for Windows (so that I can test it). Create a zip file with the entire build folder. It should contain the following:

You can add the scripts and the scene to the same zip file or submit them as their own files.

Homework Submission

Create a zip file and copy inside it the entire Windows executable folder, the scene Game.unity and the script files BallControl.cs and RacquetControl.cs. Upload them to Canvas - Homework 1 as this is your homework. There is no separate submission for the lab.