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.
Found #4 items in Arrays category by Kevin Picone
PlayBasic Tutorial: From Arrays To Types (Intro To Types)
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.
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 introduces a concept of managing the life cycles of a many characters within our game. If we think about it, the characters in our games will generally have three main life states. They're Born, they live out their purpose and ultimately they die.
So in this tutorial we're going to use a Typed Array to hold handle various game characters. The initially version starts out simple, and shows how we can presents characters in typed arrays, with each revision we progress the code until we've create create a frame work that can allow us to manage the life cycles of as many characters as need be.
Learn basic game programming in this 10 part tutorial series for beginners. This series covers everything from Variables, Arrays, Program Structure, Loops, Functions through to various articles on game timing and logic.