Pong in Unity a basic Intro

Size: px
Start display at page:

Download "Pong in Unity a basic Intro"

Transcription

1 This tutorial recreates the classic game Pong, for those unfamiliar with the game, shame on you what have you been doing, living under a rock?! Go google it. Go on. For those that now know the game, this tutorial assumes a basic working knowledge of Unity and the editor and some programming, although it will explain as it goes. Create a new 2D project in Unity, this sets some basic things up for us but we need to make some simple changes to the Camera. Select the Main Camera and review the settings, I ll point out the important ones, first, note that the Z position settings are -10, that means that the camera is on that line, anything behind it won t be shown by that camera, anything above will be. The Background is just the colour, pick a background colour and set it. Projection needs (and should) be set to Orthographic, this is a 2D camera, a way of rendering 3D objects in 2D. See Figure 1 for an example, depending on the angle you view the stairs from it could be any one of the surrounding pictures. Size is pretty much how much the camera can see. Clipping planes is how far the camera can see. There are two values: Near and Far. Near is where it starts rendering, and Far is where it stops rendering. Figure 1 Source: Thomas E. French and Carl L. Svensen Mechanical Drawing For High Schools (New York: McGraw- Hill Book Company, Inc., 1919) We will use the following sprites from opengameart as our walls to ensure the ball doesn t escape, you can right click them from within here and save them to your assets folder but the easiest way is just to download them from the asset bundle on moodle. When you import it make sure to set the Texture type to sprite, and drop the pixels per unit to 1, A Pixels Per Unit value of 1 means that 1 x 1 pixels will fit into one unit in the game world. We will use this value for all our textures, because the ball will be 1 x 1 pixels later on, which should be exactly one unit in the game world.

2 Position the walls so that they roughly match the image below, you ll need to rotate and adjust the vertical ones. You ll need to scale it suitably, rotating Z by 90 and Scaling X by 0.7 should produce a nice result. Make sure the camera is roughly in the middle, use the camera view to ensure you re positioned correctly. Currently the walls are there but not there, anything you fire through would just pass right through. We want them to be real walls so the racket and ball will collide with them. So, we add something called Colliders. This tells the built in physics engine that these are supposed to be solid and lets us specify ways they behave. Right now we can see the walls in the game, but they aren't real walls yet. They are just images in the game world, a purely visual effect. We want the walls to be real walls so that the Rackets and the Ball will collide with them instead of just going right through them. So, select all the walls in the hierarchy, then in the Inspector go to Add component -> Box Collider 2D. Make sure to select the 2D version, adding 3D means we have a whole other dimension to calculate physics in, adding a performance overhead. If you zoom into the scene you should also see a pale green line surrounding each wall, this shows the collider surrounding that wall. You ll now want to copy and paste in the dotted line that shows each player s half of the board. Import it as before, set the Pixels per Unit to 1 and drag it so it s roughly in the middle. Don t worry about adding a collider, we don t want the ball to collide with the net. This time, import, rotate and position the two paddles (red and blue) as before set the PPU to 1. Add a 2D Box Collider to the paddles, later we ll want to move the paddles up and down but have it stop

3 when they collide with the walls. Note: as a rule of thumb, everything physical that moves through the game world will need a Rigidbody. To add a Rigidbody to our Rackets we just select both of them in the Hierarchy again, then take a look in the Inspector and press Add Component->Physics 2D->Rigidbody 2D. We then modify the Rigidbody 2D to set Gravity to 0 (because there is no gravity in a pong game) and make it always have a Fixed Angle (the rackets should never rotate): Racket Movement Let's make it so players can move their paddles, we need to create a new C# Script, call it PaddleScript (capitals count). If you open it you won t see a lot, The Start function is automatically called by Unity when starting the game. The Update function is automatically called over and over again, roughly 60 times per second (each time a frame renders). But there is another Update function, it's called FixedUpdate. This one is also called over and over again, but in a fixed time interval. Unity's Physics are calculated in the exact same time interval, so it's usually a good idea to use FixedUpdate when doing Physics stuff (we want to move Paddle that have Colliders and RigidBodys, hence Physics stuff). So let's remove the Start and Update functions and create a FixedUpdate function instead, the rackets have a Rigidbody component and we will use the Rigidbody's velocity property for movement. The velocity is always the movement direction multiplied by the speed. The direction will be a Vector2 with a x component (horizontal direction) and a y component (vertical direction). The following image from noobtuts shows a few Vector2 examples: The rackets should only move upwards and downwards, which means that the x component will always be 0 and the y component will be 1 for upwards, -1 for downwards or 0 for not moving. The y value depends on the user input to get this we will use Unity's GetAxisRaw function, we use GetAxisRaw to check the vertical input axis. This will return 1 when pressing either the W key, the UpArrow key, or when pointing a gamepad's stick upwards by default and -1 when it moves the other way.

4 Now we can use GetComponent to access the racket's Rigidbody component and then set its velocity: We will also add a speed variable to our Script, so that we can control the racket's movement speed. We make the speed variable public so that we can always modify it in the Inspector without changing the Script. Now we can modify our Script to make use of the speed variable: Note: we set the velocity to the direction multiplied by the speed, which is exactly the velocity's definition. If we save the Script and press Play then we can now move the rackets, but they move together, there is just one problem, we can't move the rackets separately yet. Right now, both our Scripts check the "Vertical" Input axis for the movement calculations. We could change this to use one specific keyset (e.g. W for player1, P for Player2) but instead let's create a new Axis so that we can change the Input Axis in the Inspector:

5 Select Edit->Project Settings->Input from the top menu, here we can modify the current Vertical axis so that it only uses the W and S keys. We will also make it use only Joystick 1: Now we will increase the Size by one in order to add a new axis: We will name it Vertical2 and modify it accordingly: Finally, update the script to use a new axis variable

6 Afterwards we will select the paddlered GameObject and change the MoveRacket Script's Axis property to Vertical2: If we press Play then we can now move the rackets separately. Yay! Okay so now we need a Ball, import it and configure it using the same Import Settings but a PPU of 10. Now we can drag it from the Project Area into the middle of the Scene: Our Ball should make use of Unity's Physics again, so let's select Add Component->Physics 2D->Box Collider 2D to add a Collider:

7 Our ball should bounce at the angle it hits the wall at, so it hits at 45, bounces off at -45, etc. this sounds like some complicated math that could be done with Scripting. But since we are lazy, we will just let Unity take care of the bouncing off thing by assigning a Physics Material to the Collider that makes it bounce off things all the time. At first we right click in our Project Area and selected Create->Physics2D Material which we will name Bounce: Now we can modify it in the Inspector to make it bounce off: Then we drag the material from the Project Area into the Material slot of the Ball's Collider: And that's it. Now the ball will bounce off in case it collides with things in the game, except it doesn t move. Well that s a good game isn t it. In order to make our ball move through the game world, we will add a Rigidbody2D to it again by selecting Add Component->Physics 2D->Rigidbody 2D. We will modify the Rigidbody component in several ways: We don't want it to use Gravity We want it to have a very small Mass so it doesn't push away the Rackets when colliding We don't want it to rotate Okay so there is one more thing to do before we see some cool ball movement. We will select Add Component->New Script, name it Ball and select CSharp for the language. Open it and get ready to again change the contents, we will use the Start function to give the ball some initial velocity. Yet again we will use a direction multiplied by a speed:

8 Now if we press play, we can see the Ball bounce off the walls and paddles; there s a few more things to do but you can give the game a go. One issue you might find is that the ball can sometimes when going very fast bounce through the walls. Obviously this isn t particularly effective. This is because the collision detection on the ball is set to discrete, this means that, if the object moves very fast, sometimes it might miss the collision. To solve this, change it from discrete, to continuous, meaning it will always be checking. On a normal game this might mean a massive performance hit, but in a simple one like pong, it s fine. Secondly, if you notice, the ball bounces flat on, there is no change of angle like a proper game of pong or air hockey. Let s change our BallScript to make it change when it collides, So we need work out the velocity based on where the ball hits, this is harder mathematically easy(ish) via code. So, we need two values for a Vector2, x and y, the x value is easy, it's -1 in case it bounces off the right racket and it's 1 if it bounces off the left racket. What we really need to think about is the y value, which will be somewhere between -1 and 1. All we really need to calculate is this: 1 <- at the top of the racket 0 <- at the middle of the racket -1 <- at the bottom of the racket Or in other words: we just have to divide the ball's y coordinate by the racket's height. Here is our function:

9 And our final OnCollisionEnter2D function; We check using if statements which panel we hit, then use the hitfactor position to work out the direction and speed. Read through comments and make sure you understand what s happening, in particular, it may well be worth googling and explanation of normalisation. If we press play, we can now influence the ball's bouncing direction depending on where we hit it. The game will now play like a rather basic pong game, to round it off we ll add a simple scoring system. When the ball hits the bit behind the paddle, we ll increase the score. So, we need Something to hold the player s scores A bit of code to detect when the ball hits the walls Some logic that says when the ball hits the walls, update the scores Once again, with Unity s built in tools this is pretty simple, the ball script already checks what the ball has collided with, so we ll add our code there. Open it up and; Add a variable to hold each player s score of type int to the top under speed; Then in the OnColission2DEnter() method, check to see if you ve hit the LeftWall and if you have, add one to score. Then do the same to the RightWall. The two new bits are shown below.

10 Now all that s needed is a way to display it. This isn t going to turn into a Unity UGUI tutorial but it will cover some of the basics. Add two new UI Gameobjects of type Text, position them at a sensible point and set the Text to 0, the colour to something that stands out and tick Best Fit (which will fit the text size to the size of the box. Now we need to link those boxes to the code we wrote earlier. Again, Unity makes this simple. Back to the ball code, (don t worry I ll post a full scipt listing shortly), add a line right at the top using UnityEngine.UI. This simply says we re going to use the code associated with the new UI features. Then add two public Text fields that will be used to hold the two Text objects for scores we created earlier. and then where you increase the score you want to replace the text value of those objects with the current score. (Note: Text is the type text object, text is the actual text [e.g. 0]). Try it.

11 Challenges Add a Trail Effect Add the old Pong Sound that we all love Increase the Ball's speed over time Add a menu and a credits screen

Pacman. you want to see how the maze was created, open the file named unity_pacman_create_maze.

Pacman. you want to see how the maze was created, open the file named unity_pacman_create_maze. Pacman Note: I have started this exercise for you so you do not have to make all of the box colliders. If you want to see how the maze was created, open the file named unity_pacman_create_maze. Adding

More information

Game Design Unity Workshop

Game Design Unity Workshop Game Design Unity Workshop Activity 2 Goals: - Creation of small world - Creation of character - Scripting of player movement and camera following Load up unity Build Object: Mini World and basic Chase

More information

Setting up A Basic Scene in Unity

Setting up A Basic Scene in Unity Setting up A Basic Scene in Unity So begins the first of this series of tutorials aimed at helping you gain the basic understanding of skills needed in Unity to develop a 3D game. As this is a programming

More information

Game Design Unity Workshop

Game Design Unity Workshop Game Design Unity Workshop Activity 1 Unity Overview Unity is a game engine with the ability to create 3d and 2d environments. Unity s prime focus is to allow for the quick creation of a game from freelance

More information

Damaging, Attacking and Interaction

Damaging, Attacking and Interaction Damaging, Attacking and Interaction In this tutorial we ll go through some ways to add damage, health and interaction to our scene, as always this isn t the only way, but it s the way I will show you.

More information

Workshop BOND UNIVERSITY. Bachelor of Interactive Multimedia and Design. Asteroids

Workshop BOND UNIVERSITY. Bachelor of Interactive Multimedia and Design. Asteroids Workshop BOND UNIVERSITY Bachelor of Interactive Multimedia and Design Asteroids FACULTY OF SOCIETY AND DESIGN Building an Asteroid Dodging Game Penny de Byl Faculty of Society and Design Bond University

More information

Game Design Unity Workshop

Game Design Unity Workshop Game Design Unity Workshop Activity 4 Goals: - Creation of small world - Creation of character - Scripting of player movement and camera following Load up unity Build Object: Collisions in Unity Aim: Build

More information

SPRITES Moving Two At the Same Using Game State

SPRITES Moving Two At the Same Using Game State If you recall our collision detection lesson, you ll likely remember that you couldn t move both sprites at the same time unless you hit a movement key for each at exactly the same time. Why was that?

More information

EEN118 LAB FOUR. h = v t ½ g t 2

EEN118 LAB FOUR. h = v t ½ g t 2 EEN118 LAB FOUR In this lab you will be performing a simulation of a physical system, shooting a projectile from a cannon and working out where it will land. Although this is not a very complicated physical

More information

Making use of other Applications

Making use of other Applications AppGameKit 2 Collision Using Arrays Making use of other Applications Although we need game software to help makes games for modern devices, we should not exclude the use of other applications to aid the

More information

[ the academy_of_code] Senior Beginners

[ the academy_of_code] Senior Beginners [ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell

More information

AN INTRODUCTION TO SCRATCH (2) PROGRAMMING

AN INTRODUCTION TO SCRATCH (2) PROGRAMMING AN INTRODUCTION TO SCRATCH (2) PROGRAMMING Document Version 2 (04/10/2014) INTRODUCTION SCRATCH is a visual programming environment and language. It was launched by the MIT Media Lab in 2007 in an effort

More information

ICS 61 Game Systems and Design Introduction to Scratch

ICS 61 Game Systems and Design Introduction to Scratch ICS 61, Winter, 2015 Introduction to Scratch p. 1 ICS 61 Game Systems and Design Introduction to Scratch 1. Make sure your computer has a browser open at the address http://scratch.mit.edu/projects/editor/.

More information

EEN118 LAB FOUR. h = v t ½ g t 2

EEN118 LAB FOUR. h = v t ½ g t 2 EEN118 LAB FOUR In this lab you will be performing a simulation of a physical system, shooting a projectile from a cannon and working out where it will land. Although this is not a very complicated physical

More information

Velocity: A Bat s Eye View of Velocity

Velocity: A Bat s Eye View of Velocity Name School Date Purpose Velocity: A Bat s Eye View of Velocity There are a number of ways of representing motion that we ll find useful. Graphing position, velocity, and acceleration vs. time is often

More information

Creating Breakout - Part 2

Creating Breakout - Part 2 Creating Breakout - Part 2 Adapted from Basic Projects: Game Maker by David Waller So the game works, it is a functioning game. It s not very challenging though, and it could use some more work to make

More information

EEN118 LAB FOUR. h = v t ½ g t 2

EEN118 LAB FOUR. h = v t ½ g t 2 EEN118 LAB FOUR In this lab you will be performing a simulation of a physical system, shooting a projectile from a cannon and working out where it will land. Although this is not a very complicated physical

More information

Textures and UV Mapping in Blender

Textures and UV Mapping in Blender Textures and UV Mapping in Blender Categories : Uncategorised Date : 21st November 2017 1 / 25 (See below for an introduction to UV maps and unwrapping) Jim s Notes regarding Blender objects, the UV Editor

More information

IAT 445 Lab 10. Special Topics in Unity. Lanz Singbeil

IAT 445 Lab 10. Special Topics in Unity. Lanz Singbeil IAT 445 Lab 10 Special Topics in Unity Special Topics in Unity We ll be briefly going over the following concepts. They are covered in more detail in your Watkins textbook: Setting up Fog Effects and a

More information

EEN118 LAB FOUR. h = v t - ½ g t 2

EEN118 LAB FOUR. h = v t - ½ g t 2 EEN118 LAB FOUR In this lab you will be performing a simulation of a physical system, shooting a projectile from a cannon and working out where it will land. Although this is not a very complicated physical

More information

Assignment 4: Flight Simulator

Assignment 4: Flight Simulator VR Assignment 4: Flight Simulator Released : Feb 19 Due : March 26th @ 4:00 PM Please start early as this is long assignment with a lot of details. We simply want to make sure that you have started the

More information

Airship Sub & Boat Tutorial. Made by King and Cheese

Airship Sub & Boat Tutorial. Made by King and Cheese Airship Sub & Boat Tutorial Made by King and Cheese Contents Introduction What you should already know 3 What you will learn 3 Let s start Opening up our scene 4 Adding some movement 5 Turning 8 Ascending

More information

Adobe Flash CS3 Reference Flash CS3 Application Window

Adobe Flash CS3 Reference Flash CS3 Application Window Adobe Flash CS3 Reference Flash CS3 Application Window When you load up Flash CS3 and choose to create a new Flash document, the application window should look something like the screenshot below. Layers

More information

Lab 2: Conservation of Momentum

Lab 2: Conservation of Momentum 3 Lab 2: Conservation of Momentum I. Before you come to lab... II. Background III. Introduction A. This lab will give you an opportunity to explore the conservation of momentum in an interesting physical

More information

Add in a new balloon sprite, and a suitable stage backdrop.

Add in a new balloon sprite, and a suitable stage backdrop. Balloons Introduction You are going to make a balloon-popping game! Step 1: Animating a balloon Activity Checklist Start a new Scratch project, and delete the cat sprite so that your project is empty.

More information

Adding Depth to Games

Adding Depth to Games Game Maker Tutorial Adding Depth to Games Written by Mark Overmars Copyright 2007-2009 YoYo Games Ltd Last changed: December 23, 2009 Uses: Game Maker 8.0, Pro Edition, Advanced Mode Level: Intermediate

More information

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1

lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 lundi 7 janvier 2002 Blender: tutorial: Building a Castle Page: 1 www.blender.nl this document is online at http://www.blender.nl/showitem.php?id=4 Building a Castle 2000 07 19 Bart Veldhuizen id4 Introduction

More information

Caustics - Mental Ray

Caustics - Mental Ray Caustics - Mental Ray (Working with real caustic generation) In this tutorial we are going to go over some advanced lighting techniques for creating realistic caustic effects. Caustics are the bent reflections

More information

SketchUp Quick Start For Surveyors

SketchUp Quick Start For Surveyors SketchUp Quick Start For Surveyors Reason why we are doing this SketchUp allows surveyors to draw buildings very quickly. It allows you to locate them in a plan of the area. It allows you to show the relationship

More information

Android Programming Family Fun Day using AppInventor

Android Programming Family Fun Day using AppInventor Android Programming Family Fun Day using AppInventor Table of Contents A step-by-step guide to making a simple app...2 Getting your app running on the emulator...9 Getting your app onto your phone or tablet...10

More information

Basic Waypoints Movement v1.0

Basic Waypoints Movement v1.0 Basic Waypoints Movement v1.0 1. Create New Unity project (or use some existing project) 2. Import RAIN{indie} AI package from Asset store or download from: http://rivaltheory.com/rainindie 3. 4. Your

More information

Shadows in the graphics pipeline

Shadows in the graphics pipeline Shadows in the graphics pipeline Steve Marschner Cornell University CS 569 Spring 2008, 19 February There are a number of visual cues that help let the viewer know about the 3D relationships between objects

More information

Installing and Using Trackside Cameras Revised November 2008

Installing and Using Trackside Cameras Revised November 2008 Installing and Using Trackside Cameras Revised November 2008 Trackside cameras are a useful and creative way to add visual interest to your route. Rather than just look out the windshield of the locomotive

More information

Flowmap Generator Reference

Flowmap Generator Reference Flowmap Generator Reference Table of Contents Flowmap Overview... 3 What is a flowmap?... 3 Using a flowmap in a shader... 4 Performance... 4 Creating flowmaps by hand... 4 Creating flowmaps using Flowmap

More information

LECTURE 4. Announcements

LECTURE 4. Announcements LECTURE 4 Announcements Retries Email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your

More information

Digitizer Leapfrogging

Digitizer Leapfrogging Digitizer Leapfrogging Leapfrogging lets you digitize objects that are larger than your digitizing arm. You start with one section of the object, then leapfrog around by creating leapfrog stations in both

More information

PSD to Mobile UI Tutorial

PSD to Mobile UI Tutorial PSD to Mobile UI Tutorial Contents Planning for design... 4 Decide the support devices for the application... 4 Target Device for design... 4 Import Asset package... 5 Basic Setting... 5 Preparation for

More information

Cláudia Ribeiro PHYSICS

Cláudia Ribeiro PHYSICS Cláudia Ribeiro PHYSICS Cláudia Ribeiro Goals: - Colliders - Rigidbodies - AddForce and AddTorque Cláudia Ribeiro AVT 2012 Colliders Colliders components define the shape of an object for the purpose of

More information

Smoother Graphics Taking Control of Painting the Screen

Smoother Graphics Taking Control of Painting the Screen It is very likely that by now you ve tried something that made your game run rather slow. Perhaps you tried to use an image with a transparent background, or had a gazillion objects moving on the window

More information

Unity Game Development

Unity Game Development Unity Game Development 1. Introduction to Unity Getting to Know the Unity Editor The Project Dialog The Unity Interface The Project View The Hierarchy View The Inspector View The Scene View The Game View

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

How Your First Program Works

How Your First Program Works How Your First Program Works Section 2: How Your First Program Works How Programs Are Structured...19 Method Main ( )...21 How Programs Are Structured In Section 1, you typed in and ran your first program

More information

Brief 3ds max Shaping Tutorial

Brief 3ds max Shaping Tutorial Brief 3ds max Shaping Tutorial Part1: Power Key Axe Shaft Written by Maestro 1. Creation: Go to top view, create a 6 sided cylinder, 0.1 radius this is the perfect shaft thickness to fit in the hand, so

More information

ORB Education Quality Teaching Resources

ORB Education Quality Teaching Resources These basic resources aim to keep things simple and avoid HTML and CSS completely, whilst helping familiarise students with what can be a daunting interface. The final websites will not demonstrate best

More information

Detailed instructions for video analysis using Logger Pro.

Detailed instructions for video analysis using Logger Pro. Detailed instructions for video analysis using Logger Pro. 1. Begin by locating or creating a video of a projectile (or any moving object). Save it to your computer. Most video file types are accepted,

More information

Introduction to Unreal Engine Blueprints for Beginners. By Chaven R Yenketswamy

Introduction to Unreal Engine Blueprints for Beginners. By Chaven R Yenketswamy Introduction to Unreal Engine Blueprints for Beginners By Chaven R Yenketswamy Introduction My first two tutorials covered creating and painting 3D objects for inclusion in your Unreal Project. In this

More information

Pong. Prof Alexiei Dingli

Pong. Prof Alexiei Dingli Pong Prof Alexiei Dingli Background Drag and Drop a background image Size 1024 x 576 X = 0, Y = 0 Rename it to BG Sorting objects Go to Sorting Layer Add a new Sorting Layer called Background Drag the

More information

Activity A 1-D Free-Fall with v i = 0

Activity A 1-D Free-Fall with v i = 0 Physics 151 Practical 3 Python Programming Freefall Kinematics Department of Physics 60 St. George St. NOTE: Today's activities must be done in teams of one or two. There are now twice as many computers

More information

CREATING AND USING NORMAL MAPS - A Tutorial

CREATING AND USING NORMAL MAPS - A Tutorial CREATING AND USING NORMAL MAPS - A Tutorial Introduction In the last 10 years or so we ve seen lots of video games released that use low poly count models for the game play and then tell the story using

More information

UV Mapping to avoid texture flaws and enable proper shading

UV Mapping to avoid texture flaws and enable proper shading UV Mapping to avoid texture flaws and enable proper shading Foreword: Throughout this tutorial I am going to be using Maya s built in UV Mapping utility, which I am going to base my projections on individual

More information

Adding a Trigger to a Unity Animation Method #2

Adding a Trigger to a Unity Animation Method #2 Adding a Trigger to a Unity Animation Method #2 Unity Version: 5.0 Adding the GameObjects In this example we will create two animation states for a single object in Unity with the Animation panel. Our

More information

Ambient Occlusion Pass

Ambient Occlusion Pass Ambient Occlusion Pass (Soft Shadows in the Nooks and Crannies to Replicate Photorealistic Lighting) In this tutorial we are going to go over some advanced lighting techniques for an Ambient Occlusion

More information

This is the opening view of blender.

This is the opening view of blender. This is the opening view of blender. Note that interacting with Blender is a little different from other programs that you may be used to. For example, left clicking won t select objects on the scene,

More information

Creating a Poster in Google SketchUp

Creating a Poster in Google SketchUp If you have digital image, or can find one online, you can easily make that image into a room poster. For this project, it helps to have some basic knowledge of Google SketchUp (though detailed instructions

More information

Chapter 17: The Truth about Normals

Chapter 17: The Truth about Normals Chapter 17: The Truth about Normals What are Normals? When I first started with Blender I read about normals everywhere, but all I knew about them was: If there are weird black spots on your object, go

More information

UNITY WORKSHOP. Unity Editor. Programming(Unity Script)

UNITY WORKSHOP. Unity Editor. Programming(Unity Script) July, 2018 Hayashi UNITY WORKSHOP Unity Editor Project: Name your project. A folder is created with the same name of the project. Everything is in the folder. Four windows (Scene, Project, Hierarchy, Inspector),

More information

Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships.

Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships. Mount Points Mount Points is a super simple tool for connecting objects together and managing those relationships. With Mount Points, you can simply drag two objects together and when their mount points

More information

S3 Scratch Programming

S3 Scratch Programming LOREM ST LOUIS IPSUM DOLOR ST LOUIS SCHOOL S3 Computer Literacy S3 Scratch Programming Dominic Kwok CHAPTER 1 Scratch After studying this chapter, you will be able to create a simple Scratch program upload

More information

Chapter 19- Object Physics

Chapter 19- Object Physics Chapter 19- Object Physics Flowing water, fabric, things falling, and even a bouncing ball can be difficult to animate realistically using techniques we have already discussed. This is where Blender's

More information

3Using and Writing. Functions. Understanding Functions 41. In this chapter, I ll explain what functions are and how to use them.

3Using and Writing. Functions. Understanding Functions 41. In this chapter, I ll explain what functions are and how to use them. 3Using and Writing Functions Understanding Functions 41 Using Methods 42 Writing Custom Functions 46 Understanding Modular Functions 49 Making a Function Modular 50 Making a Function Return a Value 59

More information

Plotting Points. By Francine Wolfe Professor Susan Rodger Duke University June 2010

Plotting Points. By Francine Wolfe Professor Susan Rodger Duke University June 2010 Plotting Points By Francine Wolfe Professor Susan Rodger Duke University June 2010 Description This tutorial will show you how to create a game where the player has to plot points on a graph. The method

More information

Table of contents. Introduction. Having finally realized your ambitious plans for a game, you might face big performance

Table of contents. Introduction. Having finally realized your ambitious plans for a game, you might face big performance Table of contents Introduction Introduction... 1 Optimizing Unity games... 2 Rendering performance...2 Script performance...3 Physics performance...3 What is this all about?...4 How does M2HCullingManual

More information

SolidWorks Intro Part 1b

SolidWorks Intro Part 1b SolidWorks Intro Part 1b Dave Touretzky and Susan Finger 1. Create a new part We ll create a CAD model of the 2 ½ D key fob below to make on the laser cutter. Select File New Templates IPSpart If the SolidWorks

More information

Fireplace Mantel in Google SketchUp

Fireplace Mantel in Google SketchUp Creating the fireplace itself is quite easy: it s just a box with a hole. But creating the mantel around the top requires the fun-to-use Follow Me tool. This project was created in SketchUp 8, but will

More information

Unit 21 - Creating a Navigation Bar in Macromedia Fireworks

Unit 21 - Creating a Navigation Bar in Macromedia Fireworks Unit 21 - Creating a Navigation Bar in Macromedia Fireworks Items needed to complete the Navigation Bar: Unit 21 - House Style Unit 21 - Graphics Sketch Diagrams Document ------------------------------------------------------------------------------------------------

More information

Assignment 10 Solutions Due May 1, start of class. Physics 122, sections and 8101 Laura Lising

Assignment 10 Solutions Due May 1, start of class. Physics 122, sections and 8101 Laura Lising Physics 122, sections 502-4 and 8101 Laura Lising Assignment 10 Solutions Due May 1, start of class 1) Revisiting the last question from the problem set before. Suppose you have a flashlight or a laser

More information

COPYRIGHTED MATERIAL. Getting Started with Google Analytics. P a r t

COPYRIGHTED MATERIAL. Getting Started with Google Analytics. P a r t P a r t I Getting Started with Google Analytics As analytics applications go, Google Analytics is probably the easiest (or at least one of the easiest) available in the market today. But don t let the

More information

SolidWorks 2½D Parts

SolidWorks 2½D Parts SolidWorks 2½D Parts IDeATe Laser Micro Part 1b Dave Touretzky and Susan Finger 1. Create a new part In this lab, you ll create a CAD model of the 2 ½ D key fob below to make on the laser cutter. Select

More information

FAQ - Podium v1.4 by Jim Allen

FAQ - Podium v1.4 by Jim Allen FAQ - Podium v1.4 by Jim Allen Podium is the only plug-in to run natively within SketchUp, and the only one to have a true 'one click' photorealistic output. Although it is about as simple as you can expect

More information

Tutorial Physics: Unity Car

Tutorial Physics: Unity Car Tutorial Physics: Unity Car This activity will show you how to create a free-driving car game using Unity from scratch. You will learn how to import models using FBX file and set texture. You will learn

More information

Unity3D. Unity3D is a powerful cross-platform 3D engine and a user friendly development environment.

Unity3D. Unity3D is a powerful cross-platform 3D engine and a user friendly development environment. Unity3D Unity3D is a powerful cross-platform 3D engine and a user friendly development environment. If you didn t like OpenGL, hopefully you ll like this. Remember the Rotating Earth? Look how it s done

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE Geology & Geophysics REU GPS/GIS 1-day workshop handout #4: Working with data in ArcGIS You will create a raster DEM by interpolating contour data, create a shaded relief image, and pull data out of the

More information

Windows Movie Maker lets you edit videos from video and photo files. It is free from Microsoft.

Windows Movie Maker lets you edit videos from video and photo files. It is free from Microsoft. Getting Started with Windows Movie Maker Windows Movie Maker lets you edit videos from video and photo files. It is free from Microsoft. Start a project To start, you will need to import photos or video

More information

Customizing DAZ Studio

Customizing DAZ Studio Customizing DAZ Studio This tutorial covers from the beginning customization options such as setting tabs to the more advanced options such as setting hot keys and altering the menu layout. Introduction:

More information

Dice Making in Unity

Dice Making in Unity Dice Making in Unity Part 2: A Beginner's Tutorial Continued Overview This is part 2 of a tutorial to create a six sided die that rolls across a surface in Unity. If you haven't looked at part 1, you should

More information

3 Polygonal Modeling. Getting Started with Maya 103

3 Polygonal Modeling. Getting Started with Maya 103 3 Polygonal Modeling In Maya, modeling refers to the process of creating virtual 3D surfaces for the characters and objects in the Maya scene. Surfaces play an important role in the overall Maya workflow

More information

An object in 3D space

An object in 3D space An object in 3D space An object's viewpoint Every Alice object has a viewpoint. The viewpoint of an object is determined by: The position of the object in 3D space. The orientation of the object relative

More information

Progress Bar Pack. Manual

Progress Bar Pack. Manual Progress Bar Pack Manual 1 Overview The Progress Bar Pack contains a selection of textures, shaders and scripts for creating different ways to visualize linear data, such as health, level load progress,

More information

Simple Glass TNT Molecule Tutorial

Simple Glass TNT Molecule Tutorial Simple Glass TNT Molecule Tutorial Quinten Kilborn Today, I ll be showing you how to make an awesome looking glass TNT molecule. I was messing with glass textures and found that it makes an awesome science

More information

Motion Creating Animation with Behaviors

Motion Creating Animation with Behaviors Motion Creating Animation with Behaviors Part 1: Basic Motion Behaviors Part 2: Stacking Behaviors upart 3: Using Basic Motion Behaviors in 3Do Part 4: Using Simulation Behaviors Part 5: Applying Parameter

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Unity

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Unity i About the Tutorial Unity is a cross-platform game engine initially released by Unity Technologies, in 2005. The focus of Unity lies in the development of both 2D and 3D games and interactive content.

More information

Platform Games Drawing Sprites & Detecting Collisions

Platform Games Drawing Sprites & Detecting Collisions Platform Games Drawing Sprites & Detecting Collisions Computer Games Development David Cairns Contents Drawing Sprites Collision Detection Animation Loop Introduction 1 Background Image - Parallax Scrolling

More information

This view is called User Persp - perspective. It's good for rendering, but not for editing. Ortho will be better.

This view is called User Persp - perspective. It's good for rendering, but not for editing. Ortho will be better. Create a crate simple placeable in Blender. In this tutorial I'll show you, how to create and texture a simple placeable, without animations. Let's start. First thing is always to have an idea, how you

More information

Asteroid Destroyer How it Works

Asteroid Destroyer How it Works Asteroid Destroyer How it Works This is a summary of some of the more advance coding associated with the Asteroid Destroyer Game. Many of the events with in the game are common sense other than the following

More information

Fruit Snake SECTION 1

Fruit Snake SECTION 1 Fruit Snake SECTION 1 For the first full Construct 2 game you're going to create a snake game. In this game, you'll have a snake that will "eat" fruit, and grow longer with each object or piece of fruit

More information

3D Starfields for Unity

3D Starfields for Unity 3D Starfields for Unity Overview Getting started Quick-start prefab Examples Proper use Tweaking Starfield Scripts Random Starfield Object Starfield Infinite Starfield Effect Making your own Material Tweaks

More information

Unity Scripting 4. CS 491 / DES 400 Crea.ve Coding. Computer Science

Unity Scripting 4. CS 491 / DES 400 Crea.ve Coding. Computer Science Unity Scripting 4 Unity Components overview Particle components Interaction Key and Button input Parenting CAVE2 Interaction Wand / Wanda VR Input Devices Project Organization Prefabs Instantiate Unity

More information

Animator Friendly Rigging Part 1

Animator Friendly Rigging Part 1 Animator Friendly Rigging Part 1 Creating animation rigs which solve problems, are fun to use, and don t cause nervous breakdowns. - http://jasonschleifer.com/ - 1- CONTENTS I. INTRODUCTION... 4 What is

More information

6.001 Notes: Section 17.5

6.001 Notes: Section 17.5 6.001 Notes: Section 17.5 Slide 17.5.1 Now, let's look at one example in which changing the evaluation model allows us to explore a very different kind of computational problem. Our goal is to show how

More information

Better UI Makes ugui Better!

Better UI Makes ugui Better! Better UI Makes ugui Better! version 1.1.2 2017 Thera Bytes UG Developed by Salomon Zwecker TABLE OF CONTENTS Better UI... 1 Better UI Elements... 4 1 Workflow: Make Better... 4 2 UI and Layout Elements

More information

4.7 Approximate Integration

4.7 Approximate Integration 4.7 Approximate Integration Some anti-derivatives are difficult to impossible to find. For example, 1 0 e x2 dx or 1 1 1 + x3 dx We came across this situation back in calculus I when we introduced the

More information

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch Purpose: We will take a look at programming this week using a language called Scratch. Scratch is a programming language that was developed

More information

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below. Graphing in Excel featuring Excel 2007 1 A spreadsheet can be a powerful tool for analyzing and graphing data, but it works completely differently from the graphing calculator that you re used to. If you

More information

CS125 : Introduction to Computer Science. Lecture Notes #38 and #39 Quicksort. c 2005, 2003, 2002, 2000 Jason Zych

CS125 : Introduction to Computer Science. Lecture Notes #38 and #39 Quicksort. c 2005, 2003, 2002, 2000 Jason Zych CS125 : Introduction to Computer Science Lecture Notes #38 and #39 Quicksort c 2005, 2003, 2002, 2000 Jason Zych 1 Lectures 38 and 39 : Quicksort Quicksort is the best sorting algorithm known which is

More information

Google SketchUp/Unity Tutorial Basics

Google SketchUp/Unity Tutorial Basics Software used: Google SketchUp Unity Visual Studio Google SketchUp/Unity Tutorial Basics 1) In Google SketchUp, select and delete the man to create a blank scene. 2) Select the Lines tool and draw a square

More information

Arduino IDE Friday, 26 October 2018

Arduino IDE Friday, 26 October 2018 Arduino IDE Friday, 26 October 2018 12:38 PM Looking Under The Hood Of The Arduino IDE FIND THE ARDUINO IDE DOWNLOAD First, jump on the internet with your favorite browser, and navigate to www.arduino.cc.

More information

Sliding and Rotating Objects. Appendix 1: Author s Notes

Sliding and Rotating Objects. Appendix 1: Author s Notes AnimationWorks User Guide AnimationWORKS Introduction Camera Paths Cameras Moving Objects Moving Object Paths Sliding and Rotating Objects Light Objects Class Visibility Objects Transparency Objects Appendix

More information

animation, and what interface elements the Flash editor contains to help you create and control your animation.

animation, and what interface elements the Flash editor contains to help you create and control your animation. e r ch02.fm Page 43 Wednesday, November 15, 2000 8:52 AM c h a p t 2 Animating the Page IN THIS CHAPTER Timelines and Frames Movement Tweening Shape Tweening Fading Recap Advanced Projects You have totally

More information

Pick up a book! 2. Is a reader on screen right now?! 3. Embedding Images! 3. As a Text Mesh! 4. Code Interfaces! 6. Creating a Skin! 7. Sources!

Pick up a book! 2. Is a reader on screen right now?! 3. Embedding Images! 3. As a Text Mesh! 4. Code Interfaces! 6. Creating a Skin! 7. Sources! Noble Reader Guide Noble Reader version 1.1 Hi, Toby here from Noble Muffins. This here is a paginating text kit. You give it a text; it ll lay it out on a skin. You can also use it as a fancy text mesh

More information