Skip to content
star4droid edited this page Jan 12, 2025 · 1 revision

Welcome to the Star2D Wiki!

Welcome to the Star2D wiki! If you're new here, don't worry about where to start – we've got you covered! In this tutorial, we'll be walking you through the process of creating your first game using Star2D. It will be a simple project where we'll create a box and make it fall. Let's get started!


Step 1: Setting Up Your Project

After creating a new project and opening it, you will see a screen similar to this:

Project Initial Screen


Step 2: Open File Manager

To add some assets to your project, click the file icon (located next to the save icon) in the top right corner of the editor. This will open the File Manager:

File Manager Button


Step 3: Adding Images to Your Project

Click the + icon to add images to your project:

Add Image Icon

Now, select the images you want to use and add them to the project:

Select Image


Step 4: Create the BoxBody

Once the assets are added, return to the Editor. On the top-left side, click the + icon. A menu like this will appear:

Create BoxBody

Select the BoxBody option. You can scale it by clicking the scale icon at the bottom, adjusting the size to fit your needs. Then, click the move icon to switch to move mode and position the box in the center of the screen.


Step 5: Adjust Box Appearance

Click the left-center icon to open the left panel.

Open Left Panel

In the panel, navigate to Properties, then select the Appearance section. Here, change the image of the box by clicking on the Image property:

Select Image Property

A dialog will appear. Choose the image you'd like to assign to the box:

Select Image Dialog


Step 6: Add Events

Now, go to the Events section and select onclick. This will allow us to trigger an event when the box is clicked.

Select OnClick Event

Add the following blocks to show message when the box clicked:

Add Blocks


Step 7: Save Your Work

Don't forget to save your project! Click the Save button to ensure all your changes are stored:

Important: Always click Save before running your game.


Step 8: Run the Game

Finally, return to the editor and click the play icon (▶️) to run your game. The box should fall, and when you click on it, a message will appear.


Conclusion

That's it for now! You've just created a simple falling box in Star2D. Want to learn more? Check out our YouTube channel, Star2Droid for more tutorials and advanced tips!

Thanks for reading! If something wasn’t clear, feel free to reach out. Enjoy creating with Star2D!