Discussions

SmileBASIC Community

debugþTheRealJoeCool

06/15/2016 7:38 PM ·Spoilers

Open Closed

Tips on Coding?

I am having trouble figuring out how to code. Can you help me?

Advertisement

Comment

This post has no comments.

  • I suggest you start by reading through the official e-manual. You can find it here... http://smilebasic.com/en/e-manual/10.php After reading it, I suggest just messing around with code, mastering every command through experimentation! If you need help with anything, you can ask away!

    Yeahs0
    Played
  • OK. Thank you kindly, Oscar!

    Yeahs0
    Played
  • How do you load a sprite onto a screen?

    Yeahs0
    Played
  • There are a lot of commands that are used to manipulate sprites. All of them start with SP, and probably the most basic is SPSET. This command creates a sprite by giving it a management number and a definition number. The management number serves as the sprite's unique ID, and you use this ID with most other SP commands.

    Yeahs0
    Played
  • The definition number is basically the sprite itself. You can check all default definition numbers in the Smile Tool by pressing the SPDEF button. The syntax for SPSET is the following... SPDEF [Management #],[Definition #] After running this, you should see the sprite in the upper left corner of the screen.

    Yeahs0
    Played
  • You can change where the sprite is located with SPOFS. It uses the following syntax... SPOFS [Management #],[X Coordinate],[Y coordinate] There are a bunch of other instructions that deal with sprites, (most will start with SP, as I've mentioned before) but I'll leave you to explore them on your own. Feel free to ask about anything, still!

    Yeahs0
    Played
  • Here's an example of placing a sprite of a piece of meat (definition number 16) near the center of the screen: SPSET 0,16 'WE LEAVE 0 AS THE MANAGEMENT NUMBER SPOFS 0,200,120 'WE SPECIFY THE SPRITE'S MANAGEMENT NUMBER, AND THE COORDINATE (200,120), WHICH IS NEAR THE CENTER OF THE SCREEN If you want to have multiple sprites, just use the SPDEF command various times with different management #s.

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-BXN-3HKP-GFN-PFFZ

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: