loading

Hello, today I'm going to show you how to make a game from scratch for DSi/DSi XL/3DS/3DS XL/2DS.

You may ask, "How do you do that? Do you need Homebrew?". Well, you don't. And, it's quite simple.

All you need is:

  • A DSi/DSi XL/3DS/3DS XL/2DS
  • A copy of Petit Computer downloaded on your system*
  • A little time**

*Petit Computer has been removed from the 3DS eshop. It is however on the DSi Shop.

**The required amount of time depends on how complex the game is and how much debugging it needs to be complete.

Step 1: A Simple Code to Get You Started

Now, after you have downloaded your game, go ahead and open it. Once you've opened it, tap "Write Program". At the bottom of the screen, there should be a button saying "EDIT". Tap that button. Now type the following.

@START

CLS

PRINT "Press A to make noise"

IF BTRIG()==16 THEN BEEP 3

WAIT 1

GOTO@START

You're probably wondering what all that is. So I'll explain. The @START is just a place where it loops back to so it doesn't just execute a little bit of code and then stop. CLS means Clear Screen. When it says PRINT "Press A to make noise" that means it will say exactly what it says in the quotation marks. IF BTRIG()==16 THEN BEEP 3 means that when you press A(16 = The A button) then it will make a little beeping noise(BEEP 3).

The WAIT 1 keeps it from "glitching out". GOTO@START means pretty much what it sounds like. It loops it back to The top of the code so it doesn't stop.

Step 2: Let's Get to the Game!

Alright, the moment you've been waiting for! The code for the game! Here's the code:

X=15

Y=11

@STARTUP

CLS

PRINT " My First Game in PTC"

PRINT "Press START to begin"

IF BTRIG()==1024 THEN GOTO@GAME

WAIT 1

GOTO@STARTUP

@GAME

CLS

LOCATE X,Y

PRINT "0" 'Side note: You can change the text inside the quotes to something different.

IF BUTTON()==1 THEN Y=Y-1

IF BUTTON()==2 THEN Y=Y+1

IF BUTTON()==4 THEN X=X-1

IF BUTTON()==8 THEN X=X+1

WAIT 4

GOTO@GAME

There are the basics for ya'! I know it's sort of lame, but I had to keep it simple. So where it says X=15 and Y=11, those mean that the letter(X and Y) are the same as the numbers assigned. These are called Integers. Under @GAME, where it says LOCATE X,Y means that it prints the text in a specific area on the screen. The X is side to side. The Y is up and down. All the IF BUTTON()==__ THEN _=_ (+ or -) 1 means that when you press the buttons, X or Y becomes greater or smaller. This is what moves the text. It moves it by changing the location "one at a time".

If you want to experiment with what the numbers the buttons are assigned to then use this simple code:

@LOOP

CLS

PRINT BUTTON()

WAIT 1

GOTO@LOOP

Notice that BUTTON() doesn't have any quotation marks around it.

Step 3: Debedebedebedebe, That's All Folks!

You heard him, That's all Folks! Be looking for another 'ible made by me! Yep, you guessed it, part two. The next one I'm going to be making is going to be more in depth than this one, and show you how to use sprites and more!

Please comment if you have troubles of any sort, or, if you just liked it!

They removed Petit Computer from the eshop? But why?
<p>I wish I knew! I have a DSi, but I NEVER use it... :(</p>
<p>If you want to you could get some DSi points and get petit computer. And then if you want, from there you could transfer it to your 3DS that you might not have. I personally would hold out for smile basic.</p>
<p>I have many DSi shop downloaded games but they are on my PC, do you know how to transfer them back to a DSi and have them work properly?</p><p>Would they go onto the console itself or onto a ROM cart. device?</p>
Probably because the new 3ds version titled &quot;Smile Basic&quot; is almost out. as it was planned for release spring 2015.
<p>Hey guys! I just want to tell you that there's a new, and better version of Petit Computer out on the 3DS! It's called SmileBASIC and you can find all kinds of cool things related to it on the <a href="http://smilebasicsource.com/" rel="nofollow">wiki</a>! It's $9.99(USD plus tax) on the eshop.</p>
<p>so how does SmileBASIC work? (is it worth it?)</p>
<p>It should be there. How it works is you can make codes, execute them, and upload them to the server if you like. You can find more details on<a href="http://smilebasicsource.com/" rel="nofollow"> this site</a>.</p>
<p>so i looked in the eshop: no smile basic</p>
English please? Lol jk. Nice instructable!
<p>Yeah, lots of programming lingo. LOL</p>
<p>I'm glad I downloaded Petit Computer when I did. I can't believe they took it off the eShop!!! </p>
<p>Yeah. I got it on my DSi a long time ago.</p>
<p>Hi! I have had my eye on Petit Computer for a while, but I guess I waited to long to get it. Like you said they did remove it from the 3DS eShop. I didn't even know there was a DSi Shop. How do I access the DSi Shop? Can that be done from the 3DS or do I have to do that from the DSi? Thanks! ✞</p>
If petit computer is removed from the eshop, that must be because the new 3ds version of petit computer, currently titled &quot;Smile Basic&quot; is almost out, as it was planned for release spring 2015.
<p>I just looked at the official website - http://smilebasic.com/en/ - and that looks totally awesome!</p>
<p>Cool! Can't wait :)</p>
It would have to be done on the DSi shop

About This Instructable

7,565views

40favorites

License:

Bio: I like food and art. Don't mind my weird instructables.
More by nancyjohns:Cardboard And Duct Tape Shelf Cardboard Book Page Holder Poor Man's Portable RetroPie Gaming Console 
Add instructable to: