New to programming and need some help getting started ? - Well, then our tutorial section will help kick start your programming adventure.
If you're looking for more Source Code / Tutorials & Media ? - Then remember to visit the PlayBasic Resource board on our forums.
This question came in recently.. So here's a quick response on the subject. You can find more on the PlayBasic Help files (online link bellow)
What are ">=, >, <, <=, == , !=" all these and why would they need to get used?"
Most of those are comparison operators. So we use them to compare the terms on either side of the operator.
>= compare if the LEFT term is Bigger than or equal to the RIGHT term
<= compare if the LEFT term is Less than or equal to the RIGHT term
> compare if the LEFT term is Bigger than the RIGHT term
< compare if the LEFT term is Less than the RIGHT term
== compare if the LEFT term is equal to the RIGHT term
!= compare if the LEFT term is NOT EQUAL to the RIGHT term
So in regards to why we would use them; well whenever we need to check if two terms are numerically the same (Equal too) or similar or even not equal we can use the appropriate operator to do the comparison for us which will then return a boolean result of TRUE(1) or FALSE(0).. back to us.
Hi welcome to our Intro to PlayBasic Functions tutorial. In this tutorial we start out with some revision of Gosub / Return statements, which are used to create a simple sub routine. Sub routines are changes in program flow, allowing the programmer to execute a chunk of code that's external to the section they may be writing, then upon completion the control returns to the caller. This is the same basic model that functions introduction to our programming, except functions are more formalized. Meaning they have some strict rules about syntax and intro a new concepts such as scope changes, which sub routines don't have.
The types of functions shown in video are very simple, initially we start by taking a sub routine that prints rows of text and convert that to function. Through this process we encounter our first problem which is variable scope and look at ways to solve it, such as making our variable global, or better yet passing a variable into the function as a parameter . Later in the video, we create our own custom distance function, as well building a function that does some simple string manipulation
NOTE: This video was recorded alive with only a few changes for length..
This tutorial picks up where the previous variables to arrays tutorial left off, in that it takes the array code, demos that code then we set about converting the parallel array approach shown in the previous tutorial and we build a structure (TYPE) to hold each characters properties. Once the type has been defined that includes all the required properties, we then define a typed array that will house the collection of characters. Later in the video take a look at using typed lists also. So if your struggling with types this could be a good place to start.
This video takes the new PlayBasic programmer through a couple of examples that demo how to save a new project and create a new project folder using the PlayBasic IDE (Source Code editor) -
1) In example one we write th classic Hello World example and then show how to save it as a project to the desktop
2) In the second example we take this further by adding some sprite media to the project manually then demo how you might load the sprites and display them.
Welcome PlayBasic programmers, in this tutorial we're going to introduce the concept of arrays starting out from variables. So first we build a simple game loop that controls two characters using only variables. The characters are represented on screen as filled circles.
After we get up to speed with the variable version we then move onto how we can use parallel integer arrays to store the various properties of the characters. The array version can control as many or as few characters as you like, which is the benefit of Arrays over Variables
This tutorial takes the new basic coder through the bare bones of the FOR / NEXT loop. The tutorial was recorded live and is uploaded virtually as is, warts and all. In this tutorial we use loops to draw simple graphical objects such as boxes moving through to making a grid of scrolling boxes.
Commands used in this tutorial. For / Next / Step / Exit / Continue / Print / Line / Box / Sync / Ink / RGB() / RND() / RndRGB() and possibly a few others.
PlayBasic TUTORIAL: Getting Started with the PlayBasic IDE
PlayBasic Tutorial: Intro To Integer Variables & Character Movement
This tutorials starts out with a brief look Intro To Integer Variables, but soon moves on looking at some really basic user controlled/player movement code.
The commands you'll see in this tutorial are Print, Sync, WaitKey, Do / Loop, SetFps, Circle and If/EndIF