23
3D Tennis game for Pocket PC Nils De Moor 29/06/07 1

Thesis: 3D Tennis game for pocketPC

Embed Size (px)

Citation preview

Page 1: Thesis: 3D Tennis game for pocketPC

3D Tennis game for Pocket PC

Nils De Moor29/06/07

1

Page 2: Thesis: 3D Tennis game for pocketPC

AIMproductions

Page 3: Thesis: 3D Tennis game for pocketPC

Overview

I n t r o d u c t i o n

S p e c i f i c a t i o n s

D e s i g n

I m p l e m e n t a t i o n

Page 4: Thesis: 3D Tennis game for pocketPC

IntroductionPocket PC

OpenGL ES

Non programmable hardwareVincent3D implementation

Platform limitations

Memory bandwidthFixed point numbersDivision

Page 5: Thesis: 3D Tennis game for pocketPC

Overview

I n t r o d u c t i o n

S p e c i f i c a t i o n s

D e s i g n

I m p l e m e n t a t i o n

Page 6: Thesis: 3D Tennis game for pocketPC

Specifications (1/2)Graphics

court, crowd, players, ball

Gameplay

Movement with DPad / Joystick

Hit with action button

Service with power bar

Page 7: Thesis: 3D Tennis game for pocketPC

Specifications (2/2)Artificial Intelligence

trade-off between realism and perfomance

calculate first bounce-spot

hit-chance randomly

Page 8: Thesis: 3D Tennis game for pocketPC

Overview

I n t r o d u c t i o n

S p e c i f i c a t i o n s

D e s i g n

I m p l e m e n t a t i o n

Page 9: Thesis: 3D Tennis game for pocketPC

Design

Page 10: Thesis: 3D Tennis game for pocketPC

Overview

I n t r o d u c t i o n

S p e c i f i c a t i o n s

D e s i g n

I m p l e m e n t a t i o n

Page 11: Thesis: 3D Tennis game for pocketPC

ImplementationBall

BillboardingPhysicsHit algorithm

Player

3D MeshAnimation

Artificial Intelligence

Game loop

Page 12: Thesis: 3D Tennis game for pocketPC

Billboarding (1/2)“Adjust an objects’ orientation according to another object (e.g. the camera)”

Look at vector

Page 13: Thesis: 3D Tennis game for pocketPC

Billboarding (2/2)Phase 1: Cylindrical billboarding

Phase 2: Extend to Spherical billboarding

Page 14: Thesis: 3D Tennis game for pocketPC

Physics (1/2)Calculate forces in each frame based on values of previous frames 2 possible numerical integration techniques

Euler methodposition (x), velocity (v), acceleration (a), timestep (∆tn)xn+1 = xn + vn . ∆tnvn+1 = vn + an . ∆tn

Verlet integration

position (x), constant acceleration (a), constant timestep (∆t), NO velocityxn+1 = xn + (xn - xn-1) + a . ∆t2

Page 15: Thesis: 3D Tennis game for pocketPC

Physics (2/2)Comparison:

Page 16: Thesis: 3D Tennis game for pocketPC

Hit algorithmInitial parameters

Algorithm

Collision DetectionCheck if point is in planeCheck if ball is in range of the player

Reflection

Page 17: Thesis: 3D Tennis game for pocketPC

3D Mesh LoadingTexture format

BMP

TGA

Mesh format

OBJ

3DS

Page 18: Thesis: 3D Tennis game for pocketPC

Animation3 reviewed techniques

Skeletal animation

Motion tweening

Frame sequence animation

Page 19: Thesis: 3D Tennis game for pocketPC

Artificial IntelligenceSeveral plausible techniques reviewed

Combination of 2 techniques:

Random logic

Let the player hit the ball with a certain randomness

Deterministic algorithm

Calculate where ball will bounce

Move player to that spot

Page 20: Thesis: 3D Tennis game for pocketPC

Game LoopStandaard game loop:

Keep update rate constant independent of display rate

needed for physicsinput needs to get registered at all timecorrect AI

while ( game_running ) {update_game();display_game();

}

Page 21: Thesis: 3D Tennis game for pocketPC

Screenshots

Page 22: Thesis: 3D Tennis game for pocketPC

Conclusion

Many possible techniques for videogames...

... few are usable on Pocket PC’s

Page 23: Thesis: 3D Tennis game for pocketPC

Future workMenu + GUI

Complete gamerules

AI enhancements

Extensive playtests