News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

IDE Questions

Started by kevin, August 19, 2006, 04:55:30 PM

Previous topic - Next topic

kevin




PlayBASIC IDE Questions
 updated: 13th,Aug,2012

This FAQ might be out of date, always check the home page versions for the most up to date editions





Q. What is the PlayBASIC IDE ?


      A.   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.




Q. What does IDE stand for ?


  A.   IDE is an acronym for Integrated Development Environment.   It's a fancy way of saying code editor in programmer speak.




Q. Is there a kick starter tutorial for the PlayBASIC IDE ?


  A.   Yeah, check out the PlayBASIC IDE - Getting Started Tutorial: article.





Q. How do I load and run any of the PlayBASIC examples ?


  A.  Check out this video





Q. How do I run cut'n'pasted example code from the forums/help PlayBASIC IDE ?


  A.  Check out this video





Q. How do I get HELP on a command or key word in a source code IDE ?


  A.  You can get context based help on most keywords used in PLayBASIC programs by position the edit cursor over the keyword then pressing F1







Q. 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.





Q. 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.  





Q. 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.





Q. 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.  



   

Q. 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.





Q. My toolbar Icon/buttons are gone?


         Answer:   This tents to occur after the IDE has crashed for some 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.  





Q. How do I include .wav files in my PB  'stand-alone-exe'?


    A. 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.





Q. 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.


   A. 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 evolution 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 users will get a failure message.





Q. 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?


   A.  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.





Q. In Project scroll-down, what's the difference between deploy and compile?


   A.  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.





Q Each time I run a game in PB, does it automatically create a new exe?


   A.  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.
 




Q. In `Manage Media Files` I notice that there are .PBP, .PBA and PBR files. What is the difference between the them ?


  A.   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).




Known IDE Quirks ?





Q.  Sometimes when I run my program the PlayBASIC Window appears behind the IDE ?


      A.   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.    

         


Q.  Is the PlayBASIC V1.64 IDE still being supported ?


      A.   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 see 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 in mind.