ssdgamesmt
ssdgamesmt
SSD Game Development Midterm
1 post
Don't wanna be here? Send us removal request.
ssdgamesmt · 6 years ago
Text
Midterm Due via email Tues. morning before 9AM
Answer the following questions as short answer with descriptions of processes you would follow in Unity 2D. Describe any logic needed in scripts and any components needed in the inspector, including settings on those components if it is important to modify the setting beyond the default. Turn in your answers in a text document via email. Feel free to include any diagrams that may clarify your answer, either drawn and photographed or rendered digitally, only one questions actually requires this. To be safe, you should probably try to make your text document a pdf to ensure that I can open it.
What is expected is that you describe assets, such as is the flagpole in the first one a collider or rigidbody or something else, which object does the script go onto. Who will sense a collision. Most questions can be answered with an annotated picture or with some pseudcode and a brief description of what to do in the Unity scene editor. Exactly 0 of these questions should be answered by making a new Unity project.
1. When Mario jumps onto a flag at the end of a level in Super Mario Bros., how would I detect his position on the pole, assign a point value to that position, and make him slide down to end the level? Grabbing the very top gives the player 5000 points. Going to the bottom of the pole and jumping on the bottom gives the player 100 points. Every value in between is increments of 100, and awarded based on the player’s landing position.
The keys here are Mario needs a Rigidbody to jump and the flag can either be given a rigidbody and gravity when mario touches it, or you can parent it under mario and let his rigidboy drag it down. Friction on the flagpole will also need to be turned off depending on your method of having mario slide down, or you could turn off user input at this point. To achieve points correctly, some kind of registration of where Mario touched the pole needs to occur, either by using one collider on the pole and asking what point he hit it at, or by using a series of colliders and seeing which he touched first. After you have the position of mario, find that relative to the bounds of the pole in some way to interpolate how many points he got based on his position from the top or bottom of the pole.
2. In frogger, we jump from the road onto moving logs. If we miss and jump in water, we die, but if we land on the log and there is another frog there, we change color and get an extra score. How would I build only this log section of frogger in Unity?
The logs will move with rigidbodies and will probably be triggers not colliders, so that the frog can land on them. The bonus frogs will also be triggers so that they will not inhibit the frog’s movement. When jumping from the road, if we do not have a onTrigger with a log, then we die because only water and logs exist off road. When a frog lands on the log, we match its rigidboy’s transform to move the frog across the screen as if they are riding it. The animator can help in sprite changes upon collecting the bonus frog. Sorting layers can ensure that the frog is always on top of the log when it jumps.
3. We want a Sokoban type game (https://en.wikipedia.org/wiki/Sokoban). If two boxes are stacked on the x axis, the boxes cannot be pushed as a double unit left or right, but either box can be pushed down or up as long as there is not a wall by them. If my character hits a box while moving, it start to push the box unless the box is next to a wall or another box on the same axis as the push. How would I mimic this in unity. (The game does not need to snap to a grid, but can if you really want.)
Either through multiple colliders or through sensing the player’s and other object’s position via one collider, the box must sense where the player is and if there is a wall or other box opposite the player. Since the only input is arrow keys, we know from which arrow is pressed the desired vector of movement. If the player is pressing left, then we must see if a box is on the left side of the box the player is currently colliding with, if not then the box can move, otherwise freeez position of the box. All boxes and player should have colliders and rigidbodies.
4. Now we have a connect 4 game (https://en.wikipedia.org/wiki/Connect_Four) and want the pieces to fall where the user clicks until they land in the appropriate row, at the appropriate height, depending on the number of pieces already in that row. The logic for who wins is unimportant; it is a 2 player game and they have to figure that out between themselves. How would I create this game interface in unity.
A series of empty gameobjects along the top of the connect four board will receive a mouse action or a raycast and depending on which column was clicked, a new checker will be instantiated at the clicked transform, and gravity will be turned on so that it falls into the board. Rotation should be locked and x position should be locked. If not locked, then walls will need to be made between each column so checkers cannot fall into other columns. All checkers will have colliders and rigidbodies so pieces will automatically stack to appropriate height.
5. Design a game that involves brushing teeth as the main action. Add whatever elements you want to it. Draw the layout of a level and explain the interaction, scoring, and battle system/goal.
*Remember that your Midterm Project is due Thursday before 9AM, shared via github.
0 notes