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
[FRAMEWORK 4] LES TASKS ET LE THREAD UI[FRAMEWORK 4] LES TASKS ET LE THREAD UI par fathi
Je viens de passer quelques temps au TechDay's et j'ai pu voir pas mal de session intéressante. Par contre une chose m'a un peu étonné lors de certaines de ces sessions qui abordaient les améliorations du framework .NET (donc le 4.5) : en gros, bea...
Cliquez pour lire la suite de l'article par fathi WORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBEWORKFLOW FOUNDATION 3 A UN PIED DANS LA TOMBE par JeremyJeanson
Depuis déjà un an, je conseille vivement les utilisateurs de Workflow Foundation 3 à migrer vers la version 4. L'information qui va suivre ne devrait donc pas trop prendre au dépourvu les personnes qui m'ont suivi. Je profite de ce poste, pour faire le re...
Cliquez pour lire la suite de l'article par JeremyJeanson TECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PCTECHDAYS PARIS 2012 : NOUVELLES TENDANCES DU POSTE DE TRAVAIL - BRING YOUR OWN PC par ROMELARD Fabrice
Speakers: Thierry Rapatout, Antoine Petit et Xavier Trebbia Cette session entre dans le cadre des RDV Décideurs des TechDays 2012, elle est liée à la consumérisation de l'IT et la mise en place du "DeskTop as a Service" dans de plus en ...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : SYSTEM CENTER SERVICE MANAGER 2012 VUE D'ENSEMBLETECHDAYS PARIS 2012 : SYSTEM CENTER SERVICE MANAGER 2012 VUE D'ENSEMBLE par ROMELARD Fabrice
Speakers: Julien Marechal, Gautier Confiant, Sébastien MEYER La session débute par le positionnement de la solution System Center par rapport aux concepts d'organisation ITIL. Le portail du catalogue de se...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice TECHDAYS PARIS 2012 : PLEINIèRE SECOND JOURTECHDAYS PARIS 2012 : PLEINIèRE SECOND JOUR par ROMELARD Fabrice
Après une première journée dédiée aux développeurs, cette seconde journée est dédiée au monde des entreprises et de ses applications. Ainsi, cette pleinière est dédiée à faire un 360 de l'évolution des applications Business aux demandes ac...
Cliquez pour lire la suite de l'article par ROMELARD Fabrice
Logiciels
Academy System (17.2.1.0)ACADEMY SYSTEM (17.2.1.0)Logiciel de gestion des établissements.
- élèves/étudiants (inscription, dossier, absence...)
-... Cliquez pour télécharger Academy System Easy-Planning (1.0.0.1)EASY-PLANNING (1.0.0.1)Basé sur les mêmes principes que MyPlanning, Easy-Planning permet de créer des plannings sous la ... Cliquez pour télécharger Easy-Planning COLLECTOR PLUS (3.00B)COLLECTOR PLUS (3.00B)COLLECTOR PLUS version 3.00B est un logiciel utilisant une base de données alimentée par :
- L... Cliquez pour télécharger COLLECTOR PLUS PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO (V7.4)PONAMEDIA TV DEVIENS HELLLOOO FLASH
LA TV SUR VOTRE ORDINATEUR.
Toute une plateforme Multi... Cliquez pour télécharger PONAMEDIA PREMIUM - HELLLOOO FLASH DEMO LettresFaciles 2011 (8.0.0.1)LETTRESFACILES 2011 (8.0.0.1)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011
|