Accueil > > > UN JEU DE VOITURE VOLANTE ET DÉSAMORCAGE DE BOMBE NON TERMINÉ
UN JEU DE VOITURE VOLANTE ET DÉSAMORCAGE DE BOMBE NON TERMINÉ
Information sur la source
Description
Voici la source d'un jeu que je n'ai jamais fini, alors si ca vous tente... Vous controlez une voiture volante et vous devez poser 3emetteur pour pouvoir trianguler la position de la bombe et pouvoir la cibler avec la camera de votre vehicule volant, ensuite si il vous reste assez de temp il vous faut désamorcer la bombe avant qu'elle n'explose! Pour plus d'info contactez moi à supergrey@tiscali.fr ! Pour tous mes jeux : www.greygames.fr.st !
Source
- La source en question faisant plus de 50ko je vous laisse le lien ver celle-ci:
- http://supergrey.chez.tiscali.fr/SourceCpp/DFCH.exe
- C'est une archive auto-extractible
-
-
- voici un bout de la source:
-
- HRESULT CMyD3DApplication::FrameMove()
- {
- NFRAME++;
- // Update user input state
- UpdateInput( &m_UserInput );
-
- // Respond to input
- if( m_UserInput.bDoConfigureInput )
- {
- // One-shot per keypress
- m_UserInput.bDoConfigureInput = FALSE;
-
- Pause( TRUE );
-
- // Get access to the list of semantically-mapped input devices
- // to delete all InputDeviceState structs before calling ConfigureDevices()
- CInputDeviceManager::DeviceInfo* pDeviceInfos;
- DWORD dwNumDevices;
- m_pInputDeviceManager->GetDevices( &pDeviceInfos, &dwNumDevices );
-
- for( DWORD i=0; i<dwNumDevices; i++ )
- {
- InputDeviceState* pInputDeviceState = (InputDeviceState*) pDeviceInfos[i].pParam;
- SAFE_DELETE( pInputDeviceState );
- pDeviceInfos[i].pParam = NULL;
- }
-
- // Configure the devices (with edit capability)
- if( m_bWindowed )
- m_pInputDeviceManager->ConfigureDevices( m_hWnd, NULL, NULL, DICD_EDIT, NULL );
- else
- m_pInputDeviceManager->ConfigureDevices( m_hWnd,
- m_pDIConfigSurface,
- (VOID*)StaticConfigureInputDevicesCB,
- DICD_EDIT, (LPVOID) this );
-
- Pause( FALSE );
- }
-
- if( m_UserInput.bDoConfigureDisplay )
- {
- // One-shot per keypress
- m_UserInput.bDoConfigureDisplay = FALSE;
-
- Pause(TRUE);
-
- // Configure the display device
- UserSelectNewDevice();
-
- Pause(FALSE);
- Vue = 0;
-
- }
-
-
- // TODO: update world
-
- if (bMarche)
- {
- if (dVoBo<4.5f)
- {
- if (dVoBo>0 && Voiture->bVie)
- {
- Perso->px+=(Perso->px-Voiture->position.x)*(4.5f-dVoBo)/10;
- Perso->py+=(Perso->py-Voiture->position.y)*(4.5f-dVoBo)/10;
- Perso->pz+=(Perso->pz-Voiture->position.z)*(4.5f-dVoBo)/10;
- Voiture->position.x-=(Perso->px-Voiture->position.x)*(4.5f-dVoBo)/20;
- Voiture->position.y-=(Perso->py-Voiture->position.y)*(4.5f-dVoBo)/20;
- Voiture->position.z-=(Perso->pz-Voiture->position.z)*(4.5f-dVoBo)/20;
- }
- }
- Perso->Mouvement();
- Perso->PreRender(Sol);
- dVoBo=dist3d(D3DXVECTOR3(Perso->px,Perso->py,Perso->pz),Voiture->position);
- if (AXPZ>199)
- AXPZ=Voiture->FrameMove(Sol);
- else
- Voiture->FrameMove(Sol);
-
- }
- else
- {
- if (AXPZ>199)
- AXPZ=Voiture->FrameMove(Sol);
- else
- {
- if (Voiture->FrameMove(Sol)==0)
- AXPZ=0;
- }
- }
- VoitureC->FrameMove(Sol);
-
- if (Bomb.ncle<10)
- Seconde-=0.05f;
- if (Seconde<0)
- {
- Seconde+=60;
- Minute-=1;
- }
- if (Minute==-1 && Seconde>59.95f)
- AXPZ=0;
-
-
-
-
-
-
-
- float d=dist3d(vLookatPt,vFromPt);
- float dc=Contact(Sol,(vFromPt-vLookatPt)/d,vLookatPt);
- if ( dc<d-0.2f && dcam>0.02f ) dcam*=0.8f;
- else if (dc>d+0.2f) dcam*=1.2f;
-
- if (dcam>1)dcam=1;
-
- D3DXMATRIX matView;
- if (bMarche)
- {
- if (Perso->vy<-0.2f)
- {
-
- vLookatPt = MatTrans(D3DXVECTOR3(0,2.5f,0),Perso->mtete2);
- vFromPt = vLookatPt;
- vFromPt.y += 3;
- vUpVec = D3DXVECTOR3(-sinf(Perso->aRY),0,-cosf(Perso->aRY));
- Perso->ALookUp=0;
- }
- else
- {
- vLookatPt = MatTrans(D3DXVECTOR3(0.25f,2.3f,-1),Perso->mtete2);
- vFromPt = MatTrans(D3DXVECTOR3(0.25f,2.3f,0),Perso->mtete2);
- vUpVec = MatTrans(D3DXVECTOR3(0,1,0),Perso->mtete2)-MatTrans(D3DXVECTOR3(0,0,0),Perso->mtete2);
- }
- }
- else
- {
- if (Vue==0)
- {
- vLookatPt = Voiture->position;
- vFromPt += (vLookatPt-(Voiture->inertie-D3DXVECTOR3(5*sinf(-Voiture->ADir),2,-5*cosf(-Voiture->ADir)))*2*dcam-vFromPt)/10;
- vUpVec = D3DXVECTOR3( 0.0f, 1.0f, 0.0f );
- }
- else
- {
- vFromPt = MatTrans(D3DXVECTOR3(0,dcam*2,0),Voiture->matChassi);
- vLookatPt = MatTrans(D3DXVECTOR3(0,dcam*1.9f,1),Voiture->matChassi);
- vUpVec = MatTrans(D3DXVECTOR3(0,1,0),Voiture->matChassi)-MatTrans(D3DXVECTOR3(0,0,0),Voiture->matChassi);
- }
- }
- m_Camera.SetViewParams( vFromPt, vLookatPt, vUpVec );
- m_pd3dDevice->SetTransform( D3DTS_VIEW, &m_Camera.GetViewMatrix() );
-
-
- return S_OK;
- }
-
-
-
La source en question faisant plus de 50ko je vous laisse le lien ver celle-ci:
http://supergrey.chez.tiscali.fr/SourceCpp/DFCH.exe
C'est une archive auto-extractible
voici un bout de la source:
HRESULT CMyD3DApplication::FrameMove()
{
NFRAME++;
// Update user input state
UpdateInput( &m_UserInput );
// Respond to input
if( m_UserInput.bDoConfigureInput )
{
// One-shot per keypress
m_UserInput.bDoConfigureInput = FALSE;
Pause( TRUE );
// Get access to the list of semantically-mapped input devices
// to delete all InputDeviceState structs before calling ConfigureDevices()
CInputDeviceManager::DeviceInfo* pDeviceInfos;
DWORD dwNumDevices;
m_pInputDeviceManager->GetDevices( &pDeviceInfos, &dwNumDevices );
for( DWORD i=0; i<dwNumDevices; i++ )
{
InputDeviceState* pInputDeviceState = (InputDeviceState*) pDeviceInfos[i].pParam;
SAFE_DELETE( pInputDeviceState );
pDeviceInfos[i].pParam = NULL;
}
// Configure the devices (with edit capability)
if( m_bWindowed )
m_pInputDeviceManager->ConfigureDevices( m_hWnd, NULL, NULL, DICD_EDIT, NULL );
else
m_pInputDeviceManager->ConfigureDevices( m_hWnd,
m_pDIConfigSurface,
(VOID*)StaticConfigureInputDevicesCB,
DICD_EDIT, (LPVOID) this );
Pause( FALSE );
}
if( m_UserInput.bDoConfigureDisplay )
{
// One-shot per keypress
m_UserInput.bDoConfigureDisplay = FALSE;
Pause(TRUE);
// Configure the display device
UserSelectNewDevice();
Pause(FALSE);
Vue = 0;
}
// TODO: update world
if (bMarche)
{
if (dVoBo<4.5f)
{
if (dVoBo>0 && Voiture->bVie)
{
Perso->px+=(Perso->px-Voiture->position.x)*(4.5f-dVoBo)/10;
Perso->py+=(Perso->py-Voiture->position.y)*(4.5f-dVoBo)/10;
Perso->pz+=(Perso->pz-Voiture->position.z)*(4.5f-dVoBo)/10;
Voiture->position.x-=(Perso->px-Voiture->position.x)*(4.5f-dVoBo)/20;
Voiture->position.y-=(Perso->py-Voiture->position.y)*(4.5f-dVoBo)/20;
Voiture->position.z-=(Perso->pz-Voiture->position.z)*(4.5f-dVoBo)/20;
}
}
Perso->Mouvement();
Perso->PreRender(Sol);
dVoBo=dist3d(D3DXVECTOR3(Perso->px,Perso->py,Perso->pz),Voiture->position);
if (AXPZ>199)
AXPZ=Voiture->FrameMove(Sol);
else
Voiture->FrameMove(Sol);
}
else
{
if (AXPZ>199)
AXPZ=Voiture->FrameMove(Sol);
else
{
if (Voiture->FrameMove(Sol)==0)
AXPZ=0;
}
}
VoitureC->FrameMove(Sol);
if (Bomb.ncle<10)
Seconde-=0.05f;
if (Seconde<0)
{
Seconde+=60;
Minute-=1;
}
if (Minute==-1 && Seconde>59.95f)
AXPZ=0;
float d=dist3d(vLookatPt,vFromPt);
float dc=Contact(Sol,(vFromPt-vLookatPt)/d,vLookatPt);
if ( dc<d-0.2f && dcam>0.02f ) dcam*=0.8f;
else if (dc>d+0.2f) dcam*=1.2f;
if (dcam>1)dcam=1;
D3DXMATRIX matView;
if (bMarche)
{
if (Perso->vy<-0.2f)
{
vLookatPt = MatTrans(D3DXVECTOR3(0,2.5f,0),Perso->mtete2);
vFromPt = vLookatPt;
vFromPt.y += 3;
vUpVec = D3DXVECTOR3(-sinf(Perso->aRY),0,-cosf(Perso->aRY));
Perso->ALookUp=0;
}
else
{
vLookatPt = MatTrans(D3DXVECTOR3(0.25f,2.3f,-1),Perso->mtete2);
vFromPt = MatTrans(D3DXVECTOR3(0.25f,2.3f,0),Perso->mtete2);
vUpVec = MatTrans(D3DXVECTOR3(0,1,0),Perso->mtete2)-MatTrans(D3DXVECTOR3(0,0,0),Perso->mtete2);
}
}
else
{
if (Vue==0)
{
vLookatPt = Voiture->position;
vFromPt += (vLookatPt-(Voiture->inertie-D3DXVECTOR3(5*sinf(-Voiture->ADir),2,-5*cosf(-Voiture->ADir)))*2*dcam-vFromPt)/10;
vUpVec = D3DXVECTOR3( 0.0f, 1.0f, 0.0f );
}
else
{
vFromPt = MatTrans(D3DXVECTOR3(0,dcam*2,0),Voiture->matChassi);
vLookatPt = MatTrans(D3DXVECTOR3(0,dcam*1.9f,1),Voiture->matChassi);
vUpVec = MatTrans(D3DXVECTOR3(0,1,0),Voiture->matChassi)-MatTrans(D3DXVECTOR3(0,0,0),Voiture->matChassi);
}
}
m_Camera.SetViewParams( vFromPt, vLookatPt, vUpVec );
m_pd3dDevice->SetTransform( D3DTS_VIEW, &m_Camera.GetViewMatrix() );
return S_OK;
}
Conclusion
Si vous désirez mon jeu trialtime contacter moi ou rendez vous sur www.greygames.fr.st
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
TECHDAYS PARIS 2010 : SHAREPOINT 2010 POUR LES DéVELOPPEURSTECHDAYS PARIS 2010 : SHAREPOINT 2010 POUR LES DéVELOPPEURS par ROMELARD Fabrice
Animé par: Laurent Cotton Le développement dans SharePoint 2010 passe par plusieurs axes qui seront évoqués dans cette session, mais plus particulièrement les développements simples lié au besoin Business Business Connectivity Services Ce BCS es...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2010 : PLEINIèRE DERNIER JOURTECHDAYS PARIS 2010 : PLEINIèRE DERNIER JOUR par ROMELARD Fabrice
Cette session est la dernière pleinière de ces 3 jours de TechDays Paris 2010. Généralement, cette troisième journée est plus axée sur l'avenir vu par Microsoft. Après un retour sur l'avenir vu par la Science Fiction ou par ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice UNE JOLIE-HORLOGE ET PAS QU'UN PEU !UNE JOLIE-HORLOGE ET PAS QU'UN PEU ! par neodante
Pour les possesseurs d'iPhone, ça y est Bijin Tokei - qui se traduit littéralement en Français par " Jolie Horloge " - est arrivé et GRATUITEMENT s'il vous plaît ! Après la version Tokyo, Hokkaido, night club, racing, Gal, "pour les mademoiselles'", . voi...
Cliquez pour lire la suite de l'article par neodante TECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICESTECHDAYS PARIS 2010 : CONNECTEZ VOS DONNéES à SHAREPOINT 2010 AVEC LES BUSINESS CONNECTIVITY SERVICES par ROMELARD Fabrice
Animé par: Gaetan Bouveret et Julien Chomarat Business Connectivity Services (BCS) est dans SharePoint 2010 la version 2 de Business Data Catalog (BDC dans SharePoint 2007). Il s'agit de la solution permettant de visualiser des données provenan...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice [DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE[DIVERS] SUIVRE VOS SéRIES PRéFéRéS SUR LA TOILE par orion
Comme de nombreux geek, je suis un grand amateur de série TV et je rate régulièrement des épisodes de mes séries préférés. Une solution s'offre à vous avec ce merveilleux site : Tv Gorge - www.tvgorge.com Moteur de recherche à l'appui, vous pouvez ...
Cliquez pour lire la suite de l'article par orion
Forum
RE : WIN APIRE : WIN API par omarino_007
Cliquez pour lire la suite par omarino_007
Logiciels
DB-MAIN (9.1.0)DB-MAIN (9.1.0)DB-MAIN is a data-modeling and data-architecture tool. It is designed to help developers and anal... Cliquez pour télécharger DB-MAIN Xilisoft DPG Convertisseur (5.1.37.0120)XILISOFT DPG CONVERTISSEUR (5.1.37.0120)Xilisoft DPG Convertisseur offre aux fans de Nintendo DS une bonne solution leur permettant de dé... Cliquez pour télécharger Xilisoft DPG Convertisseur GraphicsGale (2.01.01)GRAPHICSGALE (2.01.01)GraphicsGale est un logiciel de PixelArt avec de nombreuse fonctionnalités permettant de réalisé ... Cliquez pour télécharger GraphicsGale Architecte 3D (Platinum 2010)ARCHITECTE 3D (PLATINUM 2010)Architecte 3D Platinium vous permet de concevoir facilement les plans votre future maison, de l'é... Cliquez pour télécharger Architecte 3D TeamViewer 5 (TeamViewer 5)TEAMVIEWER 5 (TEAMVIEWER 5)Dépanner un ami,expliquer une manipulation devient un jeu d'enfant.
Prise en main d'un autre ord... Cliquez pour télécharger TeamViewer 5
|