Presentazione senza titolopercro.sssup.it/~marcello/didattica/XVR/Projects/RoyalePolitique... ·...

23
Royale Politique A funny game developed for the RV course - University of Pisa

Transcript of Presentazione senza titolopercro.sssup.it/~marcello/didattica/XVR/Projects/RoyalePolitique... ·...

Royale Politique

A funny game developed for the RV course - University of Pisa

First of all

Based on an idea matured during the last elections turn: << In Italy the politic race is very similar to a game where the unique goal is to kill the other opponents... there is no philanthropic scope in our politicians: it's just a race where everyone would like to eliminate his opponents..nothing else >>

So,taken in inspiration by this sentence, here's the basic idea for this game: this is just a race, where the unique scope is to destroy the enemies, and win the election day.

Abstract

"Royale politique" is a simple death match kart racing game build for the the xvr engine using the xvr scripting language (like "super mario kart", for example).

Two game modes:Local game (One vs. All opponents)Network game (One vs. One)

Win point:Kill all the opponents

No time limitsFour weapons typesSix characters (FI, AN, LN, PD, IDV, RC)Four different arenas (Lombardy,Apulia,Sardinia,Tuscany)

In depth: code structure

All the code is subdivided into classes:Main classes:

systemManagergameManagermenuManager

Gaming classes:arenaManagerbonusManagerplayerManageropponentsManagerweaponsManager

OthernetManagereffectsManager

Classes details

systemManager: main program module gameManager: collisions and statistics managermenuManager: main menu and in-game menu manager

arenaManager: main gaming arena classbonusManager: random bonus generation classplayerManager: 3rd person player manageropponentsManager: AI manager for bot playersweaponsManager: damage and player health manager

netManager: low level network managereffectsManager: for the damage animations

systemManager

SystemManager class is the main control class of the game.

Provides:Level loadingCamera managementI/O managementMusic management

OnDraw cycle: draws every CVmObj in the scene

OnTimer performs an AI step

gameManager

gameManager class coordinates all the game events for the match.

Events (received from player/opponent) Fire : emit a projectile, or a missile, or... Damage : for each Fire event check the collision PlayEffect : in case of collision, play audio effect

arena

Four different arenas: _Lombardy _Sicily _Tuscany _Apulia

Each arena model build with blender (from scratch) and texturized using hi-res satellite images (thanks to google earth)

The arena class provides basic intersection checks for the physics of the model.

player

The player class provides control for the 3rd person player model:

EmitEvent : used by gameManager to send events to the model (go, brake, turn, fire, etc...)ManageArenaKeraKoll : used to elaborate the basic interaction model between the arena and the player model. AssignBonus, ApplyDamage, PlayEffect : to manage events

player: model

Six differents kart models based on the same model maiden from scratch with blender.Each model is decorated with different textures

player: pseudo-physics

The player object is not related to the world with a real physic engine, but with a more small and thin approach: for each collision with the arena, the object is rotated in order to obtain his local Y axis as near as possible to the collision's normal

player: graphics

The player object is rendered per fragment using a simplified phong shader that forces high the texture's illumination in order to obtain a good illumination for each player.

opponents

All the opponent models are loaded starting from the player's choice, in order to use all the availables game's models during the match.

opponents: AI ideas

The AI approach used to simulate a sort of realistic driving for the opponents class is based on simple considerations:

Each arena is closed : it's impossible to go outside, so when the "height" value is near to the limit, the AI has to make the bot turning to the groundEach bot has to kill each other : no preferences on target decisionIt should be more realistic if each bot could select a target and persecute him until his death

opponents: AI algorithm

Starting from these concepts the AI has been developed as follows :

height ceck : turn down in case of high level reachedopponents lookup : using a "radar" cone approach (60 degrees) the opponent searches iteratively for a targetback fire prevention : in case of damage turn left or right randomly in order to prevent a "rain of fire"

opponents: damaging effects

About the graphics, the opponent object uses the standard shader also used for the player class.

But, in case of damage, a different shader is loaded for a limited amount of time : a *simple* shader maiden from scratch that forces the model to be rendered "flat" for a few of seconds.

And also a floating billboard representing the damage level is drawn

weapons

The game provides four different weapons types:

Simple laser : low damage, low damage cone, unlimitedRocket : medium damage, low damage cone, limited (100)Rolling Bomb : medium damage, high damage cone, limited (50)Big Bomg : high damage, static, high damage cone, imited(3)

Each model build from scratch using blender

weapons: damage assignment

Each weapon type has a property named "damage cone" representing the nearest distance from an object before the damage has to be assigned.

This is because the collision model is based on distance evaluation for each player (from 6 to 2) and for each bullet fired (approx 200 if each opponent emits the "fire" event simultaneously)

random bonus

The game provides also a basic bonus function:Always 20 bonus in the arena (in random positions)Each bonus provides random benefits (life care, missiles, bombs, etc...)Simple cube model

main menu

Main menu provides basic configuration options : Music on/offShaders on/off : if disabled, the game will be less funDifficulty level (medium/low/high) : influences the ealth parameters for each player

on game menu

.

Musics and effects

Simple music background based on famous Paganini's sonatas.Simple weapons effects (classic laser sound)Simple "real politics" effects : when a player got damaged, a simple wav with real-life words is played (thanks to youtube)

end...

Controls:W : GoS : BrakeA, D : Turn left / rightI : LaserO : RocketP : Rolling bombK : Big bomb

...thank you!