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!

DEFINE STRING SPACE 512 DEFINE STRING COUNT 64 DEFINE TASK COUNT 2 TILEMAP ENABLE(16) COLOR BORDER WHITE CLS WHITE GLOBAL soundtrack PROCEDURE sountrackLoad ON VIC20 soundtrack := LOAD MUSIC("what_a_wonderful_world.mid") MUSIC soundtrack END PROC PARALLEL PROCEDURE rotatingEarth ON VIC20 earth := LOAD IMAGES("earth_128x128_2colors.gif") FRAME SIZE AUTO POSITIVE CONST centerX = ( SCREEN WIDTH - 128 ) \ #2 POSITIVE CONST frameMax = FRAMES(earth) - 1 DIM frame AS BYTE DIM t AS WORD DIM delay AS WORD t = TIMER delay = ( TICKS PER SECOND / 5 ) DO WAIT WHILE ( TIMER - t ) < delay t = TIMER PUT IMAGE earth FRAME frame AT centerX, 0 ADD frame, 1, 0 TO frameMax LOOP END PROC PARALLEL PROCEDURE printLyrics ON VIC20 DIM line AS BYTE DIM t AS WORD DIM delay AS WORD t = TIMER delay = 2 * TICKS PER SECOND DO WAIT WHILE ( TIMER - t ) < delay t = TIMER LOCATE 0, SCREEN ROWS - 2 CLINE LOCATE 0, SCREEN ROWS - 3 CLINE INK RED SELECT CASE line CASE 0 CENTER "I see trees of green"; CASE 1 CENTER "Red roses too"; CASE 2 CENTER "I see them bloom"; CASE 3 CENTER "For me and you"; CASE 4 CENTER "And I think to myself"; CASE 5 CENTER "What a wonderful world!"; CASE 7 CENTER "I see skies of blue"; CASE 8 CENTER "And clouds of white"; CASE 9 CENTER "The bright blessed day"; CASE 10 CENTER "The dark sacred night"; CASE 11 CENTER "And I think to myself"; CASE 12 CENTER "What a wonderful world"; CASE 13 CENTER "The colors of the rainbow"; CASE 14 CENTER "So pretty in the sky"; CASE 15 CENTER "Are also on the faces"; CASE 16 CENTER "Of people going by"; CASE 17 CENTER "I see friends shaking hands"; CASE 18 CENTER "Saying, How do you do?"; CASE 19 CENTER "They're really saying"; CASE 20 CENTER "I love you..."; CASE 21 CENTER "I hear babies cry"; CASE 22 CENTER "I watch them grow"; CASE 23 CENTER "They'll learn much more"; CASE 24 CENTER "Than I'll ever know"; CASE 26 CENTER "And I think to myself"; CASE 27 CENTER "What a wonderful world"; CASE 28 CENTER "Yes, I think to myself"; CASE 30 CENTER "What a wonderful world"; CASE 32 CENTER "Ooh, yes..."; ENDSELECT INC line LOOP END PROC sountrackLoad[] ON VIC20 SPAWN rotatingEarth ON VIC20 SPAWN printLyrics ON VIC20

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.