Type your ugBASIC program here (remember: keywords like PRINT must be UPPERCASE!).
Click on Build menu to select the target: you will download the compiled binary file!

CONST width = 16 CONST height = 16 DIM timeLimit AS INTEGER timeLimit = (TICKS PER SECOND) * 10 BITMAP ENABLE (16) COLOR BORDER BLACK CLS BLACK VAR counter AS WORD = 0 LOCATE 0,0 PEN WHITE PRINT "TESTING ON ";PEN(YELLOW);SCREEN WIDTH;"x";SCREEN HEIGHT;"x";SCREEN COLORS;PEN(WHITE) PRINT " FRAME : ";PEN(YELLOW);width;"x";height;PEN(WHITE) PRINT " DUR. : ";PEN(YELLOW);(timeLimit / (TICKS PER SECOND));" secs";PEN(WHITE) PRINT background := NEW IMAGE(#width, #height) TIMER = 0 DO GET IMAGE background FROM 0, 0 PUT IMAGE background AT 0, 0 INC counter EXIT IF TIMER > timeLimit LOOP PRINT "DONE" PRINT DIM fps AS FLOAT, frames AS FLOAT, time AS FLOAT DIM pxs AS FLOAT, pixels AS FLOAT px = 32 * 32 frames = counter time = 10 pixels = px * frames PRINT PEN(WHITE);" FRAMES : "; frames PRINT PEN(WHITE);" PIXELS : "; pixels PRINT PEN(WHITE);" FRAMES/S : "; PEN(YELLOW); INT( frames / time )

Welcome to the ugBASIC sandbox!

This tool was designed to quickly test whether the code you are writing compiles correctly and determines the desired results. Since the source is compiled thanks to dedicated servers, separate from the browser you are using, some commands are not available: for example, you cannot load external files or resources by using the LOAD command. If you need to develop a program with a complete tool, we recommend installing the executables or the UGBASIC-IDE.

Unless required by applicable law or agreed to in writing, this website is given on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.