Birthday PurePunch

Vous avez développé un logiciel en PureBasic et vous souhaitez le faire connaitre ?
Micheao
Messages : 533
Inscription : dim. 07/déc./2014 10:12
Localisation : Sud-Est

Re: Birthday PurePunch

Message par Micheao »

Trop Fort Ar-S c'est lui le gagnant
Dernière modification par Micheao le mer. 30/sept./2015 17:51, modifié 1 fois.
Avatar de l’utilisateur
Kwai chang caine
Messages : 6962
Inscription : sam. 23/sept./2006 18:32
Localisation : Isere

Re: Birthday PurePunch

Message par Kwai chang caine »

Super cool !!! 8O
Merci 8)
ImageLe bonheur est une route...
Pas une destination

PureBasic Forum Officiel - Site PureBasic
Avatar de l’utilisateur
majikeyric
Messages : 602
Inscription : dim. 08/déc./2013 23:19
Contact :

Re: Birthday PurePunch

Message par majikeyric »

Sympa l'idée!
Avatar de l’utilisateur
Mindphazer
Messages : 639
Inscription : mer. 24/août/2005 10:42

Re: Birthday PurePunch

Message par Mindphazer »

Impecc Ar-S :P
Et ça fonctionne très bien sous OS X 8)
Bureau : Win10 64bits
Maison : Macbook Pro M1 14" SSD 512 Go / Ram 16 Go - iPad Pro 32 Go (pour madame) - iPhone 15 Pro Max 256 Go
Avatar de l’utilisateur
Ar-S
Messages : 9476
Inscription : dim. 09/oct./2005 16:51
Contact :

Re: Birthday PurePunch

Message par Ar-S »

Oui, sans doute, j'ai été un peu vite et n'ai pas pensé à ça. Je rentre (enfin) ce vendredi matin chez moi.
Je modifierai peut-être la chose d'ici le 15 :wink:
~~~~Règles du forum ~~~~
⋅.˳˳.⋅ॱ˙˙ॱ⋅.˳Ar-S ˳.⋅ॱ˙˙ॱ⋅.˳˳.⋅
W11x64 PB 6.x
Section HORS SUJET : ICI
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
UPLOAD D'IMAGES : Uploader des images de vos logiciels
Avatar de l’utilisateur
venom
Messages : 3072
Inscription : jeu. 29/juil./2004 16:33
Localisation : Klyntar
Contact :

Re: Birthday PurePunch

Message par venom »

Bravo Ar-S sympa ce petit shoot'em :P






@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz
Ollivier
Messages : 4190
Inscription : ven. 29/juin/2007 17:50
Localisation : Encore ?
Contact :

Re: Birthday PurePunch

Message par Ollivier »

Bonjour à vous,

j'offre un livre au gagnant,

Maîtriser le trade
(John F. Carter)
Edition : Valor
ISBN : 978-2-909356-63-1

Avec la petite facturette
Ticket No : 99665
11/10/13 15:10:19

C'est un ouvrage qui mérite lecture. Je me souviens de ce moment délicat où la caissière me regardait avec des yeux langoureux et une geste très permissive, moment brisé par une soudaine incontinence qui, une fois de plus m'eût empli les gaudasses.

Jamais, je n'ai eu cela, comme ça sans raison. C'est le lendemain que j'ai compris que la Terre avait tremblé 18 minutes plus tôt à 40 minutes en voiture..

Je n'aime vraiment pas le pognon, mais à force de nettoyer mes grolles avec toutes ces émotions, je me demande s'il ne faut pas que j'en fasse un scénario...
Avatar de l’utilisateur
Vera
Messages : 45
Inscription : sam. 12/sept./2015 10:31
Localisation : Allemagne

Re: Birthday PurePunch

Message par Vera »

Hello Ar-s,

I really tried hard to get it runing on Linux (and got it as far as to open the Windowed Screen), but after an hour I'm definitely stuck at "Array-Index out of legal bounds" - I 'll give it another try some future day, or maybe when I'm on Windows

But I also found that I can't listen to 02.ogg and 03.ogg with VLC. These two files only show up as freesfx-root-URL in the playlist.
J'ai essayé vraiment dur de le recevoir courant sur Linux (et l'a reçu autant qu'ouvrir Windowed Screen) , mais après une heure je suis definately a persévéré "Dans l'index de la Gamme des limites juridiques" - je 'll y donne un autre essai quelque jour futur, ou peut-être quand je suis sur Windows.
Mais j'ai aussi constaté que je peux nott écouter 02.ogg et 03.ogg avec VLC. Ces deux dossiers se manifestent seulement comme la freesfx-URL dans la playlist.
Faites-moi savoir, s'il vous plaît, si mon français n'est pas assez compréhensible. ~ merci ~
Le texte encadré est d'un traducteur.
Avatar de l’utilisateur
Ar-S
Messages : 9476
Inscription : dim. 09/oct./2005 16:51
Contact :

Re: Birthday PurePunch

Message par Ar-S »

Salut Vera, sur windows et mac os pas de problem, je ne peux plus tester sur linux.
Pour les OGG c'est bizarre, peut-être parceque j'ai utiliser un convertisseur en ligne. A mon retour chez moi je les reconvertirai avec soundforge. Si tu veux je t'enverrai la version non punché du code si tu souhaites trouver ce qui ne passe pas avec linux.
Hey Vera, in windows/ Mac OS there is no problem. I can't try anymore on linux.
For the ogg that is strange. I used an online converter to make them because i wasn't in my home. But i go back soon, i'll convert again with soundforge program, that should be solved the problem. I you i'll will email you the unpuch code to try to fixe the bug on linux.
~~~~Règles du forum ~~~~
⋅.˳˳.⋅ॱ˙˙ॱ⋅.˳Ar-S ˳.⋅ॱ˙˙ॱ⋅.˳˳.⋅
W11x64 PB 6.x
Section HORS SUJET : ICI
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
UPLOAD D'IMAGES : Uploader des images de vos logiciels
Avatar de l’utilisateur
Cool Dji
Messages : 1126
Inscription : ven. 05/sept./2008 11:42
Localisation : Besançon
Contact :

Re: Birthday PurePunch

Message par Cool Dji »

Salut Ar-S,

Pas pu compiler, cette ligne fait planter : OpenScreen(800,600,32,""):LoadSprite(0,"im.png",8|4):

Je n'ai pas vérifier si c'est la résolution qui passe pas sur mon ordi ou si c'est le "8|4"
Je vérifie ce soir et te redis
Only PureBasic makes it possible
Avatar de l’utilisateur
Ar-S
Messages : 9476
Inscription : dim. 09/oct./2005 16:51
Contact :

Re: Birthday PurePunch

Message par Ar-S »

J'ai fait le punch en PB 5.31 x86 pour info
Peut être ta carte graphique qui supporte pas le 32. Si ça foire essaye en 24
~~~~Règles du forum ~~~~
⋅.˳˳.⋅ॱ˙˙ॱ⋅.˳Ar-S ˳.⋅ॱ˙˙ॱ⋅.˳˳.⋅
W11x64 PB 6.x
Section HORS SUJET : ICI
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
UPLOAD D'IMAGES : Uploader des images de vos logiciels
kvitaliy
Messages : 2
Inscription : ven. 02/oct./2015 4:44

Re: Birthday PurePunch

Message par kvitaliy »

Sous-marin dans la glace.
Excusez mon français!

Code : Tout sélectionner

;******************************************************************************
;*
;* Birthday Punch : PureBasic 15 years of happiness
;* PureBasic 5.31 x86
;* 192 lines of 80 chars of code or data as you want
;*
;* Name     : Submarine in the ice
;* Author   : kvitaliy  (And if anyone remembers ZX Spectrum)
;* Date     : Oct 2015
;* Notes    : Use Arrows to move, space to shoot, Esc to exit
;******************************************************************************
InitSprite():InitKeyboard():InitSound():OpenWindow(0,0,0,800,600,"SM",13107201)
Select MessageRequester("Submarine in the ice","Full Screen?",
#MB_YESNO|#MB_ICONQUESTION|#MB_DEFBUTTON2):Case #IDNO:
OpenWindowedScreen(WindowID(0), 0, 0, 800, 600):Case #IDYES:OpenScreen(800,600,
32,"Submarine"):EndSelect:CreateSprite(0,100,75,#PB_Sprite_AlphaBlending):
StartDrawing(SpriteOutput(0)):Box(0,35,10,30,9927032)
Box(40,5,3,20,9336699):Circle(50,30,15,9336699):Ellipse(50,45,45,15,7625299) 
RoundBox(47,30,50,25,20,40,7625299):LineXY(30,43,50,43,9927032):Circle(80,43,7,
0):StopDrawing():LoadSound(0,"0.wav"):LoadSound(1,"1.wav"):LoadSound(2,
"2.wav"):LoadSound(3,"3.wav"):mus=LoadMusic(#PB_Any,"mus.mod")
MusicVolume(mus,40):PlayMusic(mus):LoadSound(4,"4.wav")
CreateSprite(1,50,50):StartDrawing(SpriteOutput(1)):Box(0,0,50,50,255)
DrawingMode(#PB_2DDrawing_Default):LineXY(16,0,16,50,0):LineXY(32,0,32,50,0)
LineXY(0,16,50,16,0):LineXY(0,32,50,32,0):StopDrawing()
CreateSprite(2,50,50):StartDrawing(SpriteOutput(2)):Circle(25,25,25,65280)
DrawText(22,17,"$",255,65280):LineXY(16,0,16,50,0):LineXY(32,0,32,50,0):
LineXY(0,16,50,16,0):LineXY(0,32,50,32,0):StopDrawing()
CreateSprite(3,50,50):StartDrawing(SpriteOutput(3)):Box(0,0,50,50,$00ffff)
Circle(25,25,10,0):StopDrawing():Id=LoadFont(1,"Arial",24)
CreateSprite(4,50,50):StartDrawing(SpriteOutput(4)):Box(0,0,50,50,$FFffff)
DrawText(10,17,"KEY",255,$FFffff):StopDrawing()
CreateSprite(5,50,26):StartDrawing(SpriteOutput(5)):Circle(6,13,6,$00ffff)
Circle(20,13,9,$00ffff):Circle(35,13,12,$00ffff):StopDrawing();
CreateSprite(7,20,300):StartDrawing(SpriteOutput(7)):
DrawingMode(#PB_2DDrawing_Gradient):BackColor($00FFFF):FrontColor($FF0000)
BoxedGradient(0, 0, 20,300):Box(0,0,20,300):StopDrawing() 
CreateSprite(6,20,300):StartDrawing(SpriteOutput(6)):
DrawingMode(#PB_2DDrawing_Gradient):BackColor($FFFF00):FrontColor($0000FF)
BoxedGradient(0, 0, 20,300):Box(0,0,20,300):StopDrawing()
CreateSprite(8,32,32):StartDrawing(SpriteOutput(8)): ;
DrawingMode(#PB_2DDrawing_Gradient):BackColor($00FFFF):FrontColor($FF)
CircularGradient(16,16,16):Circle(16,16,16,$FF):StopDrawing()
Structure blok:x.l:y.l:c.l:EndStructure:Global Dim blok.blok(60)
Structure Pole:Px.l:Py.l:EndStructure:Global Dim Pole.Pole(60);
For x= 250 To 700 Step 50:For y = 100 To 350 Step 50:nn+1:Pole(nn)\Px=x:
Pole(nn)\Py = y:blok(nn)\c = RGB(255,Random(255),Random(255)):Next:Next
Global x0=70,y0=200,x4=550,y4=300,Kn,UL,Pr,spd=2,schuss=0,lev=1,Score=0,x6.f=5,
FullLaser=13,liv=3:Procedure CheckCol(i):If  SpriteCollision(1,blok(i)\x,
blok(i)\y,0,x0,y0):PlaySound(1):ProcedureReturn 1:Else:ProcedureReturn 0:EndIf
EndProcedure:Procedure LevelR():Dim L(60):For i = 0 To 60:L(i)=0:Next:
Kn=Random(60,37):L(Kn)=1:UL=Random(18,1):L(UL)=1:Pr=Random(36,19):L(Pr)=1:
For i = 1 To 20:llr:
ll=Random(60,1):If L(ll)<>1:blok(i)\x =Pole(ll)\Px:blok(i)\y=Pole(ll)\Py:L(ll)=1
Else:Goto llr:EndIf:Next:EndProcedure:nacalo:
LevelR():Repeat:FlipBuffers():ClearScreen(0):ExamineKeyboard()
If GetMusicPosition(mus)=255 Or IsMusic(mus)=0:FreeMusic(mus):
mus = LoadMusic(#PB_Any,"mus.mod"):PlayMusic(mus):EndIf
Repeat:Until WindowEvent()=0
StartDrawing(ScreenOutput()):For y=0 To 75 Step 50:For x=0 To 800 Step 50
Box(x,y,25,25,$FF):Next:Next:For y=25 To 75 Step 50:For x=25 To 800 Step 50
Box(x,y,25,25,$AA):Next:Next:For y=400 To 475 Step 50:For x=0 To 800 Step 50
Box(x,y,25,25,$FF):Next:Next:For y=425 To 475 Step 50:For x=25 To 800 Step 50
Box(x,y,25,25,$AA):Next:Next:Box(0,500,800,100,$FFFFF):Box(3,503,794,94,$FF00F)
Box(6,506,788,88,$3AEBAC):DrawingFont(Id):DrawText(680,553,RSet(Str(lev),
3,"0"),$FF,$ff00):DrawText(270,553,"SCORE =  " + RSet(Str(Score),8,"0"),$ff,$ff00): 
DrawText(270,515,"LASER = "+ RSet("",FullLaser,"*"),$ff,$00ffff):DrawText(650,
515,"LEVEL",$FF,$ff00):DrawText(50,515,"LIVE = "+liv,$FF,$ff00):StopDrawing()
For i = 1 To 60:If blok(i)\x>0:DisplayTransparentSprite(1,blok(i)\x,blok(i)\y,
255,blok(i)\c):EndIf:Next:DisplayTransparentSprite(0,x0,y0)
If Pole(Pr)\Px>0:DisplaySprite(2,Pole(Pr)\Px,Pole(Pr)\Py):EndIf
If Pole(UL)\Px>0:DisplaySprite(3,Pole(UL)\Px,Pole(UL)\Py):EndIf
If KeyOn=0:DisplaySprite(4,Pole(Kn)\Px,Pole(Kn)\Py):EndIf   
DisplayTransparentSprite(6,x6,100):If KeyOn=0;Враг 
DisplayTransparentSprite(7,770,100):EndIf:If x0>70 Or schuss=1:x6+1.5:EndIf
If KeyboardPushed(#PB_Key_Up) And y0>100:y0-spd:For i = 1 To 60:
If CheckCol(i):y0+spd: EndIf:Next:EndIf
If KeyboardPushed(#PB_Key_Down) And y0<325:y0+spd:For i = 1 To 60
If CheckCol(i):y0-spd:EndIf:Next:EndIf:  
If KeyboardPushed(#PB_Key_Right) And x0<700:x0 + spd:For i = 1 To 60
If CheckCol(i):x0-spd:EndIf:Next:EndIf
If KeyboardPushed(#PB_Key_Left) And x0>70:x0-spd:For i = 1 To 60
If CheckCol(i):x0+spd:EndIf:Next:EndIf
If KeyboardReleased(#PB_Key_Space) And schuss=0 And FullLaser >0
x5=x0+80:y5=y0+24:schuss=1:FullLaser-1:PlaySound(0):EndIf 
If x5<800 And schuss:x5+6:Else:schuss = 0:EndIf 
If schuss:DisplayTransparentSprite(5,x5,y5):EndIf 
For i = 1 To 60:If blok(i)\x And schuss:If SpriteCollision(1,blok(i)\x,
blok(i)\y,5,x5,y5):schuss=0:ExplosOn = 1:ExplosX = blok(i)\x
ExplosY = blok(i)\y:Score+500:blok(i)\x =0:blok(i)\y=0:PlaySound(4):Break
EndIf:EndIf:Next
If SpriteCollision(2,Pole(Pr)\Px,Pole(Pr)\Py,0,x0,y0):Pole(Pr)\Px=0:
Pole(Pr)\Py=0:Score+1000:PlaySound(1):EndIf;
If SpriteCollision(4,Pole(Kn)\Px,Pole(Kn)\Py,0,x0,y0):KeyOn=1:PlaySound(2):EndIf
If SpriteCollision(3,Pole(UL)\Px,Pole(UL)\Py,0,x0,y0):FullLaser=13:UL=0:EndIf
If SpriteCollision(7,770,100, 0, x0, y0):If KeyOn=0:x0-2:PlaySound(1):Else:lev+1:x0=50
y0=250:x7=5:schuss=0:KeyOn=0:For i = 1 To 60:blok(i)\x=0:blok(i)\y=0:Next
Delay(1000):x6=5:Goto nacalo:EndIf:EndIf 
If SpriteCollision(6,x6,100, 0, x0, y0):x6=5:schuss=0:liv-1:
FullLaser=13:x0=50:y0=250:PlaySound(3):EndIf 
If ExplosOn>0 And ExplosX>0:If ExplosCount<10:ExplosW=ExplosW + 3:
ExplosH=ExplosH+3:ZoomSprite(8, ExplosW, ExplosH):DisplayTransparentSprite(8,
ExplosX,ExplosY):ExplosCount +1:Else:ExplosCount=1:ExplosW=32:ExplosH=32
ExplosOn=0:EndIf:EndIf:If liv<0:StartDrawing(ScreenOutput())
DrawingFont(Id):Box(0,0,800,600,$FF):DrawText(200,100,"GAME OVER",0,$FF)
DrawText(200,250,"SCORE = "+RSet(Str(Score),8,"0"),0,$FF):DrawText(200,300,
"LEVEL = "+RSet(Str(lev),3,"0"),0,$FF):DrawText(200,500,"Press Esc to Exit",0,
$FF):StopDrawing():EndIf:Until KeyboardReleased(1)
Sons dans les archives:
https://www.dropbox.com/s/ftpuj2z92fh60 ... e.zip?dl=1
or
https://cloud.mail.ru/public/25xX/9xmhSpDe7
Dernière modification par kvitaliy le dim. 04/oct./2015 16:43, modifié 1 fois.
Micheao
Messages : 533
Inscription : dim. 07/déc./2014 10:12
Localisation : Sud-Est

Re: Birthday PurePunch

Message par Micheao »

Vous etes trop fort les gars

je jette l'éponge
Dernière modification par Micheao le sam. 03/oct./2015 17:54, modifié 1 fois.
Avatar de l’utilisateur
majikeyric
Messages : 602
Inscription : dim. 08/déc./2013 23:19
Contact :

Re: Birthday PurePunch

Message par majikeyric »

...
Dernière modification par majikeyric le dim. 04/oct./2015 16:45, modifié 1 fois.
Avatar de l’utilisateur
Ar-S
Messages : 9476
Inscription : dim. 09/oct./2005 16:51
Contact :

Re: Birthday PurePunch

Message par Ar-S »

Sympa Majikeyric :mrgreen:

@Vera : j'ai modifié les 3 1er fichiers .ogg. J'ai aussi inclus l'exe (i have modify the 3 firs ogg file and i also include the exe)
Archive: http://pb.ldvmultimedia.com/PB_vs_THE_WORLD_by_Ar-S.zip
~~~~Règles du forum ~~~~
⋅.˳˳.⋅ॱ˙˙ॱ⋅.˳Ar-S ˳.⋅ॱ˙˙ॱ⋅.˳˳.⋅
W11x64 PB 6.x
Section HORS SUJET : ICI
LDV MULTIMEDIA : Dépannage informatique & mes Logiciels PB
UPLOAD D'IMAGES : Uploader des images de vos logiciels
Verrouillé