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!

' We suggest the use the most coloured ' resolution (up to 16 colors). BITMAP ENABLE(16) ' We clear the graphical screen. CLS ' Put the color border to BLACK (if border is preset) COLOR BORDER BLACK ' Load from the host the (degrated quality of the) image ' of the opening titles of the videogame. ' ' Note that the original image has been converted to ' match at best each target, and moved the result into ' each folder with the same target name. In particular: ' ' atari / atarixl : 160x96 pixel, 4 colors ' c128 : 160x200 pixel, 16 colors ' c128z : 320x200 pixel, 2 colors ' c64 : 160x200 pixel, 16 colors ' coco : 128x192 pixel, 4 colors[edited] ' coco3 : 320x200 pixel, 16 colors ' coleco : 256x160 pixel, 16 colors ' cpc : 160x200 pixel, 16 colors ' d32 : 128x192 pixel, 4 colors[edited] ' d64 : 128x192 pixel, 4 colors[edited] ' msx1 : 256x160 pixel, 16 colors ' sc3000 : 256x160 pixel, 16 colors ' sg1000 : 256x160 pixel, 16 colors ' vic20 : 176x184 pixel, 8 colors ' zx : 256x192 pixel, 8 colors image := LOAD IMAGE("bladerunner.png") ' Now, we calculate the offset to center the image ' in the respect of the effective resolution chosen by ' ugBASIC. CONST cx = ( SCREEN WIDTH - IMAGE WIDTH(image) ) / 2 CONST cy = ( SCREEN HEIGHT - IMAGE HEIGHT(image) ) / 2 ' Finally, we draw the image at the center of the screen. PUT IMAGE image AT cx,cy

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.