Fundamentals of Level Editor Design and Implementation.

Slides:



Advertisements
Similar presentations
Introduction Games have always been a fundamental part of human life. Space storm “ عاصفة الفضاء” is a 3D SCI-FI game that consists of two stages presented.
Advertisements

5/20/20151 Using UDK Editor CIS 488/588 Bruce R. Maxim UM-Dearborn.
Basic Orientation for 3D Animation (Y-Up Version)
Intro to Blender Alex Hawker. First Steps Download
INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
SE 313 – Computer Graphics Lecture 11: Projection Painting and Merging Textures Lecturer: Gazihan Alankuş 1.
Modeling and Animation with 3DS MAX R 3.1 Graphics Lab. Korea Univ. Reference URL :
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
CSE 380 – Computer Game Programming Introduction ITS 102 – 3D Modeling for Games Blender's User Interface.
Introduction to 3D Computer Graphics and Virtual Reality McConnell text.
DEVSView: A DEVS Visualization Tool Wilson Venhola.
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
10/9/20151 Unreal Basics CIS 488/588 Bruce R. Maxim UM-Dearborn.
V part C.  Different programs have different ways of displaying objects in real-time while the scenes are being created within the workspace. Some.
Lecture Set 13 Drawing Mouse and Keyboard Events Part B – Mouse and Keyboard Events.
Web Games Programming An Introduction to Unity 3D.
Z-Town Technical Details Ben Trivett, Drew Switzer, Cameron Jett, Ryan Southard Department of Computer Science and Engineering The Ohio State University.
UFCFS D Technologies for the Web Unity 3D: Review of Topics and Related Concepts.
CSE 381 – Advanced Game Programming Code Setup.
COM148X1 Interactive Programming Lecture 7. Topics Today HCI Event Handling.
Lecture 11: Exam Revision 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271  Coursework.
Learning Unity. Getting Unity
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
GISMO/GEBndPlan Overview Geographic Information System Mapping Object.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Fundamentals of Level Editor Design and Implementation – Pt.2.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
UFCEK-20-3Web Games Programming Unity 3D: Review of Topics Publishing for the Web.
V part 3.  Different programs have different ways of displaying objects in real-time while the scenes are being created within the workspace. Some.
INTRODUCTION GORT is a virtual 3D modeling environment for computer programmers. Its main area of focus is to aid in the education of programmers learning.
Computer Graphics Camera Projection / Picking CO2409 Week 8 - Optional Advanced Material Not on Exam.
Introduction to 3d Modeling Simple Polygon Modeling Using 3D Max
Chapter III Rasterization
Dr Nick Mitchell (Room CM 224)
Copyright © 2015 Curt Hill Building a Simple Level No UnrealScript but several editors.
1 OGRE Programming Intermediate Tutorial. 2Contents 2 1.Select any object on the screen using the mouse 2.Restrict what is selectable.
 2002 Prentice Hall. All rights reserved. 1 Outline Mouse Event Handling Keyboard Event Handling Graphical User Interface Concepts:
UFCFSU-30-13D Technologies for the Web An Introduction to Unity 3D.
Design Visualization Software Introduction / Review.
Computer Graphics Imaging Lecture 13 and 14 UV Mapping.
Introduction to JavaScript Events Instructor: Sergey Goldman 1.
Internet & World Wide Web How to Program, 5/e.  JavaScript events  allow scripts to respond to user interactions and modify the page accordingly  Events.
Microsoft Publisher 2010 Lesson 4 Graphics in Publications.
Introducing Scratch Learning resources for the implementation of the scenario
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Chapter 9 Advanced Assembly Modeling Techniques. After completing this chapter, you will be able to perform the following: –Create design view representations.
DB Implementation: MS Access Forms. MS Access Forms: Purpose Data entry, editing, & viewing data in Tables Forms are user-friendlier to end-users than.
Game Development with Unity3D
Welcome! Day1, Lesson 1.
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Getting started in Alice
Creating Vector Graphics
Introducing Blender.
Chapter Lessons Understand the Macromedia Flash workspace
Introduction to OpenSCAD.
Introduction to Events
Assignment 8 Chess Game.
EEC-693/793 Applied Computer Vision with Depth Cameras
DB Implementation: MS Access Forms
CSE 381 – Advanced Game Programming Terrain
3D Max screen shot Top view Right side view Front view
Computer Animation UV Mapping.
Projection in 3-D Glenn G. Chappell
DB Implementation: MS Access Forms
Viewing Tools V part 3.
Week 6: Time and triggers!
EEC-693/793 Applied Computer Vision with Depth Cameras
Games Development Game Architecture: Entities
Presentation transcript:

Fundamentals of Level Editor Design and Implementation

Introduction At the end of this lecture you will be able to: –Know at a high level what game levels are –Understand how game levels are designed and built –Understand the motivations behind a level editor –Understand the basic functionality for simple level editors –Learn some fundamental design and implementation details behind some of these basic functionality

References MOGREhttp:// MOGRE

Game Levels Why do we need Game Levels? –Provides variety in gameplay –Provides staged and periodic sense of accomplishment –Aids immersion in story or virtual world –Advances storyline What is a Game Level? –A separate area or setting in a game’s world –Consists of a unique arrangement of the game objects and environment to present a different challenge and/or experience of the game world to the player

How Levels are Built A level design is created and documented The functionality of game objects and the mechanics of the general gameplay are implemented in code Art assets are created for the game objects For integration purposes between art and code, placeholders are created on both sides A level builder integrates with some of the game engine code and has access to the store of art assets for game objects

How Levels are Built The level is implemented by using the level builder to organise and integrate game objects together into a level. The level is QA Tested within the game Refined and retested Ready for release We are going to focus on the actual implementation of the level based on using the level builder tool

How Levels are Built Constituents of a level depends on the game, but can include: –Level geometry –Player spawn points –Enemy positions –Obstacles and traps –Collectables and power ups –Boss positions –Triggers and events –Scripted scenes –Lights –Interactive prop placements –Etc.

Goals of a Level Building Tool Minimise programmer involvement for creation and integration of game content Allow for tweaks to the level to be quickly implemented and retestable Flexibility and extensibility (for the addition of new content) etc. Possible reuse for later developed games

Goals of a Level Building Tool Possible release for public use – for user created content and mods GUI usability and user friendliness Also provides indication to publisher of current state of gameplay, or planned gameplay mechanics if only placeholders are available and used

Functionality Robust – especially if to be released for public use Maintains data integrity – want to avoid data corruption and incompatibility between versions of the game engine and tool etc. Adheres to game interfaces. –Serialisation of in-game structures Graphical performance not as high a priority compared to in-game performance

Functionality Some typical functionality: –Multiple viewports with different points of view (orthographic front, side, top, perspective) –Appropriate camera movement within viewports –3D Picking –Object selection and placement –Object movement and rotation –Multiple object selection and movement –Saving and loading –Keyboard controls re-mappings

Geometry Editing Consider: –Advanced support within tool: polygon and 3D volumes creation texturing vertex editing Constructive Solid Geometry ( CSG ) –Partial support: Basic 3D volumes ( spheres, boxes etc ) –External importations: From 3D packages ( Maya, 3DS Max, Blender etc ) –All of the above

Design and Implementation The following slides will discuss some design and implementation aspects of some of the basic functionality of a level editor

Multiple Viewports Create separate MOGRE render windows Associate each with a handle for different Windows controls For each render window, create a viewport and attach a different camera Set the appropriate camera properties to reflect the viewport type (e.g. projection type, position and orientation, render style – wireframe, solid etc )

Multiple Viewports NameValuePairList misc = new NameValuePairList(); misc["externalWindowHandle"] = this.Handle.ToString(); mRenderWindow = m_Editor.Root.CreateRenderWindow("RW" + mCount, 800, 600, false, misc); mCamera = m_Editor.SceneManager.CreateCamera("Came ra" + mCount++); mCamera.AutoAspectRatio = true; mRenderWindow.AddViewport(mCamera);

Multiple Viewports switch (type) { case OGREditViewType.PERSPECTIVE: mCamera.ProjectionType = ProjectionType.PT_PERSPECTIVE; mCamera.PolygonMode = PolygonMode.PM_SOLID; mCamera.Position = new Vector3(0, 200, 0); mCamera.LookAt(new Vector3(50, 170, 50)); break; case OGREditViewType.SIDE: mCamera.ProjectionType = ProjectionType.PT_ORTHOGRAPHIC; mCamera.PolygonMode = PolygonMode.PM_WIREFRAME; mCamera.Position = new Vector3(-1, 0, 0); mCamera.LookAt(new Vector3(0, 0, 0)); mCamera.FOVy = m_FOVy; break;

Multiple Viewports Consider the following features: –Multiple Document Interface – sub windows –Ability to dynamically change the viewport type –For the perspective viewport, being able to change the render style ( solid, wireframe, textured, lit etc ) –Drawing grid lines

Camera Controls Allows the user to pan, zoom, and rotate the camera independently in different viewports Not all controls may be applicable in all viewports – eg. No rotate in orthographic views Attach the appropriate mouse or key event handler to the control / form containing the render window this.MouseDown += new MouseEventHandler(MouseDownHandler);

Camera Controls MouseDown, MouseUp and MouseMove events can be used in conjunction for the detection of dragging operations with the mouse Use the appropriate KeyEventArgs or MouseEventArgs to determine what state the mouse / keyboard is in Use Cursor.Position to determine the current cursor position ( in screen coordinates ) Alternatively, the.x and.y properties of the MouseEventArgs gives the current cursor position relative to the control Use Control.ModifierKeys to determine whether any of the other CTRL, ALT, SHIFT etc keys are being pressed

Camera Controls Zooming in orthographic view should be implemented as a change in the camera’s FOV proportionally to the change in mouse Y coordinates, rather than ‘moving’ the camera forwards or backwards Rotation in the perspective view can be implemented as yawing and pitching the camera proportionally to the change in the mouse’s X and Y coordinates respectively

3D Picking Picking – when the user clicks on the screen, convert this into a 3D ray which can be used to check for collision with objects in the 3D world Supported under MOGRE with a simple call to: GetCameraToViewportRay Parameters are in 2D screen coordinates (i.e. [0,1] x: left to right, y: top to bottom ) Can use the.x and.y properties of the MouseEventArgs divided by the width and height of the renderwindow’s parent control

3D Picking A RaySceneQuery can be constructed from the picking ray and executed to return a list of objects colliding with the ray within the scene The collision test with the ray is only performed with the objects’ bounding volumes only, not on detailed a mesh face level Note that different scenemanagers may implement their scene queries differently The TerrainSceneManager requires the origin of the ray to be over the top of the terrain in order to register a hit

3D Picking void MouseDblClickHandler(object sender, MouseEventArgs e) { float clipx = (e.X / (float)this.Width); float clipy = (e.Y / (float)this.Height); m_RaySceneQuery.Ray = cam.GetCameraToViewportRay(clipx, clipy); RaySceneQueryResult result = m_RaySceneQuery.Execute(); for (RaySceneQueryResult.Iterator itr = result.Begin(); itr != result.End(); itr++) { if ( itr.Value.worldFragment != null ) {..} else if ( itr.Value.movable != null ) {..} }

3D Picking Two types of collision results: movable and worldFragment WorldFragment indicates collision with the world geometry. Can inspect property: singleIntersection to get the exact intersection coordinate Useful for marking a point on the level geometry for further processing ( placing spawn point etc. ) movable indicates a possible entity whose bounding volume has collided with the ray – can work with this further to mark this object as ‘selected’

3D Picking Other Considerations: –.SetSortByDistance() method, sorts all results based on distance collided with ray –QueryMask and QueryFlags – set QueryFlags on entities so that only those which pass the QueryMask on the ray query will be returned in the results list ( uses bit OR operations )

Lecture Review Know at a high level what game levels are Understand how game levels are designed and built Understand the motivations behind a level editor Understand the basic functionality for simple level editors Learn some fundamental design and implementation details behind some of these basic functionality