PureBasic 5.20 beta 20 is out

Developed or developing a new product in PureBasic? Tell the world about it.
Fred
Administrator
Administrator
Posts: 18150
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

PureBasic 5.20 beta 20 is out

Post by Fred »

Hi folks,

update: beta 20 is available on your online account. Not much this time but we added signed executable on OS X, so it should be OK for gatekeeper with default configuration. All OS X, if you can give it a try, it would be perfect !

Code: Select all

Changed: SpinGadget() EventType are now #PB_EventType_Up and #PB_EventType_Down instead of -1 and 1.
update: beta 19 is available on your online account. It mainly fixes a nasty regression about FPU and x64.

update: beta 18 is available on your online account. It only includes some bug fixes and should be stable enough for wide testing.

update: beta 17 is available on your online account. It only includes some bug fixes, and still maturing. Should be stable enough for wide testing.

update: beta 16 is available on your online account. We changed the DX update stuff, so it shouldn't trigger .net framework anymore, feel free to test ! It also brings some new stuff:

Code: Select all

Added: Automatic PureBasic update check in the IDE (for other IDE which want to do it, just get the purebasic.com/versions.xml file and parse it).
Added: #PB_Window_ScreenCentered and #PB_Window_WindowCentered support for HideWindow()
Added: New parameter to CameraFollow() to autotrack the entity
Added: PickX/Y/Z() and NormalX/Y/Z() support after RayCollide() to get point intersection and normal (if ray hit something).
update: beta 15 is available on your online account. It includes some bug fixes, and a new automatic DirectX updater for the Windows installer. So if you can test this new installer on a fresh windows, and check than 3D engine samples are working out of the box it would be cool ! Also all 3D examples have checked on Linux and OS X, so if some still don't work, don't hesitate to tell.

update: beta 14 is available on your online account. It only includes some bug fixes, don't hesitate to test it !

update: beta 13 is available on your online account. It only includes some bug fixes. It's may be the final beta, so don't hesitate to give it a try on your projects !

update: beta 12 is available on your online account. It just includes some bug fixes which could prevent proper testing.

update: beta 11 is available on your online account. It includes many bug fixes and a small new feature. Another step forward to final, so don't hesitate to test !

Code: Select all

Added: #PB_Entity_ScaleX/Y/Z, for Get/SetEntityAttribute()
Renamed: #PB_Shorcut_Prior to #PB_Shorcut_PageUp and #PB_Shorcut_Next to #PB_Shorcut_PageDown
update: beta 10 is available on your online account. It includes many bug fixes. A step forward to final, so don't hesitate to test !

update: beta 9 is available on your online account. It includes many bug fixes and a few new functionnalities ! Also the doc is now complete (english only), so if you find something wrong, don't hesitate to tell.

Code: Select all

Added: Pitch(), Roll(), Yaw()
Added: #PB_Entity_LinearSleeping, #PB_Entity_AngularSleeping, #PB_Entity_DeactivationTime, #PB_Entity_IsActive,
Added: #PB_Entity_AngularVelocityX/Y/Z, #PB_Entity_AngularVelocity #PB_Entity_HasContactResponse for Get/SetEntityAttribute()
update: beta 8 is available on your online account. It includes many bug fixes and module support in autocomplete ! Please read the Fr34k's blog post as well to get a better grip about this new functionnality http://www.purebasic.fr/blog/?p=417 . News:

Code: Select all

Added: Module support for autocomplete
Changed: Debug output is now an editorgadget() to have better control over printed output (copy/paste a part of a line etc.)
Removed: RenderMovieFrame()
update: beta 7 is available on your online account. The documentation is complete except for the 'Dialog' library (english only). As always, some bug fixes and a some changes:

Code: Select all

Added: CopyTexture()
Renamed: Frame3DGadget() to FrameGadget()
Renamed: Frame3DGadget3D() to FrameGadget3D()
update: beta 6 is out. As always, many bug fixes and some new features added:

Code: Select all

Added: Debugger now support module syntax in the expression evaluation and item display.
Added: #PB_EventType_FirstCustomValue for use with PostEvent()
Added: CameraFollow(), ExamineWorldCollisions(), NextWorldCollision(), FirstWorldCollisionEntity(), SecondWorldCollisionEntity()
Added: WorldCollisionContact(), WorldCollisionNormal(), WorldCollisionAppliedImpulse()
Added: BuildMeshTangentVectors(), MeshVertexTangent()
update: beta 5 is available. As always, some bug fixes and also the 'Module' lib fully renamed to 'Music'. Added #PB_Module support to Defined() for completeness.

update: beta 4 is out. Only bug fixes this time ! I have also published a new ui.xml example which show resizing (see below).

update: beta 3 is out with the usual bug fixes. 'HideModule' has been renamed to 'UnuseModule' for better consistency. Happy testing !

update: beta 2 is available and with the usual bug fixes. As well, zlib have been updated to 1.2.8 and Gosub in procedure have been removed as it can't work for now. Happy testing !

We are very happy to share with you the brand new beta version of the forthcoming 5.20 release. As you can see, we have done a lot of work on it, to modernize the language and the libraries. Here is the full feature list:

Code: Select all

Added: Module support for the compiler
Added: Runtime library
Added: Dialog library (with automatic layout support)
Added: GTK3 subsystem for Linux
Added: DirectX11 subsystem for Windows
Added: JoystickName(), JoystickZ()
Added: Optional #PB_Relative flag to JoystickX/Y/Z() to have more precise values
Added: Optional pad number to JoystickX/Y/Z() to handle more complex gamepads (full support of XBox 360 one for example)
Added: ZoomSprite() now accepts #PB_Default as Width/Height to reset to initial sprite size
Added: 'Color' and 'Alpha' parameter to DisplayTransparentSprite()
Added: ClipSprite() now support #PB_Default for individual parameter
Added: #PB_Sprite_PixelCollision flag to CreateSprite(), LoadSprite() to enable pixel collision
Added: Zoom support to SpritePixelCollision() and SpriteCollision()
Added: OpenGL support for SpriteBlending() (warning, it just wraps OpenGL mode, so it can behave different than DirectX)
Added: 32-bit support for SpriteOutput() for DX and OpenGL
Added: #PB_EventType_Focus and #PB_EventType_LostFocus support to EditorGadget()
Added: #PB_EventType_RightClick support to ListViewGadget()
Added: #PB_EventType_Change support to PanelGadget() and DateGadget()
Added: #Prototype support to Defined()
Added: All Init() functions can be called more than once without issue (like InitSound(), InitNetwork() etc.)
Added: #PB_FileSystem_Force support to DeleteFile()
Added: #PB_FileSystem_NoExtension support to GetFilePart()
Added: Back color parameter to CreateImage()
Added: #PB_Entity_NbSubEntities to GetEntityAttribute()
Added: MeshIndexCount(), SetRenderQueue(), FetchEntityMaterial(), GetMeshData(), SetMeshData()
Added: CPUName(), Un/BindEvent(), Un/BindGadgetEvent(), Un/BindMenuEvent()
Added: Previous location is displayed when declaring a structure, interface, prototype or procedure twice.
Added: 2 license files to easy add the needed information when shipping PB programs (see reference documentation)
Added: Bool() is now evaluated at compile time if the whole expression is constant
Added: Debugger check for SortStructuredList() and SortList() to ensure the specified list is of correct type
Added: Linux executables created on new distribution should still work on old linux.

Optimized: Pixel sprite collision routines are now much faster with DirectX
Optimized: More peephole optimizations on x64 assembler output
Optimized: Faster compilation for big programs
Optimized: Linux build server have been upgraded, now using a better GCC which produce better code.

Changed: renamed ZoomSprite3D() to ZoomSprite()
Changed: renamed TransformSprite3D() to TransformSprite()
Changed: renamed RotateSprite3D() to RotateSprite()
Changed: renamed Sprite3DQuality() to SpriteQuality() 
Changed: renamed Sprite3DBlending() to SpriteBlending()
Changed: Packer plugin constant renamed to #PB_PackerPlugin_XXX

Updated: WebGadget() on Windows doesn't needs ATL.dll anymore
Updated: zlib to 1.2.8
Updated: pqlib (PostgreSQL) to 9.2.4
Updated: SCNotification scintilla structure

Removed: Mozilla ActiveX support for WebGadget() on Windows as the last ActiveX version is way too old (2005)
Removed: Sprite3D library (merged with regular sprite library)
Removed: Palette library (outdated)
Removed: DisplayTranslucentSprite() -> replaced with 'Alpha' parameter for DisplayTransparentSprite()
Removed: DisplaySolidSprite() -> replaced with 'Color' parameter for DisplayTransparentSprite()
Removed: DisplayRGBFilter() -> can be replaced with a zoomed sprite with color
Removed: DisplayShadowSprite() -> can be replaced with DisplayTransparentSprite() with color
Removed: StartSpecialFX(), StopSpecialFX(), DisplayAlphaSprite(), ChangeAlphaIntensity(), UseBuffer()
Removed: Carbon subsystem on OS X, it was too old be used with new libs
A big change has been the sprite3d library remove, so your code will need to be changed if you plan to use the new version (don't forget the new #PB_Sprite_PixelCollision flag when creating/loading a sprite which needs pixel collisions). As you will see, it's all for the best as now everything fit in the regular sprite lib. The 'Module' addon will brings new possibilities, as well 'Runtime' compiler function. Here is some basic examples demonstrating the new features

Code: Select all

;
; Quick module test
;

; All item declared in the module definition will be public
; Works for everything like array, list, structure, macro etc.
;
DeclareModule Vehicule

  #VehiculeConstant  = 10
  #VehiculeConstant2 = 20

  Declare NewAuto(Flags)
  Declare NewBoat()
  
EndDeclareModule


; This procedure will be redefined in the module without issue
;
Procedure Init()
  Debug "Main Init"
EndProcedure


; The module implementation
; Only residents definition will be available here
;
Module Vehicule

  #PrivateConstant  = 30
  
  Procedure Init()
    Debug "Vehicule Init"
  EndProcedure

  
  Procedure NewAuto(Flags)
    Init()
    Debug "NewAuto"
  EndProcedure
  
  Procedure NewBoat()
    Init()
    Debug "NewBoat"
  EndProcedure
  
EndModule

Init()

Vehicule::NewAuto(Vehicule::#VehiculeConstant)
Vehicule::NewBoat()

; Or with module import
;
UseModule Vehicule

NewAuto(#VehiculeConstant)
NewBoat()

UnuseModule Vehicule
Runtime:

Code: Select all

Runtime Procedure RuntimeProcedure()
  Debug "RuntimeProcedure"
EndProcedure

RuntimeProcedure()

Debug GetRuntimeInteger("RuntimeProcedure()")
Debug @RuntimeProcedure()

Runtime Enumeration
  #Runtime1
  #Runtime2
  #Runtime3 
EndEnumeration

Debug GetRuntimeInteger("#Runtime2")
Debug GetRuntimeInteger("#Runtime3")

Procedure TestProce()
EndProcedure

Runtime TestProce()

#AnotherConstant = 54
jiji.l = 10
*Pointer = 52
Runtime TestProce(), #AnotherConstant, jiji, *Pointer

Debug GetRuntimeInteger("jiji")
jiji.l = 20
Debug GetRuntimeInteger("jiji")
Debug GetRuntimeInteger("*Pointer")

Debug IsRuntime("jiji")
Debug IsRuntime("jiji2")

;Point.Point
;Runtime Point


DeclareModule Common

  Enumeration Test
    #fred = 15
   
  EndEnumeration
 
 

EndDeclareModule

Module Common

  Runtime Procedure RuntimeModuleProcedure()
    Debug "RuntimeModuleProcedure"
    Debug @RuntimeModuleProcedure()
  EndProcedure

 RuntimeModuleProcedure()

EndModule
 
 
Debug GetRuntimeInteger("Common::RuntimeModuleProcedure()")

Enumeration Common::Test
  #fred2
EndEnumeration

Debug Common::#fred

Runtime Common::#fred
Debug GetRuntimeInteger("Common::#fred")
Dialog:

Code: Select all

<?xml version="1.0"?>

<!-- Window -->
<window id="0" name="hello" text="Window" label="TestDialog" width="320" height="10" flags="#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget">
	<splitter width="300" height="500">
	  <hbox>
		<checkbox name="checkbox1" text="Run only one Instance" disabled="yes" Flags=""/>
		<progressbar text="Vrey vreyv rye"/>
		<trackbar text="Ole" invisible="no" Flags="#PB_TrackBar_Ticks" width="150"/>
		<option text="option 1" name="option1" onevent="CheckBoxEvent()"/>
		<option text="option 2"/>
	  </hbox>
	  <vbox>
		<listview text="option 3" height="50"/>
		<button text="Ole 2"/>
		<listicon text="option 4" height="50"/>
		<string text="string content"/>
		<editor text="editorgadget" height="50"/>
		<text text="Text gadget"/>
	  </vbox>     
	</splitter>
</window>

Code: Select all

#XML = 0
#Dialog = 0

Runtime Procedure CheckBoxEvent()
  Debug "Option 1"
EndProcedure

If LoadXML(#XML, "ui.xml")
  If XMLStatus(#XML) = #PB_XML_Success
    CreateDialog(#Dialog)
    
    If OpenXMLDialog(#Dialog, #XML, "hello")
      HideWindow(0, #False) ;<window id="0"
     
      Repeat
        Event = WaitWindowEvent()
        
      Until Event = #PB_Event_CloseWindow
    Else
      Debug "Dialog creation error: " + DialogError(#Dialog)
    EndIf
  Else
    Debug "XML error on line " + XMLErrorLine(#XML) + ": " + XMLError(#XML)
  EndIf
EndIf
Dialog with auto resize, expand and minimum bounds:

Code: Select all

<?xml version="1.0"?>

<!-- Window -->
<window id="0" name="hello" text="Window" label="TestDialog" minwidth="auto" minheight="auto" flags="#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget">
  <hbox expand="item:2">
    <vbox expand="no">
      <checkbox name="checkbox1" text="Run only one instance ?" disabled="yes" Flags=""/>
      <progressbar height="25"/>
      <trackbar invisible="no" Flags="#PB_TrackBar_Ticks" height="25"/>
      <option text="option 1" name="option1"/>
      <option text="option 2"/>
      <checkbox name="checkbox1" text="Enable alpha-blending" Flags=""/>
      <option text="scale x2" name="scale"/>
      <option text="scale x3"/>
    </vbox>
    <editor name="editor" width="200" height="50">
    </editor>
  </hbox>
</window>
Grab it while it's hot on your online account, and don't hesitate to post your questions about the new features as there is no doc for now (not in this topic, but in "coding questions", thanks).

Have fun !

The Fantaisie Software Team
User avatar
Zebuddi123
Enthusiast
Enthusiast
Posts: 796
Joined: Wed Feb 01, 2012 3:30 pm
Location: Nottinghamshire UK
Contact:

Re: PureBasic 5.20 beta 1 is ready to test !

Post by Zebuddi123 »

THank you Fred & Team Downloading Now :lol:

Zebuddi.
malleo, caput, bang. Ego, comprehendunt in tempore
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: PureBasic 5.20 beta 1 is ready to test !

Post by Sveinung »

Thank you

Sveinung
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: PureBasic 5.20 beta 1 is ready to test !

Post by PB »

Love this product! :) Thanks, Fred!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: PureBasic 5.20 beta 1 is ready to test !

Post by eesau »

Wow. A huge amount of long-awaited features. Awesome work!
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: PureBasic 5.20 beta 1 is ready to test !

Post by Kwai chang caine »

Code: Select all

Added: Gosub are now allowed again inside Procedure
An old request....thanks a lot FRED 8)
ImageThe happiness is a road...
Not a destination
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Re: PureBasic 5.20 beta 1 is ready to test !

Post by LuCiFeR[SD] »

All I can say is wow!

Thanks Fred and all the team :)
luciano
Enthusiast
Enthusiast
Posts: 151
Joined: Wed Mar 09, 2011 8:25 pm

Re: PureBasic 5.20 beta 1 is ready to test !

Post by luciano »

Many thanks!
W O N D E R F U L
erion
Enthusiast
Enthusiast
Posts: 128
Joined: Sun Jan 24, 2010 11:12 pm

Re: PureBasic 5.20 beta 1 is ready to test !

Post by erion »

Huge, huge thanks for these awesome features! Some of them are long-time requests, I am really glad that they are in. :)

Just two questions:

Would it be possible to implement force feedback support in the joystick library? Most gamepads, especially XBox ones have this feature for a long time. I was about to code my own implementation via DX and XInput today, but now in PB 5.2, force feedback is the only thing that is missing. Please? :)

Regarding modules, I think the two colons are really not comfortable to type, especially on non-english keyboards. Could you use something else, e.g. two dots, perhaps? One dot would be the best, but I think that would drive the lexer nuts :D

Once again, thank you very much for these features, they are really, really appreciated.

Erion
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.

- W. B.

Visit my site, also for PureBasic goodies http://erion.tdrealms.com
User_Russian
Addict
Addict
Posts: 1516
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PureBasic 5.20 beta 1 is ready to test !

Post by User_Russian »

Fred wrote:Runtime:
Line 71: Constant not found: #fred2.
????
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: PureBasic 5.20 beta 1 is ready to test !

Post by luis »

erion wrote: Regarding modules, I think the two colons are really not comfortable to type, especially on non-english keyboards. Could you use something else, e.g. two dots, perhaps?
I think the two colons are really comfortable to type and to spot visually, good choice.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
bembulak
Enthusiast
Enthusiast
Posts: 575
Joined: Mon Mar 06, 2006 3:53 pm
Location: Austria

Re: PureBasic 5.20 beta 1 is ready to test !

Post by bembulak »

Module support (that actually feels a little OOPish), XML-UI support and a lot more! That's absolutely fantastic - thank you!

The UI-XML format: is it a special format, or are there already any common GUI builder that support this XML output (Glade, wxGlade, ...), besides the ones integrated in PB?
cheers,

bembulak
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: PureBasic 5.20 beta 1 is ready to test !

Post by luis »

fred wrote:and don't hesitate to post your questions about the new features as there is no doc for now (not in this topic, but in "coding questions", thanks)
The above line is invisible on most browsers.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: PureBasic 5.20 beta 1 is ready to test !

Post by Kuron »

For me, and my needs, this is the best version yet. Thank you very much Fred. Awesome job!!
Best wishes to the PB community. Thank you for the memories. ♥️
THCM
Enthusiast
Enthusiast
Posts: 276
Joined: Fri Apr 25, 2003 5:06 pm
Location: Gummersbach - Germany
Contact:

Re: PureBasic 5.20 beta 1 is ready to test !

Post by THCM »

Thx for the improved sprite lib. Now it's time to finish my game :mrgreen:
The Human Code Machine / Masters' Design Group
Post Reply