dimanche 19 juillet 2015

comment faire pivoter un vaisseau avec cos et sin avec blitz3d how to do a space destroyer with blitz3d et blitzplus

Graphics 320,200,16,2
Global x
Global y
Global a
Global x2
Global y2
Global x3
Global y3
Global r
x1=160:y1=100:xx1=168:yy1=108
x2=160:y2=100:xx2=152:yy2=108
x3=152:y3=108:xx3=168:yy3=108

r=16
.debut

For a = 1 To 360 Step 8




Locate 10,10:Color 255,0,0:Print "rayon "+r



        x = 160+Cos(a) * r :xcanon = 160+Cos(a) * 25
        y = 100+Sin(a) * r :ycanon = 100+Sin(a) * 25
       
        xa = 160+Cos(a+120)*r:xcanon2 = 160+Cos(a+120) * 25
        ya = 100+Sin(a+120)*r:ycanon2 = 100+Sin(a+120) * 25

        xb = 160+Cos(a+120+120)*r :xcanon3 = 160+Cos(a+240) * 25
        yb = 100+Sin(a+120+120)*r :ycanon3 = 100+Sin(a+240) * 25
;fuselage
Color 0,255,0

Line x ,  y ,  xa ,  ya
Line x  , y , xb ,  yb
Line xb ,  yb ,  xa ,  ya
;canon

Line x,y , xcanon, ycanon

Delay 50

Cls
Next
Goto debut

samedi 4 juillet 2015

how to play msic with blitz3d comment faire de la musique avec blitz3d




Pour jouer deux instruments simultanément essayez ceci :
d'abord  telecharchez les instruments DRUMS
Créez un dossier LOOP sur le bureau et decompressez le fichier instrument dedans !


.debut

If KeyDown(17)=1  And ChannelPlaying (pp1)=0 Then pp1 = PlayMusic ("C:\Users\rendomizer\Desktop\LOOP\stamp.wav"):ResumeChannel pp1 ;écrivez votre chemin complet de VOTRE ordinateur !
If KeyDown(17)=0 Then StopChannel pp1
If KeyDown(19)=1  And ChannelPlaying (pp2)=0 Then pp2 = PlayMusic ("C:\Users\rendomizer\Desktop\LOOP\stich.wav"):ResumeChannel pp2
If KeyDown(19)=0 Then StopChannel pp2
 

Goto debut 

blitz3d read MIDI IN USB EXTERNAL KEYBOARD programming

Dabord il faut telecharger blitz3D avec la librairie blitz3d+midi 
Surtout mettre le programme si dessous dans le fichie userlib pour que ça fonctionne !!!!
essayez toutes vos prises usb pour le test en changent midiopen(1),midiopen(2)...(3) 
Global hIn = MidiInOpen(0)

.debut
    If MidiEvent(hIn) Then
MidiInStart(hIn)

    msg$= MidiGetParam1()
    Print Hex(msg$)

;affiche les données du clavier externe    
    EndIf
   
Goto debut