News:

Function Finder  Find all the functions within source code files

Main Menu

PlayBASIC Command Listing

Started by Berbalang, April 03, 2006, 07:20:15 AM

Previous topic - Next topic

Berbalang

Hi,

I'm looking for a complete list of all the available PlayBasic commands. Does anyone know where I can get this. Also, what is the easiest way to learn PlayBasic?

Many thanks.

Berbalang


Learning PlayBASIC ? Then check out :  

  * PlayBASIC Tutorials
  * PlayBASIC Source Code Examples


kevin

#1
What sort of list do you want ?

The command names ?

The command names with parameters ?



Commands (no parameters)


[Directives]
#Abort
#Warn
#Trace
#Break
#Print
#Cls
#IF
#IFDEF
#IFNDEF
#THEN
#ELSE
#ENDIF

[Commands]
BytePtr
WordPtr
IntPtr
FloatPtr
Int
Float
Rnd
Rnd#
RndRange
RndRange#
Randomize
Neg
Sqrt
Abs
Exp
RoundUp
RoundDown
Mod
WrapAngle
CurveAngle
CurveValue
Range
ClipRange
ClipRange#
GetAngle2D
MidPoint
Log
Log10
MinVal
MinVal#
MaxVal
MaxVal#
Sin
Cos
SinRadius
CosRadius
SinNewValue
CosNewValue
Tan
ASin
ACos
ATan
ATanFull
SinH
CosH
TanH
RadToDegree
DegreeToRad
LSL32
LSL16
LSL8
LSR32
LSR16
LSR8
ROL32
ROL16
ROL8
ROR32
ROR16
ROR8
Move16
Move8
NotInt
GetSign
Odd
Even
SwapByteOrder
SwapWordOrder
SwapLowBytes
SetBit
ClearBit
SwapBit
TestBit
ReadBits
CopyBits
CurrentDate$
CurrentDay$
CurrentMonth$
CurrentYear$
CurrentTime$
CurrentHour
CurrentMinute
CurrentSecond
Len
Mid$
Mid
Left$
Right$
CutLeft$
CutRight$
Trim$
TrimLeft$
TrimRight$
Lower$
Upper$
AutoCaps$
Chr$
Bin$
Hex$
Asc
Val
Str$
Replace$
InString
Make$
Pad$
Flip$
Insert$
Digits$
ReadData
ReadData#
ReadData$
Data
Restore
GetDataPointer
GetDataQuantity
GetDataType
FindData
And
Or
Xor
Not
Dim
ReDim
MakeArray
DeleteArray
SetArray
GetArray
CopyArray
CopyArrayCells
SortArray
SwapArray
MoveArray
ClearArray
ClearArrayCells
FindArrayCell
SearchLowestArrayCell
SearchHighestArrayCell
UnDim
UnDimALL
GetArrayStatus
GetArrayDimensions
GetArrayElements
GetArrayElementIndex
SplitToArray
Inkey$
ScanCode
KeyState
LeftKey
RightKey
UpKey
DownKey
SpaceKey
EnterKey
EscKey
ShiftKeys
WindowsKeys
CtrlKeys
AltKeys
FunctionKeys
WaitKey
WaitNoKey
BreakKey
GetBreakKey
SetMouse
SetMouseX
SetMouseY
Mouse
MouseX
MouseY
MouseZ
MouseMoveX
MouseMoveY
MouseMoveZ
FlushMouse
FlushKeys
MouseButton
LeftMouseButton
MidMouseButton
RightMouseButton
WaitMouse
WaitAllInput
WaitNoInput
CirclesIntersect
PointIntersectCircle
LineIntersectCircle
LineIntersectRect
LinesIntersect
RayIntersectWorld
GetDistance2D
GetDistance3D
PointInBox
MouseInBox
GetIntersectX#
GetIntersectY#
GetIntersectObject
GetNormalX#
GetNormalY#
Sync
Print
Text
CenterText
SetCursor
SetCursorX
SetCursorY
GetCursorX
GetCursorY
CursorLineFeed
GetCursorLineFeed
CursorMargin
GetCursorMargin
Cls
Ink
GetInk
GetInkR
GetInkG
GetInkB
InkMode
GetInkMode
InkAlpha
GetInkAlpha
RGB
RndRGB
RgbR
RgbG
RgbB
RGB24ToRGB16
RGB16ToRGB24
RGBFade
RgbGreyScale
RgbAlphaBlend
FastDot
Dot
DotC
FastPoint
Point
Line
LineC
Box
BoxC
ShadeBox
Circle
CircleC
Ellipse
EllipseC
Tri
TriC
Quad
QuadC
GouraudTri
GouraudQuad
GouraudStripH
GouraudStripV
TextureStripH
TextureStripV
TextureTri
TextureQuad
CopyRect
CopyStripV
CopyStripH
LoadFont
LoadNewFont
DeleteFont
SetFont
CreateBitmapFont
NewBitmapFont
MakeBitmapFont
MakeShadowBitmapFont
BlendBitmapFont
FindFont
FontMaskColour
GetFreeFont
GetFontQuantity
GetCurrentFont
GetFontName$
GetFontStatus
GetFontType
GetFontSize
GetFontWidth
GetFontHeight
GetFontStyle
GetFontMaskColour
GetTextWidth
GetTextHeight
FontChrWidth
GetFontChrWidth
DrawFontChr
GetFontChr
OpenScreen
CloseScreen
SwapScreen
ScreenVsync
ScreenViewPort
TitleScreen
CenterScreen
PositionScreen
GetScreenClose
GetScreenType
GetScreenXpos
GetScreenYpos
GetScreenWidth
GetScreenHeight
GetScreenDepth
GetScreenTitle$
GetScreenVsync
GetScreenHandle
GetDesktopWidth
GetDesktopHeight
ScreenModeExist
CreateCamera
NewCamera
DeleteCamera
DeleteAllCameras
LimitCamera
LimitCameraBounds
CameraViewPort
CameraVisible
CameraCls
CameraClsColour
CameraPriority
PositionCamera
PositionCameraX
PositionCameraY
MoveCamera
DrawCamera
DrawAllCameras
ClsScene
CaptureDepth
GetCaptureDepth
CaptureVis
GetCaptureVis
GetFreeCamera
GetCameraQuantity
GetCameraX
GetCameraY
GetCameraWidth
GetCameraHeight
GetCameraCls
GetCameraClsColour
GetCameraLimit
GetCameraLimitX1
GetCameraLimitY1
GetCameraLimitX2
GetCameraLimitY2
GetCameraPriority
GetCameraStatus
GetCameraSurface
GetCameraViewPortX1
GetCameraViewPortY1
GetCameraViewPortX2
GetCameraViewPortY2
GetCameraVisible
PointOverCamera
DrawGFXImmediate
CaptureToScene
CaptureToWorld
SceneCacheSize
GetSceneCacheSize
GetCurrentSceneOffset
CreateWorld
NewWorld
DeleteWorld
CameraGrabWorld
CameraGrabWorldAt
PartitionWorld
GetFreeWorld
GetWorldQuantity
GetWorldStatus
WorldElementVisible
GetWorldElementVisible
GetWorldElements
GetWorldClosestPoint
QueryWorldRegion
RenderToImage
RenderToScreen
LockBuffer
UnLockBuffer
GetSurface
GetSurfaceStatus
GetSurfaceWidth
GetSurfaceHeight
DrawImage
SetBlitImageBuffer
BlitImage
TileImage
GridImage
DrawAlphaImage
DrawRotatedImage
NewImage
CreateImage
CreateFXImage
CreateFXImageEx
GetImage
LoadNewImage
LoadImage
DeleteImage
DeleteImageRange
DeleteAllImages
PrepareFXImage
ImageViewPort
RestoreImageViewPort
ImageMaskColour
ImageShape
ScaleImage
CopyImage
MirrorImage
FadeImage
BlurImage
RGBMaskImage
GrayScaleImage
ScrollImage
LightImage
RenderPhongImage
GetFreeImage
GetImageStatus
GetImageType
GetImageWidth
GetImageHeight
GetImageDepth
GetImageFileName$
GetImageMaskColour
GetImageViewPortX1
GetImageViewPortY1
GetImageViewPortX2
GetImageViewPortY2
GetImageShape
ImageQuantity
GetImageQuantity
NewSprite
CreateSprite
DeleteSprite
DeleteALLSprites
DeleteSpriteRange
CopySprite
DrawSprite
DrawSpriterange
DrawAllSprites
DrawOrderedSprites
CreateSpriteLocals
DeleteSpriteLocals
SpriteLocalByte
SpriteLocalWord
SpriteLocalInt
SpriteLocalFloat
SpriteLocalString
SpriteImage
SpriteHandle
CenterSpriteHandle
AutoCenterSpriteHandle
SpriteDrawMode
SpriteAlphaLevel
SpriteFadeLevel
SpriteVisToCamera
SpriteImageUV
SpriteImageRGB
SpriteImageIntensity
SpriteFlashColour
SpriteAlphaColour
SpriteAlphaAddColour
SpriteAlphaSubColour
SpriteColourReplaceKey
SpriteReplacementColour
SpriteRasterColourBuffer
PositionSprite
PositionSpriteXYZ
PositionSpriteX
PositionSpriteY
PositionSpriteZ
MoveSprite
MoveSpriteX
MoveSpriteY
MoveSpriteZ
RotateSprite
TurnSprite
ScaleSprite
ScaleSpriteXY
ScaleSpriteX
ScaleSpriteY
SpriteParent
SpriteQuantity
SpriteVisible
SpriteTransparent
SpriteCollision
SpriteCollisionClass
SpriteCollisionMode
SpriteCollisionRadius
SpriteCollisionDebug
SpriteCollisionWorld
SpriteInRegion
SpriteInCamera
SpriteHit
SpriteHitWorld
SpritesOverlap
RayHitSprite
PointHitSprite
QuadHitSprite
RectHitSprite
CircleHitSprite
ShapeHitSprite
SpritesInShape
GetFreeSprite
GetFirstSprite
GetNextSprite
GetSpriteStatus
GetSpriteVisible
GetSpriteTransparent
GetSpriteCollision
GetSpriteCollisionClass
GetSpriteCollisionMode
GetSpriteCollisionRadius
GetSpriteCollisionDebug
GetSpriteCollisionWorld
GetSpriteWorldImpact
GetSpriteImpactObject
GetSpriteImage
GetSpriteWidth
GetSpriteHeight
GetSpriteX
GetSpriteY
GetSpriteZ
GetSpriteOldX
GetSpriteOldY
GetSpriteOldZ
GetSpriteVertexX
GetSpriteVertexY
GetSpriteHandleX
GetSpriteHandleY
GetSpriteAngle
GetSpriteScaleX
GetSpriteScaleY
GetSpriteDrawMode
GetSpriteAlphaLevel
GetSpriteFadeLevel
GetSpriteVisToCamera
GetAutoCenterSpriteHandle
ClosestSpriteToPoint
GetSpriteLocalSize
GetSpriteLocalByte
GetSpriteLocalWord
GetSpriteLocalInt
GetSpriteLocalFloat
GetSpriteLocalString
GetSpriteQuantity
NewMap
CreateMap
DeleteMap
DeleteAllMaps
DrawMap
DrawMapBlk
GetMapBlk
CreateMapGFX
LoadMapGFX
MakeMapGFX
PrepareFXMap
MapLevelQuantity
GetMapQuantity
MapAnimQuantity
UpdateMapAnims
ResetMapAnims
CreateMapAnim
ResizeMapAnim
DeleteMapAnim
DeleteAllMapAnims
MapAnimFrameRate
MapAnimCurrentFrameRate
MapAnimType
PokeMapAnim
PeekMapAnim
NewLevel
CreateLevel
DeleteLevel
DeleteAllLevels
ResizeLevel
ClearLevel
FillLevel
CopyLevel
CloneLevel
PasteLevel
PokeLevelTile
PeekLevelTile
GetLevelTile
LevelDrawMode
LevelSolid
LevelTransparent
LevelTransparentTile
LevelAnimated
GetFreeMap
GetFreeMapLevel
GetMapStatus
GetMapLevels
GetMapMaskColour
GetMapBlockStatus
GetMapBlockWidth
GetMapBlockHeight
GetMapBlocks
GetLevelStatus
GetLevelDrawMode
GetLevelWidth
GetLevelHeight
GetLevelABSWidth
GetLevelABSHeight
GetLevelTransparentTile
GetMapAnimStatus
GetMapAnimFrameRate
GetMapAnimCurrentFrameRate
GetMapAnimType
GetMapAnimSize
GetMapAnims
GetFreeMapAnim
CheckMapImpact
GetMapImpactX
GetMapImpactY
GetMapImpactLeft
GetMapImpactRight
GetMapImpactTop
GetMapImpactBot
NewShape
CreateShape
NewConvexShape
CreateConvexShape
DeleteShape
DeleteAllShapes
DrawShape
CopyShape
ResizeShape
MergeShape
ScaleShape
RotateShape
ShiftShape
SetShapeVertex
SetShapeEdge
DeleteShapeEdge
RefreshShape
GetFreeShape
GetShapeStatus
GetShapeVerts
GetShapeEdges
GetShapeVertexX
GetShapeVertexY
GetShapeEdge
GetShapeEdgeStatus
PointHitShape
LineHitShape
CircleHitShape
BoxHitShape
ShapeHitShape
ShapeQuantity
GetShapeQuantity
LoadSound
LoadNewSound
DeleteSound
DeleteAllSounds
PlaySound
PlayDynamicSound
StopSound
PauseSound
ResumeSound
SoundVolume
SoundFreq
SoundPan
LoopSound
SoundMasterVolume
GetSoundMasterVolume
GetFreeSound
GetSoundQuantity
GetSoundStatus
GetSoundVolume
GetSoundPan
GetSoundFreq
GetSoundPlaying
LoadMusic
LoadNewMusic
DeleteMusic
DeleteAllMusics
PlayMusic
StopMusic
PauseMusic
ResumeMusic
MusicVolume
MusicFreq
MusicPan
LoopMusic
GetFreeMusic
GetMusicQuantity
GetMusicStatus
GetMusicVolume
GetMusicPan
GetMusicFreq
GetMusicPlaying
LoadDll
DeleteDll
CallDll
CallDll#
CallDll$
DllCallConv
GetDllCallConv
GetFreeDll
GetDllQuantity
GetDllStatus
GetDllExist
GetDllCallExist
GetDllFileName$
NewBank
CreateBank
DeleteBank
ResizeBank
CopyBank
CopyBankBytes
BankQuantity
GetBankQuantity
GetFreeBank
GetBankStatus
GetBankSize
GetBankPtr
PokeBankByte
PokeBankWord
PokeBankInt
PokeBankFloat
PokeBankString
PeekBankByte
PeekBankWord
PeekBankInt
PeekBankFloat
PeekBankString
OpenFile
ReadFile
WriteFile
CloseFile
GetFreeFile
GetFileQuantity
ReadMemory
WriteMemory
ReadByte
ReadWord
ReadInt
ReadFloat
ReadString$
ReadValue
ReadValue#
ReadChr$
ReadByteAt
ReadWordAt
ReadIntAt
ReadFloatAt
ReadStringAt$
ReadChrAt$
WriteByte
WriteWord
WriteInt
WriteFloat
WriteString
WriteChr
WriteByteAt
WriteWordAt
WriteIntAt
WriteFloatAt
WriteStringAt
WriteChrAt
EndOfFile
FilePos
GetFilePos
GetFileStatus
FileExist
FileSize
FileType
FolderExist
DriveExist
DriveReady
DriveName$
DriveSerial
DriveList$
CD
CurrentDir$
CurrentDrive$
ProgramDir$
SystemDir$
WindowsDir$
TempDir$
CommandLine$
CopyFile
MoveFile
DeleteFile
MakeFile
ExeFile
FindFile$
MakeDir
CopyDir
DeleteDir
DeleteDirTree
FirstFile$
NextFile$
ReadDir
GetDirSize
GetDir$
GetDirFile$
GetDirFolder$
GetDirFileType
GetFileExt$
GetFileName$
GetFolderName$
GetDeviceName$
CpuMMXstate
GfxMMX
GetGfxMMX
PBPeekEngine
PBPokeEngine
PlayBasic$
End
ACReset
ACSet
AC
ForceDeclaration
Declaration
EndDeclaration
Explicit
Wait
Timer
SetFPS
GetFPS
FPS
Rem
RemStart
RemEnd
Let
If
Then
Else
ElseIf
EndIf
Select
EndSelect
Case
Default
ContCase
LinkDll
EndLinkDll
Alias
FastCalc
_FastCalc
Class
EndClass
Module
EndModule
Type
EndType
As
Byte
Word
Integer
String
Pointer
Define
Constant
Public
Private
Global
Static
Local
Function
EndFunction
Exitfunction
Psub
EndPsub
Goto
Gosub
Return
Exit
ExitFor
ExitRepeat
ExitWhile
ExitDo
ExitIF
Continue
Do
Loop
Repeat
Until
While
EndWhile
DecLoop
For
To
Next
Step
Inc
Dec
Swap
SwapIfLower
SwapIfHigher
Push
Pop
Pop#
Pop$
GetArrayPtr
CopyMemory
FillMemory
PeekByte
PeekWord
PeekInt
PeekFloat
PeekString
PokeByte
PokeWord
PokeInt
PokeFloat
PokeString
RotateVertexListToCamera
RotateVertexList
RotateVertexListXYZ
RotateVertexListZYX
TranslateMeshToScene


[Constants]
PlayBasicVersion
True
Yes
On
False
No
Off
PBDebug
PBDebugMode
PBCompileMode
PBTraceState
PI#



Berbalang

Thanks for that Kevin. That's exactly what I was after. PlayBasic certainly has a lot of commands.

Thanks again.

kevin

No dramas.  There's 911 built in commands and probably another 200 odd library functions.

Big C.

#4
Kevin only expressed itself to the first part of your post..  ;)

Therefore I want to say a few words to you to the last part...

unfortunately it lacks good Tutorials, but PB has an amount of examples, that you look you, analyze, modify and before all things should read... Then there is still the very detailed help. Many and important information/examples which help you are also in there. Have a closer look at the point About (I just translate that one and in this case already some light opened me).

Otherwise is valid: try and error... learn.... read... try and error... and so on

And this forum is useful. Asks questions, make check your code through the users etc etc.

I think, everyone gives you a helping hand...

so long

Big C.

Tracy

#5
Berbalang,

In my opinion, the easiest way to learn PB is to start with looking around in the 'examples' folder to see what it's capable of. There are a few really handy basic games in there (bathsteroids, for example), and while the constant updating of the PB language has made some of the programming in them buggy, with a few minor adjustments they're REALLY useful to pick apart and learn from. When you come across a command you don't understand, use the 'help' menus to learn what you can. If you still have questions, ask in this forum.

(Sidenote: I think you have to make two small adjustments to the bathsteroids code for it to run: the major one is that everytime there's a rnd(xxxxxxxxx) command, where xxxxxxxxx is a variable, you need to change it to rnd(xxxxxxxxx+1) so you don't pass a zero into the function. It used to be possible, but now isn't. (Unless that's been changed yet again.) The second is simply adding a pair of brackets, '(),' to the end of a command line. Fix the rnd errors, run it, and the compiler will tell you where that particular error is.)

When you find something you like, play with the code until you understand it better, and then go find something else to tinker with. Think about what you want PB to do for you (do you have a particular type of game you want to make?) and try to see what it'll take to make it happen. Then, after you understand a particular example, implement it into your code and keep going.

It's a little slower than I expected it to be at first, but after a few weeks you'll be suprised at what you can do with it.

Lastly, don't be afraid to post those 'Why-doesn't-this-work-I-have-no-idea-what's-going-on' posts on the board. Sometimes it takes someone else looking at your code to catch what you missed. Especially at the beginning, it's often easy for others to catch basic mistakes and help you out without much trouble on their part. And that can save a lot of stress when you've tried and tried to debug something and it still won't work right.

In short, what I'm trying to say is "Just do it." Good luck, and have fun.

-Tracy

kevin

A couple of clarifications :)

QuoteThere are a few really handy basic games in there (bathsteroids, for example), and while the constant updating of the PB language has made some of the programming in them buggy, with a few minor adjustments they're REALLY useful to pick apart and learn from.

  This is only the case, when using use a newer patch than the old example sets.  With each release the included examples are updated to suit.  Which is why building a release takes so long.

Quote(Sidenote: I think you have to make two small adjustments to the bathsteroids code for it to run: the major one is that everytime there's a rnd(xxxxxxxxx) command, where xxxxxxxxx is a variable, you need to change it to rnd(xxxxxxxxx+1) so you don't pass a zero into the function. It used to be possible, but now isn't. (Unless that's been changed yet again.) The second is simply adding a pair of brackets, '(),' to the end of a command line. Fix the rnd errors, run it, and the compiler will tell you where that particular error is.)

 The  Rnd() zero bug, was fixed in the update after it was noticed.  


QuoteIt's a little slower than I expected it to be at first, but after a few weeks you'll be suprised at what you can do with it.

 It's not lightning quick ATM.   So It's important that users make the best use of built in functionality where they can.

Tracy

QuoteIt's not lightning quick ATM.   So It's important that users make the best use of built in functionality where they can.

Now my own clarification: I was talking about the learning curve, not the actual horsepower of the language. I've had no problems with execution speed. (Except when I was doing something the really, really hard way.)

(And thanks for the corrections, Kevin.)

Cheers.