Le debut de ma demo
Publié : mar. 17/juin/2008 13:21
C'est court, je sais, mais je continuerais plus tard....
http://xmas.free.fr/SPH_Demo.zip
http://xmas.free.fr/SPH_Demo.zip
Oui, c'est le debut de la sequence 2 que j'ai pas encore codéDobro a écrit :le debut dechire grave, mais apres il y a un ecran bleu pui plus rien apparement ...
la musique continue, mais rien ne se passe a l'ecran a part l'ecran bleu ..
est-ce normal ?
Screen de 1280*1024*32 au fait... Peut etre ca... Sinon, je ne vois pas pourquoi ca planterait chez toi.wolfjeremy a écrit :Moi j'ai pas pu y jouer, rapport d'erreur windows directement...
t'as pas désactivé cette merde ??wolfjeremy a écrit :Moi j'ai pas pu y jouer, rapport d'erreur windows directement...
Voici la procédure pour désactiver le rapport d'erreurs:
-Click droit sur votre poste de travail
-Propriétés
-Avancé
-Onglet Rapport d'erreurs
-Cochez Désactiver le rapport d'erreurs
-OK
wolfjeremy a écrit :Ça n'empêche rien au fait que ça marche pas![]()
Et ma résolution est en 1440x900 mais l'exe ne se lance pas...
Code : Tout sélectionner
InitSprite()
InitMouse()
InitKeyboard()
UseJPEGImageDecoder()
OpenScreen(1280,1024,32,"SPH Demo")
mciSendString_("OPEN "+Chr(34)+"Data1"+Chr(34)+" Type MPEGVIDEO ALIAS MP3_"+Str(1),0,0,0)
idc = LoadSprite(0, "Data2")
If idc=0
MessageRequester("Erreur", "Image introuvable") : End
EndIf
idc = LoadSprite(1, "Data3")
If idc=0
MessageRequester("Erreur", "Image introuvable") : End
EndIf
Dim points.Point(10)
f0.f=1
f1.f=0
f2.f=3.14159265/5
For i=1 To 65
If i= 60
mciSendString_("play MP3_"+Str(1),0,0,0)
EndIf
points(0)\x=640+Cos(f1)*(i*2*f0)
points(0)\y=512+Sin(f1)*(i*2*f0)
f1+f2
points(1)\x=640+Cos(f1)*(i*f0)
points(1)\y=512+Sin(f1)*(i*f0)
f1+f2
points(2)\x=640+Cos(f1)*(i*2*f0)
points(2)\y=512+Sin(f1)*(i*2*f0)
f1+f2
points(3)\x=640+Cos(f1)*(i*f0)
points(3)\y=512+Sin(f1)*(i*f0)
f1+f2
points(4)\x=640+Cos(f1)*(i*2*f0)
points(4)\y=512+Sin(f1)*(i*2*f0)
f1+f2
points(5)\x=640+Cos(f1)*(i*f0)
points(5)\y=512+Sin(f1)*(i*f0)
f1+f2
points(6)\x=640+Cos(f1)*(i*2*f0)
points(6)\y=512+Sin(f1)*(i*2*f0)
f1+f2
points(7)\x=640+Cos(f1)*(i*f0)
points(7)\y=512+Sin(f1)*(i*f0)
f1+f2
points(8)\x=640+Cos(f1)*(i*2*f0)
points(8)\y=512+Sin(f1)*(i*2*f0)
f1+f2
points(9)\x=640+Cos(f1)*(i*f0)
points(9)\y=512+Sin(f1)*(i*f0)
f1+f2
f0*1.046
hdc=StartDrawing(ScreenOutput())
;DrawingMode(#PB_2DDrawing_XOr)
If hdc
FrontColor(RGB(i*4,i*4,i*4))
Polygon_(hdc,points(),10)
EndIf
StopDrawing()
FlipBuffers()
Next
; fin de l'etoile **************************************
; debut flash
For i=255 To 8 Step -8
ClearScreen(RGB(i,i,i))
FlipBuffers()
Next
; fin flash*****************************
la:
Dim craquelure1.b(130)
Dim craquelure2.b(130)
For i=0 To 130
craquelure1(i)=Random(14)-7
craquelure2(i)=Random(14)-7
Next
craquelure.f=1
craquelure_actu.f=0
; debut affichage starscrool
Structure pixel
posx.f
posy.f
xx.f
yy.f
centrex.l
centrey.l
rayon.f
couleur.l
EndStructure
NewList pixel.pixel() ; pour pas s'y perdre, vaux mieux donner le meme nom a la structure qu'a la liste
time=0
centrex=1280/2
centrey=1024/2
angle.f=0
rnd_angle.f=20
rnd_randon=200
vitessex.f=0.02
vitessey.f=0.02
nbb=0
;############
;############
;############
;############
;############
;############
craque=0
craque2=0
presente= 0
Repeat
ExamineKeyboard()
;ClearScreen(RGB(rvb_cls,rvb_cls,rvb_cls))
;If rvb_cls>0
;rvb_cls-8
;EndIf
ClearScreen(0)
;********************************************
If time<900
For i=1 To 20
AddElement(pixel())
pixel()\centrex=centrex
pixel()\centrey=centrey
rayon.f=5+Random(500)
angle=Random(6559)
x = Cos(angle)*rayon
y = Sin(angle)*rayon
pixel()\posx = x
pixel()\posy = y
z=Random(100)+20
pixel()\xx = x/z
pixel()\yy = y/z
pixel()\couleur = 130+Random(Random(10000))
Next
EndIf
;********************************************
time+1
If time> 180 And time<200
u=100
StartDrawing(ScreenOutput())
For i=craque To 127
LineXY(80+craquelure1(i),1024-i*8,80+craquelure1(i+1),1024-i*8-8,RGB(u,u,u))
u-1
Next
craque+8
StopDrawing()
EndIf
If time> 200 And time<220
u=100
StartDrawing(ScreenOutput())
For i=craque2 To 127
LineXY(350+craquelure2(i),1024-i*8,350+craquelure2(i+1),1024-i*8-8,RGB(u,u,u))
u-1
Next
craque2+8
StopDrawing()
EndIf
If time>220
If craquelure_actu<1500
hdc=StartDrawing(ScreenOutput()) ;*********************** S T A R T
craquelure_actu=craquelure
;LineXY(590,0,100,100,RGB(255,255,255))
For i=0 To 127
points(0)\x=80+craquelure1(i)
points(0)\y=1024-i*8
points(1)\x=350+craquelure2(i)
points(1)\y=1024-i*8
points(2)\x=350+craquelure1(i+1)
points(2)\y=1024-i*8-8
points(3)\x=80+craquelure2(i+1)
points(3)\y=1024-i*8-8
If hdc
rvb=craquelure_actu*2
If rvb>255
rvb=255
EndIf
FrontColor(RGB(rvb/5,rvb/5,rvb))
Polygon_(hdc,points(),4)
EndIf
craquelure_actu*1.01
Next
StopDrawing()
DisplaySprite(0,140,70)
hdc=StartDrawing(ScreenOutput()) ;*********************** S T A R T
craquelure_actu=craquelure
For i=0 To 129
points(0)\x=72+craquelure1(i)-craquelure_actu/2
points(0)\y=1024-i*8+craquelure_actu
points(1)\x=358+craquelure2(i)+craquelure_actu/2
points(1)\y=1024-i*8+craquelure_actu
points(2)\x=358+craquelure1(i+1)+craquelure_actu/2
points(2)\y=1024-i*8-8+craquelure_actu*1.015
points(3)\x=72+craquelure2(i+1)-craquelure_actu/2
points(3)\y=1024-i*8-8+craquelure_actu*1.015
rvb=craquelure_actu*2
If rvb>255
rvb=255
EndIf
If points(1)\y>points(2)\y
FrontColor(RGB(rvb/4,rvb/3,rvb/2))
Else
FrontColor(RGB(rvb,rvb,rvb))
EndIf
If hdc
If points(1)\y<1100
Polygon_(hdc,points(),4)
EndIf
EndIf
craquelure_actu*1.015
Next
craquelure*1.025
StopDrawing()
Else ; les polygones bleus qui restent
hdc=StartDrawing(ScreenOutput()) ;*********************** S T A R T
;LineXY(590,0,500,100,RGB(255,255,255))
If presente>560
If reduc.f=0
reduc.f=1.1
EndIf
For i=0 To 127
points(0)\x=80+craquelure1(i)-reduc/50
points(0)\y=1024-i*8
points(1)\x=350+craquelure2(i)+reduc/5
points(1)\y=1024-i*8
points(2)\x=350+craquelure1(i+1)+reduc/5
points(2)\y=1024-i*8-8
points(3)\x=80+craquelure2(i+1)-reduc/50
points(3)\y=1024-i*8-8
If hdc
FrontColor(RGB(51,51,255))
Polygon_(hdc,points(),4)
EndIf
Next
reduc*1.035
Else ; ca disparait ou c'est fixe
For i=0 To 127
points(0)\x=80+craquelure1(i)
points(0)\y=1024-i*8
points(1)\x=350+craquelure2(i)
points(1)\y=1024-i*8
points(2)\x=350+craquelure1(i+1)
points(2)\y=1024-i*8-8
points(3)\x=80+craquelure2(i+1)
points(3)\y=1024-i*8-8
If hdc
FrontColor(RGB(51,51,255))
Polygon_(hdc,points(),4)
EndIf
Next
EndIf
StopDrawing()
presente+1
If presente>=50
If presente<120
DisplaySprite(1,140,340)
; 140,340 to 290,990
StartDrawing(ScreenOutput())
For i=140 To 990 Step 50
Circle(180,i-25,120-presente,RGB(51,51,255))
Circle(250,i+25,120-presente,RGB(51,51,255))
Next
;LineXY(0,0,100,100,RGB(255,0,0))
StopDrawing()
;Else
;DisplaySprite(1,140,340)
EndIf
EndIf
; fin d'un long process
If presente<660
DisplaySprite(0,140,70)
EndIf
EndIf
EndIf
If time<1040
nbb+1
If time>500
;bspline(0,0,200,0,200,200,0,200,RGB(255,180,150),hdc)
vitessex+0.00005
vitessey+0.00002
EndIf
hdc=StartDrawing(ScreenOutput()) ;*********************** S T A R T
;LineXY(30,0,100,100,RGB(255,255,0))
;********** A partir d'ici, tout est "LinkedList"
ForEach pixel.pixel() ; tant qu'il y a des etoiles on les affiches
With pixel()
x=\centrex+\posx+\xx+Cos(nbb/1000)*Cos(nbb/100)*nbb/2
y=\centrey+\posy+\yy+Sin(nbb/100)*Cos(nbb/100)*nbb/2
\xx*(1+vitessex*2)
\yy*(1+vitessey*2)
If x>1278 Or x<1 Or y>1022 Or y<1
DeleteElement(pixel()) ; on la tue
Else ; sinon
\couleur*(1+vitessex)
If \couleur>65535
\couleur=65535
EndIf
If \couleur<32768
rvb.l=\couleur/129
Plot(x,y,RGB(rvb,rvb,rvb)) ; on l'affiche
Else
Plot(x,y,RGB(255,255,255)) ; on l'affiche
rvb.l=(\couleur-32768)/130
Plot(x+1,y,RGB(rvb,rvb,rvb)) ; on l'affiche
Plot(x-1,y,RGB(rvb,rvb,rvb)) ; on l'affiche
Plot(x,y+1,RGB(rvb,rvb,rvb)) ; on l'affiche
Plot(x,y-1,RGB(rvb,rvb,rvb)) ; on l'affiche
rvb.l/2
Plot(x+1,y+1,RGB(rvb,rvb,rvb)) ; on l'affiche
Plot(x-1,y-1,RGB(rvb,rvb,rvb)) ; on l'affiche
Plot(x-1,y+1,RGB(rvb,rvb,rvb)) ; on l'affiche
Plot(x+1,y-1,RGB(rvb,rvb,rvb)) ; on l'affiche
EndIf
EndIf
EndWith
Next ; ce "foreach:next" s'addapte donc toujours au vrai nombre d'etoiles
;********** fin de la technique "LinkedList"
;DrawText(50,50,Str(time),RGB(255,50,50),0)
;DrawText(50,100,Str(presente),RGB(255,50,50),0)
;DrawText(50,150,Str(vitessex),RGB(255,50,50),0)
StopDrawing()
If presente>=120 And presente<400
If presente>=350
DisplaySprite(1,140,340+(presente-350)*32)
Else
DisplaySprite(1,140,340)
EndIf
EndIf
EndIf
If presente>=500 And presente<815 ; etoile qui fait disparaitre sph
If presente=500
Dim points.Point(10)
gro.f=0
f0.f=1.00001
f1.f=1
f2.f=3.14159265/5
EndIf
points(0)\x=215+Cos(f1)*Sin(gro)*250
points(0)\y=174+Sin(f1)*Sin(gro)*250
f1+f2
points(1)\x=215+Cos(f1)*Sin(gro)*130
points(1)\y=174+Sin(f1)*Sin(gro)*130
f1+f2
points(2)\x=215+Cos(f1)*Sin(gro)*250
points(2)\y=174+Sin(f1)*Sin(gro)*250
f1+f2
points(3)\x=215+Cos(f1)*Sin(gro)*130
points(3)\y=174+Sin(f1)*Sin(gro)*130
f1+f2
points(4)\x=215+Cos(f1)*Sin(gro)*250
points(4)\y=174+Sin(f1)*Sin(gro)*250
f1+f2
points(5)\x=215+Cos(f1)*Sin(gro)*130
points(5)\y=174+Sin(f1)*Sin(gro)*130
f1+f2
points(6)\x=215+Cos(f1)*Sin(gro)*250
points(6)\y=174+Sin(f1)*Sin(gro)*250
f1+f2
points(7)\x=215+Cos(f1)*Sin(gro)*130
points(7)\y=174+Sin(f1)*Sin(gro)*130
f1+f2
points(8)\x=215+Cos(f1)*Sin(gro)*250
points(8)\y=174+Sin(f1)*Sin(gro)*250
f1+f2
points(9)\x=215+Cos(f1)*Sin(gro)*130
points(9)\y=174+Sin(f1)*Sin(gro)*130
f1+f2
f1+f0-1
f0*1.0003
gro+0.01
hdc=StartDrawing(ScreenOutput())
;DrawingMode(#PB_2DDrawing_XOr)
;LineXY(60,0,100,100,RGB(255,0,255))
If hdc
FrontColor(RGB(255,255,220))
Polygon_(hdc,points(),10)
EndIf
StopDrawing()
EndIf ; fin de l'etoile qui fait disparaitre sph
FlipBuffers(1)
; fin starscrool ********************************************
If time>1255
Goto scene2
EndIf
Until KeyboardPushed(#PB_Key_Escape)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
scene2:
Repeat
ExamineKeyboard()
ClearScreen(RGB(51,51,255))
StartDrawing(ScreenOutput())
StopDrawing()
FlipBuffers(1)
; fin starscrool ********************************************
Until KeyboardPushed(#PB_Key_Escape)
je n'arrive pas à télécharger, bizarre...SPH a écrit :C'est court, je sais, mais je continuerais plus tard....
http://xmas.free.fr/SPH_Demo.zip
Le lien fonctionne pourtantbeauregard a écrit :je n'arrive pas à télécharger, bizarre...SPH a écrit :C'est court, je sais, mais je continuerais plus tard....
http://xmas.free.fr/SPH_Demo.zip
oui, mais à 28ko/s.Dobro a écrit :Le lien fonctionne pourtant