It is currently Fri Oct 18, 2019 4:56 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Happy 15th PureBasic Birthday PurePunch
PostPosted: Tue Sep 15, 2015 6:05 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
Hello Mates

as Falsam as told us on this topic in the french forum, "Bon anniversaire à Purebasic", PureBasic is now 15 years old.

So, it's time for a "Birthday PurePunch", but which must be concerned by Purebasic and/or his forums. (french topic here)

I copy & modify here the previous rules Djes established on old PurePunchs. If someone want to offer a prize, send me a little Private Message.

EDIT on October 14, 2015 : Limit date is shifted to 15 november 2015, 23:59 (11:59 PM) due to lack of competitors (in french and in english forums), so if you needed more time, or if you were hesitating, you can now go on


EDIT on September 29, 2015 : A prize of 15€ (not reclaimed and re-offered by Falsam on previous PurePunch, thanks to him and Fred) is offered to the winner, at the same rules as the previous PurePunch :
Quote:
Fred and Fantaisie Software are giving for 15€ of prize, to seek on Thinkgeek or a local store (see here on Amazon).


My own wishes are : all OldSchool computer stuff, so let your imagination run on 2D Demo FX, old game remake, intro/cracktro remake...

Quote:
The Rules
    0.5° Production MUST be concerned by Purebasic and/or his forums
    1° The program will be done with Purebasic version 5.24 minus but 5.40 forbidden, Demo Version accepted, APIs allowed but no userlib, Ogre, DirectX, OpenGL allowed.
    2° the program source will be 192 text lines of 80 chars max per line, distributed as desired between code and DATAs. it possible to cut your source code into many text files, like PB code, data text file, Ogre shader file, prefs file, XML datas, etc.... But the length of each file sise is cumulative : source code+data+xml+prefs+... MUSTN4T exceed 192 lines of 80 chars max.
    3° Be original, meaning complete new creation, or something really new to existing creation.
    MUSN'T BE HARMFUL.
    Obfuscated binary file(s) DENIED. Only image files, max 1920x1080 allowed, and 5 files max , also sound/music file (ogg/mp3/wav/xm/s3m/mod) 1mb max.
    6° You will be able to add a line ( not counted) at the beginning of your program (like the necessity to use a particular sub-system). this line will add this form :
    Code:
    MessageRequester("Information", "Message", #PB_MessageRequester_Ok)

    Limited date and time : 15 october 2015, 23:59:59 GMT
    3 codes maximum per member will be allowed !!!

    At the period end, you will be able to vote for the best program, accorded to your point of view.
    Only members registered before 1st september 2015 will be able to vote ; points must be attributed as this example :
      3 points for the 1st,
      2 points for 2nd,
      1 point for the 3th.
    Voters will be able to choose their 3 favorites programs till 15 november at 23:59:59 GMT.

How to post
    Post your code in this forum after you having added this header (lines not counted in the 192 limit) :

Code:
;*****************************************************************************
;*
;* Birthday Punch : PureBasic 15 years of happiness
;* PureBasic 5.xx
;* 192 lines of 80 chars of code or data as you want
;*
;* Name     : 
;* Author   :
;* Date     :
;* Notes    :
;*
;*****************************************************************************

Good Luck ! :)


Link to BirthDay PurePunch on French Forum

Last words : Excuse me if i made a bad translation from my french topic, if you eyes are crying blood after reading my message, please feel free to communicate me language corrections.


Last edited by TazNormand on Tue Oct 20, 2015 9:06 am, edited 7 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Birthday PurePunch
PostPosted: Wed Sep 16, 2015 6:10 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
My message does not seem to excite the crowd :(


Top
 Profile  
Reply with quote  
 Post subject: Re: Birthday PurePunch
PostPosted: Wed Sep 16, 2015 7:37 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Fri Apr 25, 2003 6:41 pm
Posts: 1356
I think, that the main problem is, that there is no theme. Better would be a destiny, like "the smallest PacMan-Clone".


Top
 Profile  
Reply with quote  
 Post subject: Re: Birthday PurePunch
PostPosted: Wed Sep 16, 2015 8:09 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
Hi GPI

There is a theme, and not a small one : BIRTHDAY ! isn't enough ?


Top
 Profile  
Reply with quote  
 Post subject: Re: Birthday PurePunch
PostPosted: Wed Sep 16, 2015 8:18 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 11, 2009 1:56 pm
Posts: 860
Location: Essen (Germany)
A happy idea this is Image

GPI wrote:
I think, that the main problem is, that there is no theme.
To me the theme is clear, but thinking about what you say I find the thread title is too vage.
It might be more inviting if it announced something like:

"Happy 15th PureBasic Birthday PurePunch"

greets ~ Vera

_________________
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi

Missing a download-file on the forums? ~ check out this backup page.


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Wed Sep 16, 2015 8:47 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
Good Idea, Mrs Vera, title changed according to your proposal :D


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Fri Sep 25, 2015 1:37 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jan 12, 2011 3:48 pm
Posts: 184
Location: Serbia
I guess i'm in :)
Just one question - is it possible to merge lines with ":"? I sometimes write stuff like this:
Code:
a = 1 : If a
  ..
EndIf


EDIT:
Also, why 5.22? The last LTS is 5.24.

_________________
PB examples collection
pb-osx-globalhotkeys
pb-osx-notifications


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Fri Sep 25, 2015 1:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Sep 21, 2011 9:11 am
Posts: 606
Location: France
deseven wrote:
Just one question - is it possible to merge lines with ":"? I sometimes write stuff like this:
Yes

or like this
Code:
Macro i:If:EndMacro:Macro ei:EndIf:EndMacro:Macro d:Debug:EndMacro
a=1:i a=1:d "test":ei

_________________

➽ Windows 10 - PB 5.62 & PB 5.70 LTS

Sorry for my bad english and the Dunning–Kruger effect.


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Fri Sep 25, 2015 2:22 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
deseven wrote:
I guess i'm in :)
Just one question - is it possible to merge lines with ":"? I sometimes write stuff like this:
Code:
a = 1 : If a
  ..
EndIf


EDIT:
Also, why 5.22? The last LTS is 5.24.


Yes, you can merge lines with ":", and 5.22 is mistyped, right version is 5.24 => corrected in first message


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Sat Sep 26, 2015 12:51 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jan 12, 2011 3:48 pm
Posts: 184
Location: Serbia
falsam wrote:
or like this
Code:
Macro i:If:EndMacro:Macro ei:EndIf:EndMacro:Macro d:Debug:EndMacro
a=1:i a=1:d "test":ei

Don't want to go THIS extreme :) I think the code should be readable.

_________________
PB examples collection
pb-osx-globalhotkeys
pb-osx-notifications


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Tue Sep 29, 2015 5:48 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
Hi all, a prize of 15€ is offered for the winner, please read first message of this topic for more information.


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Sat Oct 03, 2015 2:37 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Oct 21, 2013 5:21 pm
Posts: 152
Location: France (Al's Nudie bar!)
Good luck everyone !

_________________
http://majikeyric.free.fr


Last edited by majikeyric on Sun Oct 04, 2015 4:48 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Sun Oct 04, 2015 4:14 pm 
Offline
User
User
User avatar

Joined: Tue May 26, 2009 3:17 pm
Posts: 27
Location: France
@ Majikeyric : i've post the same comment on french forum, but copied here in english for further programs :

Don't forget the most important rule :

Quote:
but which must be concerned by Purebasic and/or his forums


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Tue Oct 06, 2015 12:49 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Oct 06, 2007 11:20 pm
Posts: 264
Location: France
Mise à jour 05/10/2015

PB vs THE WORLD
Style : shoot em up
- I used Musik Maker jam to make the music and soundforge for the samples
- i also used a sprite from http://millionthvector.blogspot.fr (free sprites) for the ship (not the shield) andn the planet
- I used the old rules 80x80 with my code :)
- Try with succes on Windows and MacOS

EnJoY

Datas :http://pb.ldvmultimedia.com/PB_vs_THE_WORLD_by_Ar-S.zip

Code:
;*****************************************************************************
;*
;* Birthday Punch : PureBasic 15 years of happiness
;* PureBasic 5.31 x86
;* 192 lines of 80 chars of code or data as you want
;*
;* Name     : PB vs THE WORLD
;* Author   : Ar-S - Music made with Music Maker Jam - thanks to Microdevweb for shoot linkedlist() helping
;* Date     : Nov/Oct 2015
;* Notes    : Dedicated To my mom Apr 1940 - Sept 2015
;*
MessageRequester("Info","Use Arrows to move, space to shoot and left ctrl to use shield"+Chr(10)+"Left Mouse Button to restart"+Chr(10)+Chr(10)+"Fleches pour se diriger, ctrl : bouclier, Espace:Feu, Bouton de gauche souris pour recommencer",#PB_MessageRequester_Ok) ; LIGNE NON PRIS EN COMPTE
     
UseOGGSoundDecoder():Macro m:Macro:EndMacro:m dec:decoder():EndMacro
m e:examine:EndMacro:m s(n,l,h,x,y):EndMacro:m _s:Structure:EndMacro
InitSprite():InitKeyboard():InitMouse():UseOGGSound#dec:UsePNGImage#dec
InitSound()
_S BB:x.i:y.i:ID.b:End#_S:_S SP:x.i:y.i:n.i:LL.i:HH.i:v.b:r.f:End#_S
_S St:x.i:y.i:v.b:n.b:End#_S:_S SN:D.i:F.i:End#_S:M R:random:EndMacro:M P(S)
PlaySound(S,#PB_Sound_MultiChannel,70):EndMacro:M PP(S):PlaySound(S,1,80)
EndMacro:m _k(k):KeyboardPushed(k):EndMacro
M CS(n,x,y,l,h):ClipSprite(n,x,y,l,h):sp(n)\LL=l/2
sp(n)\HH=h/2:ZoomSprite(n,l/2,h/2):v(n):EndMacro:m v(n):sp(n)\v = R(6,2)
EndMacro:m SX(n):sp(n)\x:EndMacro:m SY(n):sp(n)\y:EndMacro:M Redo(n)
SX(n)=820:SY(n)=R(500,100):v(n):EndMacro:m EX(n):St(n)\x:EndMacro
m EY(n):St(n)\y:EndMacro:m EN(Z):St(Z)\n:EndMacro:m EV(n):St(n)\v
EndMacro:m _r(n,d):SpriteQuality(1):RotateSprite(n,d,#PB_Absolute):EndMacro
Global NewList BB.BB():Global F=LoadFont(16, "Arial", R(80,50))
Global F1=LoadFont(17, "Arial", 24):Global.b feu,NF,ENNEMI,VIZ,ShotOn.b=#True
Global.i x,y,xi,T:Global SCORE,LIFE:Global Dim sp.SP(16):Global Dim st.st(100)
Global TimeElapset=ElapsedMilliseconds()
LoadSound(20,"01.ogg"):LoadSound(21,"02.ogg"):LoadSound(22,"03.ogg")
LoadSound(23,"04.ogg"):SCORE=0:LIFe=3:x=150:y=350:NF=9:xi=2500
t1$="PURE BASIC VS THE WORLD !":t2$="HAPPY PURE BIRTHDAY"
For i=0 To 100:EX(i)=R(820):EY(i)=R(600):Next:For i=0 To 20:EN(i)=13:EV(i)=3
Next:For i=21 To 60:EN(i)=14:EV(i)=6:Next:For i=61 To 100:EN(i)=15:EV(i)=10
Next:OpenScreen(800,600,32,"PB VS The WORLD", #PB_Screen_SmartSynchronization)
LoadSprite(0,"im.png",8|4):For i=1 To 15:CopySprite(0,i,8|4):Next
CS(1,7,142,232,133):CS(2,289,135,234,139):CS(3,0,1,129,128):CS(4,129,1,128,128)
CS(5,257,0,118,130):CS(6,379,0,101,131):CS(7,478,1,115,130):CS(8,595,8,250,126)
CS(9,533,213,53,62):ClipSprite(10,675,138,140,136):CS(11,606,231,25,43)
CS(12,631,231,25,43):CS(13,840,266,8,8):CS(14,833,270,6,5):CS(15,824,271,3,3)
FreeSprite(0)
txt.s=t1$:xtx=r(500,100):ColT=RGB(R(255),R(255),R(255)):sx(10)=1500
sy(10)=r(460,140):PS=1:Repeat:StartTime.i=ElapsedMilliseconds():ClearScreen(0)
E#Mouse():E#Keyboard():If ElapsedMilliseconds()-TimeElapset>=350:ShotOn=#True
TimeElapset=ElapsedMilliseconds():EndIf:If GO=0:If PS=1:PP(23):ps+1:EndIf
For i=0 To 100:DisplayTransparentSprite(R(15,13), EX(i), EY(i),255):EX(i)-EV(i)
If EX(i)<0:EX(i)=805:ey(i)=R(600):EndIf:Next
DisplayTransparentSprite(10,SX(10),SY(10),255):StartDrawing(ScreenOutput())
DrawingFont(f):DrawingMode(#PB_2DDrawing_Transparent):If xi< -2500:NT+1:If NT<2
txt.s=t1$:ElseIf NT=2:txt.s=t2$:Else:NT=0:EndIf:xi=2500:xtx=r(500,100)
ColT=RGB(R(255),R(255),R(255)):EndIf:DrawText(xi,xtx,txt.s,ColT,$0)
StopDrawing():Xi-6:sx(2)=sx(1):sy(2)=sy(1):For S=3 To 8
DisplayTransparentSprite(S, SX(S), SY(S),255):Next:If _K(#PB_Key_Up):y-5:ViZ=1
If _K(#PB_Key_Left):x-5:ViZ=0:ElseIf _K(#PB_Key_Right):X+5:ViZ=1:EndIf
ElseIf _K(#PB_Key_Down):y+5:ViZ=1:If _K(#PB_Key_Left):x-5:ViZ=0
ElseIf _K(#PB_Key_Right):X+5:ViZ=1:EndIf:ElseIf _K(#PB_Key_Left):x-5:VIZ=0
ElseIf _K(#PB_Key_Right):SX(1)=x:x+5:ViZ=1:EndIf:If y<25:y=25:ElseIf y>530
y=530:EndIf:If x<0:x=0:ElseIf x>700:x=700:EndIf:SX(1)=x:Sy(1)=y:Sx(11)=x-10
Sy(11)=y+23:Sx(12)=Sx(11):Sy(12)=Sy(11):If _k(#PB_Key_Space) And ShotOn
AddElement(BB()):BB()\X=SX(1)+120:BB()\Y=SY(1)+15:BB()\ID=9:ShotOn=#False:P(20)
EndIf:If _K(#PB_Key_LeftControl):shield=1:P(22):Else:shield=0:EndIf
If shield=0:ship=1:Else:ship=2:EndIf:DisplayTransparentSprite(ship,x,y,255)
RE=R(12,11):DisplayTransparentSprite(RE,sx(RE),Sy(RE),200):ForEach BB()
BB()\X + 6:DisplayTransparentSprite(BB()\ID, BB()\X, BB()\Y,255):Next     
For ENNEMI=3 To 8:ForEach BB()
If SpriteCollision(9,BB()\X,BB()\Y,ENNEMI,sx(ENNEMI),sy(ENNEMI))<>0
T=ENNEMI:SCORE+1:redo(ENNEMI):If ListSize(BB())>0:DeleteElement (BB()):EndIf
P(21):EndIf:Next:Next:If ListSize(BB())>0 And BB()\X>810:DeleteElement (BB())
EndIf:For i=3 To 8:SX(i)-sp(i)\v:SpriteQuality(1)
RotateSprite(i, ROT.f,#PB_Absolute):ROT.f-0.5:If SX(i)< -100:redo(i):EndIf
Next:For COL=3 To 8:If SpriteCollision(1,sx(1),sy(1),COL,sx(col),sy(col))<>0
If shield=1:score-1:If Score<=0:Score=0:EndIf:ElseIf shield=0:life-1:If Life<=0
GO=1:EndIf:EndIf:P(21):redo(col):EndIf:Next:StartDrawing(ScreenOutput())
DrawText(0,0,"SCORE : "+Str(SCORE),$0000FF,$0)
DrawText(150,0,"LIFE : "+Str(LIFE),$0000FF,$0)
DrawText(650, 0, "ESCAPE to EXIT",$ffffff, $0):StopDrawing():SX(10)-1
If sx(10) < -160:sx(10)=1500:sy(10)=r(460,140):EndIf:ElseIf GO=1:StopSound(23)
PS=0:StartDrawing(ScreenOutput()):DrawingFont(f):TG$="GAME OVER"
DrawText( R(400,398)-TextWidth(TG$)/2,R(280,278),tg$,$FFFFFF,$0)
DrawingFont(f1)
DrawText(R(250,248),R(510,508),"Press LMB to restart",$FFFFFF,$0)
DrawText(R(290,288),R(120,118),"SCORE : "+Str(score),$FFFFFF,$0):StopDrawing()
If MouseButton(#PB_MouseButton_Left):score=0:Life=3:x=5:sx(1)=x:PS=1:GO=0
EndIf:EndIf:FlipBuffers():deltatime=(ElapsedMilliseconds()-StartTime)/1000
Until KeyboardPushed(#PB_Key_Escape)

_________________
~Ar-S~

ResizerGold : The easiest way to resize your pictures and more
My webSite (french) : LDVMULTIMEDIA
PB - 5.4x LTS / 5.6x - W10 x64 - GTX1080 - i5 6600k
Repeat : try : until done = 1


Top
 Profile  
Reply with quote  
 Post subject: Re: Happy 15th PureBasic Birthday PurePunch
PostPosted: Tue Oct 06, 2015 4:00 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1681
Location: Uttoxeter, UK
@ar-s,

Very nice, thank you. Enjoyed your game. :D
Works fine on Windows 7-64, but I think, even better on my MacBook.

_________________
DE AA EB


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye