It is currently Thu Nov 23, 2017 12:08 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 60 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Sun Apr 03, 2011 11:41 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5745
Location: Germany
Hello everybody!

You probably saw the fake April 1 announcement, but as we all know: real releases happen on a Monday! :P So here it is, after a longer than usual period: The first beta of the upcoming PureBasic 4.60 release. It is available for download on your personal account.

This release is mostly about the 3D side of things, but there are new features for application programmers as well. The OGRE engine was updated to version 1.7.0 and we switched the physics engine from ODE to Bullet. Furthermore, there are a ton of new 3D libraries and commands. You can see the full list below. The 3D commands are not documented yet, but we will put up some examples to demonstrate them.

A special thanks to G-Rom and TMyke from the french forum for their help on the new 3D commands!

Note: It may be required that you update your DirectX 9 runtimes to work with this new version. If you get a missing DLL error when running the 3D examples, then install this: http://www.microsoft.com/downloads/en/d ... laylang=en

On the application side of things, the most notable addition is the CanvasGadget() command. It is a simple drawing surface that provides detailed mouse and keyboard events to easily implement custom data views or controls (all cross-platform of course). You can see this new gadget in action in the IDE already: The new file panel and the new color picker tool both make use of it. Other than that, there are some smaller new commands like additions to the LinkedList library for example. All new non-3D commands are already documented in the manual.

The IDE got some additions as well, like the ability to build projects directly from the command-line, or the option to be warned when a file is changed on disk while open in the IDE. Unfortunately, the automation framework that I talked about here on the forum did not make it into this release. It wasn't finished in time, and its not a big enough priority to justify delaying this release any longer.

Finally, we are in the process of changing the PureBasic documentation to be more precise and readable when it comes to function parameters and return values. This is still a work in progress which should be finished for the final release. Comments on the new structure are welcome.

Here is the full list of changes:

Code:
Libraries:
- added CanvasGadget(), CanvasOutput()
- added SetGadgetItemData() for PanelGadget
- added MoveElement(), MergeLists(), SplitList() commands
- added RandomizeList(), RandomizeArray()
- added PushListPosition(), PopListPosition(), PushMapPosition(), PopMapPosition()
- added ImageID parameter to OpenSubMenu()
- added #PB_ListIcon_ThreeState and #PB_ListIcon_Inbetween
- added #PB_Tree_ThreeState and #PB_Tree_Inbetween
- added crossplatform ComboBox events
- added 'Joint' library
- added 'SpecialEffect' library
- added 'StaticGeometry' library
- added CameraPitch(), CameraRoll(), CameraYaw(), SwitchCamera()
- added ApplyEntityForce(), ApplyEntityImpulse(), EntityPitch(), EntityRoll(), EntityYaw(), GetEntityAttribute(),
        GetEntityMaterial(), SetEntityAttribute(), SetEntityMaterial()
- added LightDiffuseColor(), SpotLightRange(), LightLookAt(), LightPower(), DisableLightShadows()
- added MaterialDepthWrite(), MaterialSelfIlluminationColor(), MaterialShininess(), GetScriptMaterial()
- added BuildMeshShadowVolume(), CreateLine3D(), CreateCube(), CreateSphere(), CreateCylinder(), CreatePlane(), AddSubMesh()
        MeshVertexCount(), UpdateMeshBoundingBox(), MeshRadius(), AddMeshVertex(), MeshVertexNormal(), MeshVertexColor()
        MeshVertexTextureCoordinate(), AddMeshFace(), FinishMesh(), NormalizeMesh(), SaveMesh(), SetMeshMaterial(), SubMeshCount()
        TransformMesh()
- added NodePitch(), NodeRoll(), NodeYaw()

- changed FindString() 'StartPosition' parameter to be optional
- changed WebGadget to use WebKitGtk on Linux
- changed ContainerGadget with #PB_Container_Borderless to no longer add a 2px invisible border on Linux
- changed EntityPhysicBody(), CreateLight(), RenderWorld(), ShowGUI, WorldShadows()
- changed EntityMaterial() to SetEntityMaterial()

- removed: Get/SetEntityMass(), Get/SetEntityFriction()
- removed: SetMeshData() (temporary, needs to be updated)

IDE:
- added IDE options for commandline project building
- added monitoring of files for changes on disk while they are open in the IDE
- added FilePanel custom implementation with Drag & Drop, Dropdown menu, scrolling also on OSX
- added Diff tool for directories/files
- added Html help viewer for Linux/OSX
- added Help viewer in toolspanel
- new Color Picker tool
- enabled font selection in IDE for OSX
- ProjectPanel now remembers node expanded states

Debugger:
- added maximize button to all debugger windows
- added all IsXxx() and XxxID() functions to the expression parser (for data breakpoints)

Manual:
- The manual is being updated to a new format which more clearly describes
 individual function parameters and return values. This is not yet complete,
 but will be finished for the final release.



This is a detailed list of the new 3D commands:
Code:
Quick help for new 3D commands:
-------------------------------

CameraPitch(#Camera) - Retrieve the pitch of the #Camera.
CameraRoll(#Camera) - Retrieve the roll of the #Camera.
CameraYaw(#Camera) - Retrieve the yaw of the #Camera.
SwitchCamera(#Camera, #NewCamera) - Change the active #Camera with the #NewCamera.

ApplyEntityForce(#Entity, x, y, z []) - Apply a force to #Entity
ApplyEntityImpulse(#Entity, x, y, z []) - Apply a force to #Entity
EntityPhysicBody(#Entity, Type [, Mass [, Restitution, Friction]]) - Change the #Entity physic body
EntityPitch(#Entity) - Return the pitch of the #Entity.
EntityRoll(#Entity) - Return the roll of the #Entity.
EntityYaw(#Entity) - Return the yaw of the #Entity.
GetEntityAttribute(#Entity, Attribute) - Get the #Entity attribute value
GetEntityMaterial(#Entity) - Get the #Entity material
SetEntityAttribute(#Entity, Attribute, Value) - Set an #Entity attribute value
SetEntityMaterial(#Entity, MaterialID) - Set the #Entity material

PointJoint(#Entity, PivotX, PivotY, PivotZ [, #Entity2, PivotX2, PivotY2, PivotZ2])
GetJointAttribute, Long, Long, (#Entity, Attribute)
SetJointAttribute, Long, Long, Float, (#Entity, Attribute, Value)
FreeJoint(#Entity)
HingeJoint(#Entity, PivotX, PivotY, PivotZ, AxisX, AxisY, AxisZ, #Entity2, PivotX2, PivotY2, PivotZ2, AxisX2, AxisY2, AxisZ2)
ConeTwistJoint(#Entity, FxA, FyA, FzA, #Entity2, FxB, FyB, FzB)
SliderJoint(#Entity, FxA, FyA, FzA, #Entity2, FxB, FyB, FzB)

CreateLight(#Light, Color [, x, y, z [, Flags]]) - Create a new #Light.
LightDiffuseColor(#Light, Color)
SpotLightRange(#Light, InnerAngle, OutterAngle [, FallOff])
LightLookAt(#Light, x, y, z)
DisableLightShadows(#Light, Disable)

MaterialDepthWrite(#Material, Enable) - Enable or disable the #Material depth write.
MaterialSelfIlluminationColor(#Material, Color) - Change the #Material self illumination color.
MaterialShininess(#Material, Shininess) - Change the #Material shininess.
GetScriptMaterial(#Material, Name$) - Get a material defined in scripts files.

BuildMeshShadowVolume(#Mesh)
CreateLine3D(#Mesh, x, y, z, Color, x2, y2, z2, Color2)
CreateCube(#Mesh, Size)
CreateSphere(#Mesh, Radius [Segments, Rings])
CreateCylinder(#Mesh, Radius, Length [, Tesselation, CloseTop, Oblique])
CreatePlane(#Mesh, TileSizeX, TileSizeZ, TileCountX, TileCountZ, TextureRepeatCountX, TextureRepeatCountY)
AddSubMesh()
MeshVertexCount(#Mesh [, SubMesh])
UpdateMeshBoundingBox(#Mesh)
MeshRadius(#Mesh)
AddMeshVertex(x, y, z)
MeshVertexNormal(x, y, z)
MeshVertexColor(Color)
MeshVertexTextureCoordinate(u, v)
AddMeshFace(Vertex1, Vertex2, Vertex3)
FinishMesh()
NormalizeMesh(#Mesh [, SubMesh])
SaveMesh(#Mesh, Filename$)
SetMeshMaterial(#Mesh, MaterialID [, SubMesh])
SubMeshCount(#Mesh)
TransformMesh(#Mesh, x, y, z, ScaleX, ScaleY, ScaleZ, RotateX, RotateY, RotateZ [, SubMesh])

NodePitch(#Node) - Return the x position of the #Node.
NodeRoll(#Node) - Return the y position of the #Node.
NodeYaw(#Node) - Return the z position of the #Node.

CreateCompositorEffect(#Effect, CameraID, EffectName$)
CreateRibbonEffect(#Effect, MaterialID, NodeID, NbChains, NbElements, InitialWidth, Length)
FreeEffect(#Effect) - Free the specified #Effect.
HideCompositorEffect(#Effect, State)
CompositorEffectParameter(#Effect, CameraID, EffectName$, DataType, *Data)
IsEffect(#Effect) - Tests if the given '#Effect' is an initialized effect object.
RibbonEffectColor(#Effect, Color, FadeoutColor)

AddStaticGeometryEntity(#StaticGeometry, EntityID, x, y, z [, ScaleX, ScaleY, ScaleZ])
BuildStaticGeometry(#StaticGeometry)
CreateStaticGeometry(#StaticGeometry, Width, Height, Length, EnableShadows)
FreeStaticGeometry(#StaticGeometry) - Free the specified #StaticGeometry.
IsStaticGeometry(#StaticGeometry) - Tests if the given '#StaticGeometry' is an initialized effect object.

RenderWorld([ElapsedPhysicTime]) - Renders the 3D world on the screen.
ShowGUI(Intensity, ShowMouseCursor [#Camera, Enable]) - Shows or hides the GUI
WorldShadows(ShadowType [, Distance]) - Change the shadow handling in this world.


As usual: This is a beta version. Don't be surprised if you find bugs. Please report them all, so we can reach a solid version for the final release.

Have fun with this new version!

The PureBasic Team

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Sun Apr 03, 2011 11:46 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1468
Location: Nantes
great @ !!

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Sun Apr 03, 2011 11:49 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13141
Location: France
2 examples to test the new Joint lib (to be saved in the PB Sources dir):

A point join test:

Code:

#CameraSpeed = 5

IncludeFile "Screen3DRequester.pb"

Define.f KeyX, KeyY, MouseX, MouseY

If InitEngine3D()
 
  Add3DArchive("Data", #PB_3DArchive_FileSystem)
 
  InitSprite()
  InitKeyboard()
  InitMouse()
 
  If Screen3DRequester()
   
    ;==================================
    ; create single material
    CreateMaterial(1, LoadTexture(0, "clouds.jpg"))
    MaterialAmbientColor(1, #PB_Material_AmbientColors)
    ;
    CreateMaterial(2, LoadTexture(0, "clouds.jpg"))
    MaterialAmbientColor(2, #PB_Material_AmbientColors)
   
   
    ;==================================
    ; create cube
    CreateCube(1, 1.0)
    cube1=CreateEntity(#PB_Any, MeshID(1), MaterialID(1))
    EntityLocate(cube1, 2,0,0)
    cube2=CreateEntity(#PB_Any, MeshID(1), MaterialID(1))
    EntityLocate(cube2, 2,-3,0)
   
    ;==================================
    ; create sphere
    CreateSphere(2, 0.66)
    sphere=CreateEntity(#PB_Any, MeshID(2), MaterialID(1))
    EntityLocate(sphere, 2,-6,0)
   
   
   
    ; create cube3 (socle)
    CreateCube(2, 10.0)
    socle=CreateEntity(#PB_Any, MeshID(2), MaterialID(2))
    EntityLocate(socle, 5,4,0)
    ScaleEntity(socle, 1,0.1,1)
   
   
    EntityPhysicBody(cube1, #PB_Entity_BoxBody, 1.0)
    EntityPhysicBody(cube2, #PB_Entity_BoxBody, 1.0)
    EntityPhysicBody(sphere, #PB_Entity_SphereBody, 1.0)
    EntityPhysicBody(socle, #PB_Entity_StaticBody)
   
   
    PointJoint(cube1,  0, 7, 0)
    PointJoint(cube2,  0, 0, 0, cube1, 0, -3,0)
    PointJoint(sphere,  0, 2, 0, cube2, 0, -2,0)
   
    ApplyEntityImpulse(cube1,  10, 0, 0)
   
   
    ;==================================
    CreateCamera(0, 0, 0, 100, 100)
    CameraLocate(0,0,2,25)
   
    Repeat
     
      If ExamineKeyboard()
       
        If KeyboardPushed(#PB_Key_O)
          ApplyEntityImpulse(cube2,  0.2, 0, 0)
        EndIf
       
        If KeyboardPushed(#PB_Key_Left)
          KeyX = -#CameraSpeed
        ElseIf KeyboardPushed(#PB_Key_Right)
          KeyX = #CameraSpeed
        Else
          KeyX = 0
        EndIf
       
        If KeyboardPushed(#PB_Key_Up)
          KeyY = -#CameraSpeed
        ElseIf KeyboardPushed(#PB_Key_Down)
          KeyY = #CameraSpeed
        Else
          KeyY = 0
        EndIf
       
      EndIf
     
      If ExamineMouse()
        MouseX = -(MouseDeltaX()/10)*#CameraSpeed/2
        MouseY = -(MouseDeltaY()/10)*#CameraSpeed/2
      EndIf
      MoveCamera  (0, KeyX, 0, KeyY)
      RotateCamera(0,  MouseY, MouseX, 0) 
     
      Screen3DEvents()
      ; main render loop
      RenderWorld()
      FlipBuffers()
     
    Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
   
  EndIf
 
Else
  MessageRequester("Error", "The 3D Engine can't be initialized",0)
EndIf

End


and a slider joint test:

Code:

#PB_PointJoint_Tau = 1
#PB_PointJoint_Damping = 2
#PB_SliderJoint_LowerLimit = 3
#PB_SliderJoint_UpperLimit = 4
#PB_ConeTwistJoint_SwingSpan = 5
#PB_ConeTwistJoint_SwingSpan2 = 6
#PB_ConeTwistJoint_TwistSpan = 7


#CameraSpeed = 5

IncludeFile "Screen3DRequester.pb"

Define.f KeyX, KeyY, MouseX, MouseY

If InitEngine3D()
 
  Add3DArchive("Data", #PB_3DArchive_FileSystem)
 
  InitSprite()
  InitKeyboard()
  InitMouse()
 
  If Screen3DRequester()
   
    ;==================================
    ; create single material
    CreateMaterial(1, LoadTexture(0, "clouds.jpg"))
    MaterialAmbientColor(1, #PB_Material_AmbientColors)
    ;
    CreateMaterial(2, LoadTexture(0, "clouds.jpg"))
    MaterialAmbientColor(2, #PB_Material_AmbientColors)
   
   
    ;==================================
    ; create cube
    CreateCube(1, 1.0)
    cube1 = CreateEntity(#PB_Any, MeshID(1), MaterialID(1))
    EntityLocate(cube1, -1, -0.5,0)
    RotateEntity(cube1, 0,0,10)
   
    ;==================================
    ; create cube2
    cube2 = CreateEntity(#PB_Any, MeshID(1), MaterialID(2))
    EntityLocate(cube2, 2,0,0)
    RotateEntity(cube2,0,0,10)
   
    ; create cube3 (socle)
    CreateCube(2, 10.0)
    Ground = CreateEntity(#PB_Any, MeshID(2), MaterialID(2))
    EntityLocate(Ground, 5,-8,0)
    ScaleEntity(Ground, 2,0.2,2)
   
   
    EntityPhysicBody(cube1, #PB_Entity_BoxBody, 1.0)
    EntityPhysicBody(cube2, #PB_Entity_BoxBody, 0.0)
   
    SliderJoint(cube1,  0,0.7,0,  cube2,  0,1.1,0)
    SetJointAttribute(cube1, #PB_SliderJoint_LowerLimit, -3)
    SetJointAttribute(cube1, #PB_SliderJoint_UpperLimit, 4)
   
   
    ;==================================
    CreateCamera(0, 0, 0, 100, 100)
    CameraLocate(0,0,2,25)
   
    Repeat
     
      If ExamineKeyboard()
       
        If KeyboardPushed(#PB_Key_O)
          ApplyEntityImpulse(cube1,  0.1, 0, 0)
        EndIf
       
        If KeyboardPushed(#PB_Key_Left)
          KeyX = -#CameraSpeed
        ElseIf KeyboardPushed(#PB_Key_Right)
          KeyX = #CameraSpeed
        Else
          KeyX = 0
        EndIf
       
        If KeyboardPushed(#PB_Key_Up)
          KeyY = -#CameraSpeed
        ElseIf KeyboardPushed(#PB_Key_Down)
          KeyY = #CameraSpeed
        Else
          KeyY = 0
        EndIf
       
      EndIf
     
      If ExamineMouse()
        MouseX = -(MouseDeltaX()/10)*#CameraSpeed/2
        MouseY = -(MouseDeltaY()/10)*#CameraSpeed/2
      EndIf
      MoveCamera  (0, KeyX, 0, KeyY)
      RotateCamera(0,  MouseY, MouseX, 0) 
     
      Screen3DEvents()
      ; main render loop
      RenderWorld()
      FlipBuffers()
     
    Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
   
  EndIf
 
Else
  MessageRequester("Error", "The 3D Engine can't be initialized",0)
EndIf

End


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Sun Apr 03, 2011 11:50 pm 
Offline
Always Here
Always Here
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 5726
Location: Berlin - Germany
:D
thanks, great news.

_________________
PureBasic 5.61 | SpiderBasic 2.10 | Windows 10 Pro (x64) | Linux Mint 18.2 (x64)
I would like to change the world, but God does not release the source code.
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Sun Apr 03, 2011 11:57 pm 
Offline
666
666

Joined: Mon Sep 01, 2003 2:33 pm
Posts: 1033
Good news indeed! I shall enjoy experimenting I think :P


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Sun Apr 03, 2011 11:58 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 21, 2008 5:02 pm
Posts: 609
Location: Aarhus, Denmark
Nice one!
Thanks a lot :D


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 12:04 am 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
Thanks :D

Even though I'm not a user of 3d, it's nice to see the continuing development of the language.

Best to you.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 12:17 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1468
Location: Nantes
Code:
EffectName$


Is it an external script ?

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 4:37 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Dec 30, 2007 7:24 pm
Posts: 103
Fantastic, particularly excited about CanvasGadget() - is this inspired by this thread?

Going to do some playing around, looking forward to some docs and examples. Excellent work as always. :D


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 5:28 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3228
Location: New Zealand
thanks, thats quite an update.

_________________
Got winter blues?
Enjoy a Caravan Trip into, "The Land of Grey and Pink", wine and punk weed optional!
https://www.youtube.com/watch?v=D5iX9YhCCp8


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 6:11 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Apr 27, 2007 12:38 pm
Posts: 589
Location: Finland
Thank you x1000, great work! I guess I'll port my 3D project to native PureBasic now 8)


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 7:20 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Mar 06, 2006 3:53 pm
Posts: 562
Location: Austria
Thanks a lot!

Edit: the new Webgadget on Linux works like a charm out of the box on Linux Mint 10/Julia! Great!

_________________
cheers,

bembulak


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 10:31 am 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
Thanks! 8)

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 12:51 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu May 06, 2010 10:16 am
Posts: 485
Location: Belgium
Thanks,

it is great, the update to ogre 1.7.0

Good work...

Marc

_________________
Greetings from Pajottenland - Belgium
PS: sorry for my english I speak flemish ...
www.marc-systems.be


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic 4.60 Beta 1 released! (for real)
PostPosted: Mon Apr 04, 2011 1:20 pm 
Offline
Always Here
Always Here

Joined: Mon Sep 22, 2003 6:45 pm
Posts: 7389
Location: Norway
I'm looking forward to trying the canvas. And what is the difference between ODE and Bullet?


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: Yahoo [Bot] and 6 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