- ZouzakaMembre
- Nombre de messages : 302
Age : 26
Distinction : aucune
Date d'inscription : 25/12/2011
[Mini-Jeu] TapGame
Sam 17 Mai 2014 - 10:22
<==== Informations sur le mini jeu ====>
==> Langage de programmation:AutoIT
==> Le but du jeu :
Cliquez sur les bonnes touches pour collecter un max points !
==> Petite Information :
Les Ressources du jeu sont modifiable
<==== Avancement ====>
==> Timer [ok]
==> Scores [ok]
==> Sons [ok]
==> Bonus [ok]
Complet
<==== Screnns ====>
Version Finale 1.5 sous win7 :Version 1.3 sous XP :
<==== Ce qui est customizable ====>
- Les Fleches
- La Couleur de Fond
- Les Sons
- Les Racines (Fond.gif et Top.gif)
<==== Code Source ====>
- Spoiler:
- Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\Ressources\TapGame.ico
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Sound.au3>
;==== Declaration Des Variables ====
$Point = 0
$Point_Etape = 1
$Score = 0
$hasar = 0
$Pic1 = 0
$Timer = 90
$Label1 = 0
$Score_Exist = 0
$Multi_S = 1
$Music = _SoundOpen(@ScriptDir&"\Music.mp3")
$Sound = _SoundOpen(@ScriptDir&"\bip.mp3")
$Name = InputBox("TapGame","Veillez inserez votre nom :","Player","",200,120)
$Life = 1
If @error = 1 Then Exit
;==== INI ====
$Verifi_INI = FileExists("TapGame.ini")
If $Verifi_INI = 0 Then IniWriteSection("TapGame.ini","Scores","")
$Point = IniRead("TapGame.ini","Systeme","Points","Error")
If $Point = "Error" Then
IniWrite("TapGame.ini","Systeme","Points",0)
$Point = 0
IniWrite("TapGame.ini","Systeme","Fond","0x67a84a")
IniWrite("TapGame.ini","Systeme","Life",0)
EndIf
;==== Fin INI ====
$Couleur_Fond = IniRead("TapGame.ini","Systeme","Fond","Error")
$Life = IniRead("TapGame.ini","Systeme","Life",0)
;==== Création de la window ====
_SoundPlay($Music)
#region ### START Koda GUI section ### Form=
;Fenetre "1"
Global $Handle1 = GUICreate("TapGame", 400, 250)
Global $Fond_Couleur = GUISetBkColor($Couleur_Fond)
Global $ImageFond = GUICtrlCreatePic("Fond.gif",0,0,400,250,0)
$ImageChemin = ImageTap()
Global $Pic1 = GUICtrlCreatePic($ImageChemin, 3, 3, 200, 200)
Global $List_score = GUICtrlCreateList("Nom ===> Score",207,5,190,200)
Global $Clear_Bouton = GUICtrlCreateButton("Vider",250, 200,100,30)
Global $Label1 = GUICtrlCreateLabel("Temps Restant: " & $Timer, 30, 220)
Global $ImageFond = GUICtrlCreatePic("top.gif",0,0,400,250,0)
Global $Life_Label = GUICtrlCreateLabel("Vies: " & $Life,170,220)
GUISetState(@SW_SHOW)
$Pos_TapGame = WinGetPos("TapGame")
;Fenetre "2"
Global $Handle2 = GUICreate("Score",250,120,$Pos_TapGame[0]+80,$Pos_TapGame[1]-120,0,-1,$Handle1)
Global $Label2 = GUICtrlCreateLabel ("Score : "&$Score&@CRLF&"Points : "&$Point,7,30)
Global $Label3 = GUICtrlCreateLabel ("5 Points 20 Points 15 Points",80,55)
Global $Fond_Couleur = GUISetBkColor($Couleur_Fond)
Global $Time_Plus = GUICtrlCreateButton ("+ Temps ",78,20,50,30)
Global $Multi_Score = GUICtrlCreateButton ("x2 Score ",128,20,50,30)
Global $Life_Plus = GUICtrlCreateButton ("+ Vie ",185,20,45,30)
Global $ImageFond2 = GUICtrlCreatePic("Fond_Bonus.gif",-5,-8,250,110)
GUISetState()
#endregion ### END Koda GUI section ###
;==== INI Suite ====
While 2
$Key_score = IniRead("TapGame.ini","Scores",$Score_Exist,"Error")
If $Key_score = "Error" Then
ExitLoop
Else
GUICtrlSetData($List_score,$Key_score)
$Score_Exist += 1
EndIf
WEnd
;==== End Ini Suite ====
;==== Commandes Simples====
WinActivate("TapGame")
$TimerInit = TimerInit()
HotKeySet("{UP}", "HautTap")
HotKeySet("{DOWN}", "BasTap")
HotKeySet("{RIGHT}", "GaucheTap")
HotKeySet("{LEFT}", "DroiteTap")
While 1
GUICtrlSetData($Label1, "Temps Restant: " & $Timer - Round(TimerDiff($TimerInit)/1000))
GUICtrlSetData($Life_Label, "Vies: " & $Life)
If $Timer - Round(TimerDiff($TimerInit)/1000) = 0 Then
GameOver()
EndIf
If _SoundPos($Music,2) >= _SoundLength($Music,2) Then _SoundPlay($Music)
Sleep(40)
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
IniWrite("TapGame.ini","Systeme","Points",$Point)
IniWrite("TapGame.ini","Systeme","Life",$Life)
Exit
Case $Clear_Bouton
GUICtrlSetData($List_score,"")
IniDelete("TapGame.ini","Scores")
Case $Time_Plus
If $Point >= 5 Then
$Timer += 10
$Point -= 5
EndIf
Case $Multi_Score
If $Point >= 20 Then
If $Multi_S < 8 Then
$Multi_S *= 2
$Point -= 20
EndIf
EndIf
Case $Life_Plus
If $Point >= 15 Then
If $Life <= 2 Then
$Life += 1
$Point -= 15
EndIf
EndIf
EndSwitch
WEnd
;==== Mes Fonctions ====
;== Fonction hasard des images
Func ImageTap()
$hasar = Random(0,3,1)
Switch $hasar
Case 0
Local $Chemin = "Bas.jpg"
Return $Chemin
Case 1
Local $Chemin = "Droite.jpg"
Return $Chemin
Case 2
Local $Chemin = "Gauche.jpg"
Return $Chemin
Case 3
Local $Chemin = "Haut.jpg"
Return $Chemin
EndSwitch
EndFunc
;== Touches
;= Haut
Func HautTap()
If $hasar = 3 Then
SetP()
ImageTap()
$ImageChemin = ImageTap()
GUICtrlSetImage($Pic1,$ImageChemin)
_SoundPlay($Sound,1)
Else
GameOver()
EndIf
EndFunc
;= Bas
Func BasTap()
If $hasar = 0 Then
SetP()
ImageTap()
$ImageChemin = ImageTap()
GUICtrlSetImage($Pic1,$ImageChemin)
_SoundPlay($Sound,1)
Else
GameOver()
EndIf
EndFunc
;=Droite
Func DroiteTap()
If $hasar = 1 Then
SetP()
ImageTap()
$ImageChemin = ImageTap()
GUICtrlSetImage($Pic1,$ImageChemin)
_SoundPlay($Sound,1)
Else
GameOver()
EndIf
EndFunc
;= Gauche
Func GaucheTap()
If $hasar = 2 Then
SetP()
ImageTap()
$ImageChemin = ImageTap()
GUICtrlSetImage($Pic1,$ImageChemin)
_SoundPlay($Sound,1)
Else
GameOver()
EndIf
EndFunc
;== GameOver
Func GameOver()
If $Life = 1 Then
MsgBox(0,"Score","Votre Score est: "&$Score&@CRLF& _
"Le total de vos points est: "&$Point)
IniWrite("TapGame.ini","Scores",$Score_Exist,$Name&" ===> "&$Score)
IniWrite("TapGame.ini","Systeme","Points",$Point)
Exit
Else
$Life -= 1
EndIf
EndFunc
;== Calcul
Func SetP()
$Score += 1*$Multi_S
If $Score = $Point_Etape*10*$Multi_S Then
$Point += 1
$Point_Etape += 1
EndIf
GUICtrlSetData($Label2, "Score : "&$Score&@CRLF&"Points : "&$Point)
GUICtrlSetData($Label1, "Temps Restant: " & $Timer - Round(TimerDiff($TimerInit)/1000))
GUICtrlSetData($Life_Label, "Vies: " & $Life)
EndFunc
<==== Mises a jours ====>
Demo 0.5 : ??/??/????Systeme de scores : 05/11/2013
Ajout d'un Bip sonore : 05/11/2013
Version Finale Avec tout les bonus : 22/11/2013
<==== Lien De Telechargement ====>
Demo 1.5 : http://www.mediafire.com/download/ca4mk9dtqgd4b1m/TapGame%20V1.5Demo 1.3 : http://www.mediafire.com/?vwwn5o8db9oovdi
Demo 1.0 : http://www.mediafire.com/?4wb61ixu0azb2un
Demo 0.5 : http://www.mediafire.com/?azd55gxk58vr650
Donner moi tout vos avis ^^
Re: [Mini-Jeu] TapGame
Mar 20 Mai 2014 - 11:16
Personne ? Vraiment ?
Bon, he bien je me lance ! Je télécharge et je te donne mon avis !
Tu aurais dû le présenter dans En Cours, car personne ne lit les projets terminés...
Bon, he bien je me lance ! Je télécharge et je te donne mon avis !
Tu aurais dû le présenter dans En Cours, car personne ne lit les projets terminés...
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum