CIS 487/587 Bruce R. Maxim UM-Dearborn

Slides:



Advertisements
Similar presentations
Windows Basics An Introduction to the Windows Operating System.
Advertisements

Creating and Editing a Web Page Using Inline Styles
Customizing the MOSS 2007 Search Results November 2007 Rafael Perez.
Windows XP Basics OVERVIEW Next.
5/24/20151 Torque Constructor CIS 487/587 Bruce R. Maxim UM-Dearborn.
The sequence of folders to a file or folder is called a(n) ________.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Project 3 File, Document, Folder Management, Windows XP Explorer Windows XP Service Pack 2 Edition Comprehensive Concepts and Techniques.
Macromedia Dreamweaver 8-- Illustrated Introductory 1 Macromedia Dreamweaver 8 Unit F Creating Links and Navigation Bars.
Microsoft Windows Vista Chapter 1 Fundamentals of Using Microsoft Windows Vista.
Microsoft Windows 7 Part 1 Fundamentals of Using Windows 7.
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
1 The EDIT Program The Edit program is a full screen text editor that allows you to: Create text files Create text files Edit an existing text files Edit.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
1. Profile settings 2. Messaging system 3. Downloading files 4. Uploading files 5. Creating groups 6. Calendar events.
Adobe Flash CS3 Revealed Chapter 3 - WORKING WITH SYMBOLS AND INTERACTIVITY.
Chapter 1 Creating a Dreamweaver Web Page and Local Site
Learning Unity. Getting Unity
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Derived from Kirill Muzykov’s Rocket Mouse Tutorial WakeUpAndCode.com.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Creating and Editing a Web Page
Photoshop Actions Lights, Camera, Actions in Photoshop.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Mind Mapping with Bubbl.us. The Bubbl.us Homepage Click to create a bubbl.us account Sign in or, To access, type
Pasewark & Pasewark 1 Windows Vista Lesson 1 Windows Vista Basics Microsoft Office 2007: Introductory.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Fundamentals of Windows Mouse n 4 Basic Operations: –Pointing –Clicking –Double Clicking –Dragging.
Game Development with Unity3D
Dive Into® Visual Basic 2010 Express
Getting an account with WordPress.com
EEC-693/793 Applied Computer Vision with Depth Cameras
Game Development with Unity3D Inside/Outside Unity3D
Getting Started with Application Software
Using Macros, Switchboards, PivotTables, and PivotCharts
5/23/2018 Additional Features of WordPad
Unit Objectives Insert an image Align an image Enhance an image
2 At the top of the zone in which you want to add the Web Part, click Add a Web Part. In the Add Web Parts to [zone] dialog box, select the check box of.
EEC-693/793 Applied Computer Vision with Depth Cameras
2 At the top of the zone in which you want to add the Web Part, click Add a Web Part. In the Add Web Parts to [zone] dialog box, select the check box of.
Chapter 2 – Introduction to the Visual Studio .NET IDE
An Introduction to Computers and Visual Basic
EEC-693/793 Applied Computer Vision with Depth Cameras
MS PowerPoint 2010 Week 2.
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Chapter 7 Advanced Form Techniques
Module 1: Getting Started with Windows 95
Adding and Manipulating Objects
NORMA Lab. 7 Generating Reports More Display Options
Chapter 2 – Introduction to the Visual Studio .NET IDE
CIS 487/587 Bruce R. Maxim UM-Dearborn
Integrating JavaScript and HTML
CIS 487/587 Bruce R. Maxim UM-Dearborn
CIS 487/587 Bruce R. Maxim UM-Dearborn
Cell Simulation.
Working with Symbols and Interactivity
CIS 487/587 Bruce R. Maxim UM-Dearborn
An Introduction to Computers and Visual Basic
How to PostPower Point Presentations
Using Templates and Library Items
Fundamentals of Using Microsoft Windows XP
EEC-693/793 Applied Computer Vision with Depth Cameras
CSC 221: Introduction to Programming Fall 2018
Windows Operating System
Executive Reports, Instructions and Documentation
An Introduction to the Windows Operating System
Presentation transcript:

CIS 487/587 Bruce R. Maxim UM-Dearborn Torque Basics CIS 487/587 Bruce R. Maxim UM-Dearborn 4/3/2019

Goals Based on the tutorial example shipped with the Torque (TGE) game engine Build a simple 3D game Show basic use of the world, terrain, and GUI editors Demonstrate use of Torque Script in client/server programming 4/3/2019

Where to begin? Start in the directory C:Torque/SDK/Example Clicking on the torqueDemo icon starts a windows executable that will process the script stored in the file main.cs found in the same directory (by default) This brings up a splash screen with several links 4/3/2019

Using the Links You need Internet connectivity to use several of the links There are also links to the Torque editors, console, and exit Typing quit(); in the console command line also allows you to exit the tutorial 4/3/2019

Building a Game Start by making a copy of the folder tutorial.base called GameOne Use NotePad to edit the main.cs script file in the GameOne folder Change line that describes the game to read $defaultGame = “GameOne”; Save your changes 4/3/2019

GameOne Folder client data server contains several client scripts and ui folder (graphics and widget scripts) data contains resources (models, textures, sounds, scripts associated with resources) server several server scripts Note: xxx.cs.dso files contain compiled xxx.cs code 4/3/2019

World Editor The World editor link on the demo splash screen loads a mission that can be edited F2 - turns off the inspector windows F11 - toggles World Editor on or off F10 - toggles GUI Editor on or off 4/3/2019

Movement Camera view Camera menu is in the World editor Alt-C - camera/player toggle R-Click-drag - look around W, A, S, D - walk around R-Click-Tab - toggle 3rd person player view Alt-Q - drop camera at player Alt-W - drop player at camera Camera menu is in the World editor 4/3/2019

Terrain Shaping Move camera so you look down on the player off to the side and select the Terrain Editor Adjust Brush size (Ctrl-Z or Menu) Use Mouse to adjust height (determined by Action menu setting) Relight the scene from Edit menu The Player may end up underground if you are not careful toggle camera mode (Alt-C) and drop camera at Player (Alt-W) to check 4/3/2019

Terrain Painting - 1 Return to Camera view (Alt-C) and select Terrain Texture Painter from Window menu Select change under the checkerboard box Find the file sand.jpg in the folder GameOne/data/terrains and press load This changes everything to sand 4/3/2019

Terrain Painting - 2 Select change under one of the empty boxes Locate patchy.jpg file in the folder GameOne/data/terrains and press load The Action menu item has changed to Paint Material Select a Brush and paint some of the hills (relighting not necessary) 4/3/2019

Terrain Painting - 3 Terrain looks great from a far but not up close To add a detail texture, go to the World Editor Inspector and select the Terrain TerrainBlock from the MissionGroup In the Media section find the detailTexture browse button and load Game/One/terrains/detail1.png Save your mission using the file menu as GameOneMission.mis in the folder GameOne/data/missions 4/3/2019

Placing Objects - 1 Change to Camera view and select the World Editor Creator item in the Window menu Default action is to drop item at screen center so rotate screen so center is on the ground Expand Shapes in lower window, drill down to TorqueLogo, mouse click on this item will place it in the center of the screen Be careful it is easy to put things underground or in the air where they are nor visible to the Player 4/3/2019

Placing Objects - 2 The number under an object is its number (null is its default name) The axis lines can be used to drag object to a new point The object can also be moved by going to the World Editor Inspector and selecting it from the Tree Object attributes can be modified in the Inspector window as well (remember to use the Apply button before you Save) 4/3/2019

Interiors Shapes are based on .dts files interiors are based on .dif files Interiors are placed using the World Editor Creator Go to Interiors/GameOne/data/interiors and drill down to place a box on the screen Relight the terrain when prompted Move the box so it is not on a hill and its floor is level with the ground (so the Player can enter the box and explore it) and save it 4/3/2019

Organizing Objects You can create folders called SimGroups to hold related objects Expand the MissionObjects/System/ in the World Editor Creator Click on the SimGroups item and use the dialog box to create a logos SimGroup and drag each of the logo items to the logos SimGroup (name is important for scripting) Create a buildings SimGroup for the box and then save your work 4/3/2019

Graphical User Interface - 1 Return to the TGE main page by quitting the World Editor (File – Quit) or Restart Torque To Select the GUI editor or use F10 You will see 3 buttons on the left side of the screen New Control MainMenuGui 640 x 480 4/3/2019

Graphical User Interface - 2 Select MainMenuGui in the Tree view Scroll down in the inspector window and find the bitmap field Change background to gameonebg and hit Apply You can remove the buttons from the top, but if you do you should add a Start and Quit button 4/3/2019

Graphical User Interface - 3 To add a button use the New Control drop down menu and select GuiButtonCtrl Drag the button to its desired location Change the text field from ‘Button’ to ‘Start’ and type “loadMyMission();” in the command field then hit Apply 4/3/2019

Graphical User Interface - 4 You might also want to go back and change the horizSizing and vertSizing to relative and hit Apply and Save again To create a Quit button, repeat process and label the control with ‘Quit’ and enter “quit();” in the command field of the new button 4/3/2019

Graphical User Interface - 5 To add a score counter use the Start button to enter the game Use F10 to open the GUI editor and select PlayGui from the pull down menu Add the new control by selecting the GuiTextCtrl from the pull down menu Enter ScoreCounter in the name field 4/3/2019

Graphical User Interface - 6 In the General section enter Score: 0 in the text field In Parent section change the profile to GuiBig TextProfile from the menu (…) Use the Apply button and Save 4/3/2019

Scripting - 1 Find the script logoitem.cs in the Windows folder GameOne/server Enter the following function at the end function TorqueLogoItem::onCollision(%this, %obj, %col) { // collision function for all Torque logo shapes // %this – data block // %obj - object itself // %col - object that collided with %obj 4/3/2019

Scripting - 2 // check for logo collision with player object if(%col.getClassName() $= "Player") { // %client becomes client whose player hit logo %client = %col.client; // increment score and message with score to client %client.score++; commandToClient(%client, 'SetScoreCounter', %client.score); // remove object from logos %obj.delete(); 4/3/2019

Scripting - 3 // find out how many logo items remain in logos %logoCount = logos.getCount(); // if more logos remain continue game if(%logoCount > 0) return; // otherwise have client display victory screen commandToClient(%client, 'ShowVictory', %client.score); } 4/3/2019

Scripting - 4 Open the folder GameOne/client and create a new text file containing the following functions in a file called clientGame.cs function clientCmdSetScoreCounter(%score) // This function processes the onCollision server call // commandToClient // (%client, 'SetScoreCounter', %client.score); // // replaces text in GuiTextCtrl in play screen { ScoreCounter.setText("Score:" SPC %score); } 4/3/2019

Scripting - 5 // (%client, 'ShowVictory', %client.score); function clientCmdShowVictory(%score) // this function processes the server call // commandToClient // (%client, 'ShowVictory', %client.score); // // displays a message box to get user choice { MessageBoxYesNo("You Win!", "Would you like to restart the game?", "loadMyMission();", "quit();"); } 4/3/2019

Scripting - 6 Last we need to add a line to file main.cs in the folder GameOne/main.cs This line goes at the end of the Client scripts section to link our new script into the game exec("./client/clientGame.cs"); Now all that’s left to do is play test the final game and fix any problems 4/3/2019

Scripting - 7 One of those problems is getting the Score to display as 0 when the mission reloads Add these lines to function onMissionLoaded( ) in the file game.cs found in the folder GameOne/server/game.cs %score=0; ScoreCounter.setText("Score:" SPC %score); 4/3/2019