Games Fundamentals Introduction

25
Games Fundamentals Introduction Jarek Francik Kingston University 2 February 2007 1 February 2008

description

Games Fundamentals Introduction. Jarek Francik Kingston University 2 February 200 7 1 February 2008. Outline…. Facts Games Fundamentals – what is it about? Why not Flash? Why Java? Why Mathematics? Why Physics? Outline Helicopter. Facts. Dr Jaroslaw (Jarek) Francik – Yarek - PowerPoint PPT Presentation

Transcript of Games Fundamentals Introduction

Page 1: Games Fundamentals Introduction

Games FundamentalsIntroduction

Jarek FrancikKingston University

2 February 2007

1 February 2008

Page 2: Games Fundamentals Introduction

Outline…

Facts Games Fundamentals – what is it about? Why not Flash? Why Java? Why Mathematics? Why Physics? Outline Helicopter

Page 3: Games Fundamentals Introduction

Facts

Dr Jaroslaw (Jarek) Francik – [email protected]

office: SB 318 office hours: Tue 1:30 – 3, Fri 11 – 12 pm.

Lectures: Fri 12 – 1:30 pm SB 224 Workshops: Fri 2:30 – 4 pm SB 224

flexibly exchanged...

Page 4: Games Fundamentals Introduction

Games Fundamentals

Essential background in applied mathematics... ...and physics for Games Developers

Strong focus on practical engineering aspects Taught by example:

real problems typically encountered during games development process

Page 5: Games Fundamentals Introduction

Module Goals, Learning Outcomes, Indicative Curriculum see Module Guide...

Page 6: Games Fundamentals Introduction

Core Text

Wendy Stahler, Fundamentals of Math and Physics for Game Programmers, Pearson Prentice Hall 2006

Page 7: Games Fundamentals Introduction

Support Texts

Andrew Davison, Killer Game Programming in Java, O’Reilly, 2005 David Brackeen, Developing Games in Java, New Riders 2004 Christopher Tremblay, Mathematics for Game Developers,

Thomson Course Technology 2003 David M. Bourg, Physics for Game Developers, O’Reilly 2001 James M. Van Verth, Lars M. Bishop, Essential Mathematics for

Games & Interactive Applications. A Programmer’s Guide. Morgan Kaufmann, 2004

David H. Eberly, Game Physcis, Morgan Kaufmann, 2004

Page 8: Games Fundamentals Introduction

Assessment

coursework (mathematics) 25%1 Feb – 15 Feb – 14 March

coursework (physics) 25%14 March – 11 April – 2 May

examination 50%mid-May

Page 9: Games Fundamentals Introduction

Why not Flash?

Flash is excellent for small games Flash is good for Internet games

No serious big game is written in Flash Large-scale project need professional

approach to programming, not just a scripting C++ Java

Page 10: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles No one uses Java to write real games Sun isn’t interested in supporting Java gaming

Page 11: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles No one uses Java to write real games Sun isn’t interested in supporting Java gaming

MYTHS

Page 12: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming

True in 1996. JDK 1.0 was 20 – 40 times slower than C++ J2SE 5.0 is typically 1.1 times slower Bottleneck is somewhere else (3D hardware, the net)

Java has memory leaks Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles

Page 13: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks

garbage collection

Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles No one uses Java to write real games Sun isn’t interested in supporting Java gaming

Page 14: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level

J2SE 1.4: full-screen exclusive mode (FSEM) JNI: Java Native Interface JInput: Game Controller API until DOOM it was C/C++ what was considered too high level

Java application instalation is a nightmare Java isn’t supported on games consoles

Page 15: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level Java application instalation is a nightmare

just use a good installation software (install4j) code bloat (eg. JRE = 15 MB) but...

which of modern games is less than, say, 600MB? Java isn’t supported on games consoles No one uses Java to write real games

Page 16: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles

well, this one is (still) true... rumours on porting JVM to PS2 – nothing released

No one uses Java to write real games Sun isn’t interested in supporting Java gaming

Page 17: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles No one uses Java to write real games Sun isn’t interested in supporting Java gaming

Puzzle Pirates

Chrome

Law and Order II

Kingdom of Wars

Alien Flux

Runescape

Star Wars Galaxies

Page 18: Games Fundamentals Introduction

Games in Java? Java in Games? Java is too slow for games programming Java has memory leaks Java is too high-level Java application instalation is a nightmare Java isn’t supported on games consoles No one uses Java to write real games Sun isn’t interested in supporting Java gaming

MOBILE GAMES

Page 19: Games Fundamentals Introduction

Games in Java? Java in Games? Java isn’t supported on games consoles No one uses Java to write real games Sun isn’t interested in supporting Java gaming

full-scren mode faster I/O, memory mapping nanosecond timers (v. 5.0) Java 3D Java Media Framework Java Communications API Java Games Profile

Page 20: Games Fundamentals Introduction

Why not C++?

Java is better for education CISM policy

anyway you are strongly advised to learn C++

which is widely used in industry

1. C++

2. On-line Games

3. Java

Page 21: Games Fundamentals Introduction

Why Mathematics?

Geometry – a tool for drawing graphical elements in 2D and 3D

Calculations make the player experience more life-like

eg. rules of perspective

3D animation

Page 22: Games Fundamentals Introduction

Why Physics?

fall down accelerate hit go

throw break fly

ride rotate dig

swim shoot

aim strike bounce

drive catch

explode reflect jump

run kick sail

Page 23: Games Fundamentals Introduction

Outline

1. Introductory Lecture (this one)

2. Java Basics: Introducing Your Game Engine

3. Maths Basics

4. Thales Theorem and Perspective in 3D

5. Roll and Fall: Playing with the Laws of Motion

6. Collisions, Momentum and Energy

7. Resistance and Mechanics of Cars

Page 24: Games Fundamentals Introduction

Outline

8. Explosions

9. Physics Engine

10. Go Round and Round: Physics of Rotational Motion

11. TBA (Logical games? Theory of Games? Chess? Artificial Intelligence?)

Additional lecture in SL?

Page 25: Games Fundamentals Introduction

Demo: Applying Physics to Helicopter