Have a question about PlayBasic ? - Well you've come to right place then. Here you'll find all of the most commonly asked questions, categorized for your convenience.
FAQ: IDE Questions Revision: V0.10 - Last Updated: March 3rd, 2013
Section:GENERAL IDE QUESTIONS
Question: What is the PlayBasic IDE ?
Answer:It's the main document editor in PlayBasic programming language. The editor works much the same as a word processor or text editor for example, the only difference is that we enter program code rather than write letters/articles.
Question: What does IDE stand for ?
Answer:IDE is an acronym for Integrated Development Environment. It's a fancy way of saying code editor in programmer speak.
Question: Is there a kick starter tutorial for the PlayBasic IDE ?
Question: How do I include existing lib modules (slib folder)?
Answer:Slib's are standard include libraries. Use the #include directive at the start of your project to embed any required library into your program ready for use.
Question: How do I open #include files in a project ?
Answer:You load the included source into the IDE by first clicking file name, then clicking the right mouse button. This will show the right click menu. To open the file the cursor is currently sitting on, choose Open File At Cursor which should be the second option. This will temporarily load the source file into your project, any modifications you make to source are permanent though. So some care is needed, especially of you're messing with libraries that come with PlayBasic.
Question: How can I configure screen res and colour depth for my app?
Answer:The recommended way to initialize your applications default screen settings is via the projects properties. To choose a default screen mode from your program, select Project -> Settings from the IDE's main menu. The project settings window should now appear, next select the 'Screen' tab for screen mode preferences.
It's highly recommended to start your programs in a windowed mode! Let the user choose if they wish to run the program in full screen exclusive mode or not. The reason for this is that if you hard code your game to start in a particular full screen screen mode and the person trying to play your games computer doesn't have this screen mode. Then the program will most likely fail to execute.
Question:How do I setup a project with multiple source files? What are the advantages?
Answer:You can add new source files to your project through the project menu. To do so, select Project / Manage Project. The Manage Project window will now appear. From here you can create New sources, Add (import) existing source files into your current project.
Advantages - For smaller programs, it's really personal preference. But as your programs get larger, splitting your code into various smaller, more manageable files can really aid your development process.
One approach might be to split your project up into related modules/libraries of code. Where each module has a common theme. For example, all the code/functions used handle the Player, might be stored in the Player source. Then we might do the same for the Aliens, bullets etc, down to any specialty sprite handlers / images functions / animations / maps etc etc. This can help us navigate around big programs much easier.
To extend of this design further, you might start building re-usable modules of code. Where the modules can be used in various types of games. This approach can save you a lot of time and effort and avoids re-inventing the wheel for each game you make! So the more programs you develop, the more modules/tidbits you'll to have drawn from. So when starting a new project, you might simply import some 'standard' helper modules to kick your off your new project. The 'Slib's that come with PlayBasic are an example of this.
Question:How do I Hide included source files from my project ?
Answer:You can hide any source file from your project by closing the page. Either, Right click the page with wish to close or press CTRL-F4. This will hide the page, but it will not remove the source code from your project.
Question:My toolbar Icon/buttons have vanished ?
Answer:This seems to occur after the IDE has crashed for some unknown reason. To restore them, delete the editor.ini file from your PlayBasic installation folder. Which can normally be found at C:\My Programs\PlayBasic\.
The most common cause of this tends to be Automatic Case Correction. We recommend disabling this feature at this point. To do so, select Extras / Preference from the menu. The preference window will appear, then select 'Editor' tab for editor preferences. To disable Automatic case correction. unpick 'Live Case Correction' as well theApply before and after options.
Question:How do I include .wav files in my PB 'stand-alone-exe'?
Answer:This can not be supported at this time due to how the music engine in PlayBasic works. It requires the files be loaded from disc, not memory.
Question:When I look at my gfx & sound files through the 'project manager' it offers to copy and register my gfx/sound files or any file. If I register it, who am I registering it to and why?
Answer:Registered files are handled like source files, ie. when you move the project to a different folder, registered files will be copied to that new folder as well. The Deploy command in the Projects menu will copy registered files to the specified directory.
Question:In Project scroll-down, what's the difference between deploy and compile?
Answer:Compile sends the project source code to the compiler for execution while your working on your project Deploy is used when you wish to build your final release.
Question:Q Each time I run a game in PB, does it automatically create a new exe?
Answer:No, it's slow and unnecessary. What happens is the IDE bundles up your programs source code and then sends it to the compiler. The compiler, then assembles the code/data structures and runs them your program directly from memory.
Question:In `Manage Media Files` I notice that there are .PBP, .PBA and PBR files. What is the difference between the them ?
Answer:PlayBasic projects consists of at least three files. One project file (.PBP), one or more source files (.PBA) and one resource files (*.pbr).
Quote:
The project file (*.PBP) contains all project details, ie the internal source files are used for the project, the name of the author etc.
The source files (*.PBA) contain the actual program code. Each project can manage up to 127 internal source files and 127 external source files.
Then icon, version Information and splash screen are stored in the resource file (*.PBR).
Section:KNOWN IDE QUIRKS ?
Question: Sometimes when I run my program the PlayBasic Window appears behind the IDE ?
Answer:This can happen and is one of those quirks we';ve found that generally occurs due to some secondary source, such as Virus Checkers. While it doesn't actually occur on my test machines. I personally prefer, the IDE to minimize when I run my PlayBasic program. To enable this, go to IDE MENU Extra -> Preferences under the General Tab, you'll find a section called "Windows Options" . Tick the Minimize IDE On Run option.
Question:How come when I push the 'help' button and then scroll to 'about' it still asks me if I want to purchase PlayBasic? I already bought it.
Answer:The IDE (the code editor) currently has no way of knowing if the compiler has been registered or not. So therefore it can't modify the dialog accordingly.
If you've somehow forgotten that you bought PlayBasic or have any doubts which version is installed after updating. There's a couple of way to check if you have a Retail Version or the Demo.
* Demo editions of PlayBasic display a full screen PlayBasic logo with evaluation period prior to executing any example. You can't miss it !
* Press F4 (compile to exe). This feature is only available in the full retail version. Demo/Learning Edition users will get a failure message.
Question:Is the PlayBasic V1.64 IDE still being supported ?
Answer:No, all development of the classic PlayBasic V1.64 IDE has ceased.
We're been working on replacement IDE in-house for a while now. You can find some of the Alpha work in progresses here - There's a few prototypes available in the maintenance forums which support PlayBasic V1.xx revisions, but it's actually being designed more with PlayBasic 2.xx revisions (also known as PlayBasicFX) in mind.
Can't find the answer to your question in the FAQ ? - Then make sure you sign up on our PlayBasic Forums and ask!