Introduction: How to Make Games for the 3DS and DSi Family
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!

Participated in the
Coded Creations
21 Comments
1 year ago
Hi marco
1 year ago
can you do a video of this?
3 years ago
Okay. I found this out in May of 2019. A the beginning of the Instructable, it says "*Petit Computer has been removed from the 3DS eshop. It is however on the DSi Shop." The DSi shop closed sometime in January of this year. What can I do now?
7 years ago
They removed Petit Computer from the eshop? But why?
Reply 7 years ago on Introduction
I wish I knew! I have a DSi, but I NEVER use it... :(
Reply 7 years ago on Introduction
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.
Reply 5 years ago
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?
Would they go onto the console itself or onto a ROM cart. device?
Reply 7 years ago
Probably because the new 3ds version titled "Smile Basic" is almost out. as it was planned for release spring 2015.
6 years ago
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 wiki! It's $9.99(USD plus tax) on the eshop.
Reply 6 years ago
so how does SmileBASIC work? (is it worth it?)
Reply 6 years ago
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 this site.
Reply 6 years ago
so i looked in the eshop: no smile basic
6 years ago
English please? Lol jk. Nice instructable!
Reply 6 years ago
Yeah, lots of programming lingo. LOL
7 years ago on Introduction
I'm glad I downloaded Petit Computer when I did. I can't believe they took it off the eShop!!!
Reply 7 years ago on Introduction
Yeah. I got it on my DSi a long time ago.
7 years ago on Introduction
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! ✞
Reply 7 years ago
If petit computer is removed from the eshop, that must be because the new 3ds version of petit computer, currently titled "Smile Basic" is almost out, as it was planned for release spring 2015.
Reply 7 years ago on Introduction
I just looked at the official website - http://smilebasic.com/en/ - and that looks totally awesome!
Reply 7 years ago on Introduction
Cool! Can't wait :)