SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Useful Tools for Making Video
Games
Part II
An overview of
Sample Games
Slam Soccer 2006
H-Craft Championship
Di Jabolo
Gekkeiju Online
Inevitable Online
Features
Platform & Graphics API independent
Direct import of common mesh and
texture formats
Shader support
Character animation
Particle effects, billboards, light maps,
shadows, environment mapping
Easy physics integration
Open source!
Startup Sequence
Main() {
// startup engine …
// load scene & models …
// add camera, turn on lights …
// draw everything
while(device->run() && driver) {
driver->beginScene(true, true,
video::SColor(255,0,0,255));
scenemgr->drawAll();
driver->endScene();
}
return 0;
}
Loading models
Some of supported formats
.3ds, .obj, .x, .ms3d, .mesh, .bsp, .md2 …
IAnimatedMesh* mesh =
smgr->getMesh("../../media/sydney.md2");
IAnimatedMeshSceneNode* node =
smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0,
driver->getTexture("../../media/sydney.bmp") );
}
Adding camera
addCameraSceneNode()
addCameraSceneNodeMaya()
addCameraSceneNodeFPS(
ISceneNode * parent = 0,
f32 rotateSpeed = 100.0f,
f32 moveSpeed = 500.0f,
s32 id = -1,
SKeyMap * keyMapArray = 0,
s32 keyMapSize = 0,
bool noVerticalMovement = false,
f32 jumpSpeed = 0.f)
Loading Quake3 maps
scene::IAnimatedMesh* mesh =
smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0;
if (mesh) {
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
}
if (node) {
node->setPosition(core::vector3df(-1300,-144,-1249));
}
Custom SceneNode’s
class CSampleSceneNode : public scene::ISceneNode {…};
core::aabbox3d<f32> Box;
video::S3DVertex Vertices[4];
video::SMaterial Material;
irr::video::S3DVertex::S3DVertex (
const core::vector3df & pos,
const core::vector3df & normal,
SColor color,
const core::vector2d< f32 > & tcoords);
u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 };
driver->drawIndexedTriangleList(Vertices, 4, indices, 4);
User Input
class MyEventReceiver : public IEventReceiver {
public:
virtual bool OnEvent(SEvent event) {
// event types: GUIEvent, KeyInput, LogEvent, MouseInput, UserEvent
if (event.EventType == irr::EET_KEY_INPUT_EVENT) {
switch(event.KeyInput.Key) {
case KEY_KEY_W:
…
break;
}
}
};
…
MyEventReceiver myEventReceiver;
device = createDevice(…, &myEventReceiver);
…
Character Animation
scene::IAnimatedMeshSceneNode* animMS =
smgr->addAnimatedMeshSceneNode(smgr->getMesh("…/sydney.md2"));
scene::ISceneNodeAnimator* anim =
smgr->createFlyStraightAnimator(core::vector3df(…),
core::vector3df(…), 10000, true);
animMS->addAnimator(anim);
anim->drop();
animMS->setMaterialFlag(video::EMF_LIGHTING, false);
animMS->setFrameLoop(320, 360); anms->setAnimationSpeed(30);
animMS->setRotation(core::vector3df(…));
animMS->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));
GUIs
IGUIEnvironment* env = device->getGUIEnvironment();
Env->add[…]();
addTab ();
addWindow ();
addMenu ();
addMessageBox ();
addStaticText ();
addToolBar ();
addScrollBar ();
addSpinBox ();
addButton (…);
addCheckBox ( );
addComboBox ();
addEditBox ();
addFileOpenDialog ();
addImage ();
addListBox ();
2D Graphics
video::ITexture* images = driver->getTexture(…);
driver->makeColorKeyTexture(images, core::position2d<s32>(0,0));
core::rect<s32> frames[NUM_FRAMES]; // fill in rect coordinates
…
while(device->run() && driver) {
static int currentFrame = 0;
u32 time = device->getTimer()->getTime();
if (time/33 % 2) {
currentFrame = (++currentFrame)%NUM_FRAMES;
}
driver->draw2DImage(images, core::position2d<s32>(…),
frames[currentFrame], 0,
video::SColor(255,255,255,255), true);
}
Particle Systems
// fire particle system
scene::IParticleSystemSceneNode* ps = 0;
ps = smgr->addParticleSystemSceneNode(false);
ps->setPosition(…);
scene::IParticleEmitter* em = ps->createBoxEmitter( …);
ps->setEmitter(em);
scene::IParticleAffector* paf = ps-
>createFadeOutParticleAffector(…);
ps->addAffector(paf);
ps->setMaterialTexture(…);
Terrain Rendering
scene::ITerrainSceneNode* terrain =
smgr->addTerrainSceneNode(…);
terrain->setScale(…);
terrain->setMaterialFlag(…);
terrain->setMaterialTexture(…);
terrain->setMaterialType(…);
terrain->scaleTexture(1.0f, 20.0f);
For more details…
Go through the tutorials under the
“examples” directory
Check out the API and forums
Language bindings and add-ons
Java/PureBasic/Python ports
irrEdit scene editor
irrKlang 3D audio library
Exporters/importers etc
Go to Add-ons site
References
http://irrlicht.sourceforge.net/

Mais conteúdo relacionado

Mais procurados

Test Plan | Sonny 2 | Sylvain Bakri
Test Plan | Sonny 2 | Sylvain BakriTest Plan | Sonny 2 | Sylvain Bakri
Test Plan | Sonny 2 | Sylvain Bakri
Sylvain Bakri
 
Html5 game programming overview
Html5 game programming overviewHtml5 game programming overview
Html5 game programming overview
민태 김
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
Bitla Software
 

Mais procurados (11)

TicketBEKA? Ticket booking
TicketBEKA? Ticket bookingTicketBEKA? Ticket booking
TicketBEKA? Ticket booking
 
UIImageView vs Metal [日本語版] #tryswiftconf
UIImageView vs Metal [日本語版] #tryswiftconfUIImageView vs Metal [日本語版] #tryswiftconf
UIImageView vs Metal [日本語版] #tryswiftconf
 
Test Plan | Sonny 2 | Sylvain Bakri
Test Plan | Sonny 2 | Sylvain BakriTest Plan | Sonny 2 | Sylvain Bakri
Test Plan | Sonny 2 | Sylvain Bakri
 
Html5 game programming overview
Html5 game programming overviewHtml5 game programming overview
Html5 game programming overview
 
The Ring programming language version 1.8 book - Part 65 of 202
The Ring programming language version 1.8 book - Part 65 of 202The Ring programming language version 1.8 book - Part 65 of 202
The Ring programming language version 1.8 book - Part 65 of 202
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Animate The Web With Ember.js - Jessica Jordan
Animate The Web With Ember.js - Jessica JordanAnimate The Web With Ember.js - Jessica Jordan
Animate The Web With Ember.js - Jessica Jordan
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
The Ring programming language version 1.2 book - Part 34 of 84
The Ring programming language version 1.2 book - Part 34 of 84The Ring programming language version 1.2 book - Part 34 of 84
The Ring programming language version 1.2 book - Part 34 of 84
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Language
 
How to build a html5 websites.v1
How to build a html5 websites.v1How to build a html5 websites.v1
How to build a html5 websites.v1
 

Semelhante a Useful Tools for Making Video Games - Irrlicht (2008)

Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10
ardiri
 
Following are the changes mentioned in bold in order to obtain the r.pdf
Following are the changes mentioned in bold in order to obtain the r.pdfFollowing are the changes mentioned in bold in order to obtain the r.pdf
Following are the changes mentioned in bold in order to obtain the r.pdf
anithareadymade
 
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефонаКурсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Глеб Тарасов
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
Laurence Svekis ✔
 
アプリを弄ってみる #2 #antama_ws
アプリを弄ってみる #2 #antama_wsアプリを弄ってみる #2 #antama_ws
アプリを弄ってみる #2 #antama_ws
Takahiro Yoshimura
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdf
feelinggifts
 

Semelhante a Useful Tools for Making Video Games - Irrlicht (2008) (20)

Shootting Game
Shootting GameShootting Game
Shootting Game
 
Leaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGLLeaving Flatland: getting started with WebGL
Leaving Flatland: getting started with WebGL
 
Oxygine 2 d objects,events,debug and resources
Oxygine 2 d objects,events,debug and resourcesOxygine 2 d objects,events,debug and resources
Oxygine 2 d objects,events,debug and resources
 
Developing natural user interface applications with real sense devices
Developing natural user interface applications with real sense devicesDeveloping natural user interface applications with real sense devices
Developing natural user interface applications with real sense devices
 
Monogame Introduction (ENG)
Monogame Introduction (ENG)Monogame Introduction (ENG)
Monogame Introduction (ENG)
 
Game development with Cocos2d
Game development with Cocos2dGame development with Cocos2d
Game development with Cocos2d
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)
 
Linux mouse
Linux mouseLinux mouse
Linux mouse
 
How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?
 
Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10Start to Finish: Porting to BlackBerry 10
Start to Finish: Porting to BlackBerry 10
 
Following are the changes mentioned in bold in order to obtain the r.pdf
Following are the changes mentioned in bold in order to obtain the r.pdfFollowing are the changes mentioned in bold in order to obtain the r.pdf
Following are the changes mentioned in bold in order to obtain the r.pdf
 
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефонаКурсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
Курсы по мобильной разработке под iOS. 4 лекция. Возможности телефона
 
Game dev 101 part 3
Game dev 101 part 3Game dev 101 part 3
Game dev 101 part 3
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
 
アプリを弄ってみる #2 #antama_ws
アプリを弄ってみる #2 #antama_wsアプリを弄ってみる #2 #antama_ws
アプリを弄ってみる #2 #antama_ws
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdf
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
XebiCon'17 : Faites chauffer les neurones de votre Smartphone avec du Deep Le...
 
Augmented Reality in JavaScript
Augmented Reality in JavaScriptAugmented Reality in JavaScript
Augmented Reality in JavaScript
 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)
 

Mais de Korhan Bircan

ios_summit_2016_korhan
ios_summit_2016_korhanios_summit_2016_korhan
ios_summit_2016_korhan
Korhan Bircan
 

Mais de Korhan Bircan (10)

Cross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React NativeCross-Platform App Development with Flutter, Xamarin, React Native
Cross-Platform App Development with Flutter, Xamarin, React Native
 
Useful Tools for Making Video Games - fmod (2008)
Useful Tools for Making Video Games - fmod (2008)Useful Tools for Making Video Games - fmod (2008)
Useful Tools for Making Video Games - fmod (2008)
 
Password Cracking with Rainbow Tables
Password Cracking with Rainbow TablesPassword Cracking with Rainbow Tables
Password Cracking with Rainbow Tables
 
Useful Tools for Making Video Games - Ogre (2008)
Useful Tools for Making Video Games - Ogre (2008)Useful Tools for Making Video Games - Ogre (2008)
Useful Tools for Making Video Games - Ogre (2008)
 
Next-Gen shaders (2008)
Next-Gen shaders (2008)Next-Gen shaders (2008)
Next-Gen shaders (2008)
 
Useful Tools for Making Video Games - Newton (2008)
Useful Tools for Making Video Games - Newton (2008)Useful Tools for Making Video Games - Newton (2008)
Useful Tools for Making Video Games - Newton (2008)
 
Korhan bircan
Korhan bircanKorhan bircan
Korhan bircan
 
Core Data with Swift 3.0
Core Data with Swift 3.0Core Data with Swift 3.0
Core Data with Swift 3.0
 
ios_summit_2016_korhan
ios_summit_2016_korhanios_summit_2016_korhan
ios_summit_2016_korhan
 
Background Audio Playback
Background Audio PlaybackBackground Audio Playback
Background Audio Playback
 

Último

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Último (20)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

Useful Tools for Making Video Games - Irrlicht (2008)

  • 1. Useful Tools for Making Video Games Part II An overview of
  • 2. Sample Games Slam Soccer 2006 H-Craft Championship Di Jabolo Gekkeiju Online Inevitable Online
  • 3. Features Platform & Graphics API independent Direct import of common mesh and texture formats Shader support Character animation Particle effects, billboards, light maps, shadows, environment mapping Easy physics integration Open source!
  • 4. Startup Sequence Main() { // startup engine … // load scene & models … // add camera, turn on lights … // draw everything while(device->run() && driver) { driver->beginScene(true, true, video::SColor(255,0,0,255)); scenemgr->drawAll(); driver->endScene(); } return 0; }
  • 5. Loading models Some of supported formats .3ds, .obj, .x, .ms3d, .mesh, .bsp, .md2 … IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2"); IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); if (node) { node->setMaterialFlag(EMF_LIGHTING, false); node->setFrameLoop(0, 310); node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") ); }
  • 6. Adding camera addCameraSceneNode() addCameraSceneNodeMaya() addCameraSceneNodeFPS( ISceneNode * parent = 0, f32 rotateSpeed = 100.0f, f32 moveSpeed = 500.0f, s32 id = -1, SKeyMap * keyMapArray = 0, s32 keyMapSize = 0, bool noVerticalMovement = false, f32 jumpSpeed = 0.f)
  • 7. Loading Quake3 maps scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp"); scene::ISceneNode* node = 0; if (mesh) { node = smgr->addOctTreeSceneNode(mesh->getMesh(0)); } if (node) { node->setPosition(core::vector3df(-1300,-144,-1249)); }
  • 8. Custom SceneNode’s class CSampleSceneNode : public scene::ISceneNode {…}; core::aabbox3d<f32> Box; video::S3DVertex Vertices[4]; video::SMaterial Material; irr::video::S3DVertex::S3DVertex ( const core::vector3df & pos, const core::vector3df & normal, SColor color, const core::vector2d< f32 > & tcoords); u16 indices[] = { 0,2,3, 2,1,3, 1,0,3, 2,0,1 }; driver->drawIndexedTriangleList(Vertices, 4, indices, 4);
  • 9. User Input class MyEventReceiver : public IEventReceiver { public: virtual bool OnEvent(SEvent event) { // event types: GUIEvent, KeyInput, LogEvent, MouseInput, UserEvent if (event.EventType == irr::EET_KEY_INPUT_EVENT) { switch(event.KeyInput.Key) { case KEY_KEY_W: … break; } } }; … MyEventReceiver myEventReceiver; device = createDevice(…, &myEventReceiver); …
  • 10. Character Animation scene::IAnimatedMeshSceneNode* animMS = smgr->addAnimatedMeshSceneNode(smgr->getMesh("…/sydney.md2")); scene::ISceneNodeAnimator* anim = smgr->createFlyStraightAnimator(core::vector3df(…), core::vector3df(…), 10000, true); animMS->addAnimator(anim); anim->drop(); animMS->setMaterialFlag(video::EMF_LIGHTING, false); animMS->setFrameLoop(320, 360); anms->setAnimationSpeed(30); animMS->setRotation(core::vector3df(…)); animMS->setMaterialTexture(0, driver->getTexture("../../media/sydney.bmp"));
  • 11. GUIs IGUIEnvironment* env = device->getGUIEnvironment(); Env->add[…](); addTab (); addWindow (); addMenu (); addMessageBox (); addStaticText (); addToolBar (); addScrollBar (); addSpinBox (); addButton (…); addCheckBox ( ); addComboBox (); addEditBox (); addFileOpenDialog (); addImage (); addListBox ();
  • 12. 2D Graphics video::ITexture* images = driver->getTexture(…); driver->makeColorKeyTexture(images, core::position2d<s32>(0,0)); core::rect<s32> frames[NUM_FRAMES]; // fill in rect coordinates … while(device->run() && driver) { static int currentFrame = 0; u32 time = device->getTimer()->getTime(); if (time/33 % 2) { currentFrame = (++currentFrame)%NUM_FRAMES; } driver->draw2DImage(images, core::position2d<s32>(…), frames[currentFrame], 0, video::SColor(255,255,255,255), true); }
  • 13. Particle Systems // fire particle system scene::IParticleSystemSceneNode* ps = 0; ps = smgr->addParticleSystemSceneNode(false); ps->setPosition(…); scene::IParticleEmitter* em = ps->createBoxEmitter( …); ps->setEmitter(em); scene::IParticleAffector* paf = ps- >createFadeOutParticleAffector(…); ps->addAffector(paf); ps->setMaterialTexture(…);
  • 14. Terrain Rendering scene::ITerrainSceneNode* terrain = smgr->addTerrainSceneNode(…); terrain->setScale(…); terrain->setMaterialFlag(…); terrain->setMaterialTexture(…); terrain->setMaterialType(…); terrain->scaleTexture(1.0f, 20.0f);
  • 15. For more details… Go through the tutorials under the “examples” directory Check out the API and forums
  • 16. Language bindings and add-ons Java/PureBasic/Python ports irrEdit scene editor irrKlang 3D audio library Exporters/importers etc Go to Add-ons site