Blog: Start Programming with the D2Soft Engine

2024-08-20

In the tutorial Hot Air Balloon, we go over a simple program written using the D2Soft Engine. With 8 lines of code, it accomplishes different tasks like animated images, music and scrolling background. This script is written in a BASIC-like programming language and is displayed in an HTML5 player. It runs in any web browser.

You can try the demo here: https://www.d2soft.com/Run/Lev/63478e044d

Source code: https://www.d2soft.com/Doc/Tutorials/Hot-Air-Balloon

For a complete look at the source code, watch this video:



When you try the demo, notice that the player loads the program quickly. The scripting language is converted to JavaScript. All the complexity of loading assets and animating content is taken care by the engine.

In the code, we declare two variables of type image. The BGIMAGE command displays the scrolling background, by using the image asset named "bg_clouds". Take note that the player has a squared resolution of 640x640 pixels.

Some music is then started. Then, the first image "airballoon" is assigned to a variable. The next two lines set some animations on this image to move the balloon on screen.

Finally, the "sun" image is loaded and animated.

This simple script demonstrates how to get started using our engine.


Go back to list of Blogs.