Ok, I've been going to the Petit Computer threads and noticed that many people don't know how to program anything. I made this to have people post tutorials for different functions in easy-to-follow messages. To keep it easy to browse I ask of you to not post questions about Petit Computer itself. This is only meant to be an easy reference guide. Thank you.
DSiWare Forum
Topic: Petit Computer Tutorials
Showing 1 to 20 of 32
| Author | Message |
|---|---|
|
1. Posted: Thu 30th Aug 2012 07:35 BST |
|
FC: 1934-1622-0902 | |
| Author | Message |
|
2. Posted: Thu 30th Aug 2012 15:40 BST To load sprites and make them move use this coding. PS.CLS clears the screen of text so it's good to use at the start of programs.PPS.First you need to make sprites in PRG:CHU0. And set it to sprite mode also you'll notice the numbers 0-7 on the bottom where i put 0 just change it depending on what one you use and filename is what you sved it as.NOTE USING FALSE WHEN LOADING A PROGRAM WILL STOP IT FROM POSTING THE OK MESSAGE AT THE BEGINNING ON THE TOUCH SCREEN. Edited on Thu 30th August, 2012 @ 15:45 by petitprogrammer |
|
petitprogrammer | |
| Author | Message |
|
3. Posted: Fri 31st Aug 2012 00:23 BST @petitprogramer Thanx for starting us off! Now for the basics. |
|
FC: 1934-1622-0902 | |
| Author | Message |
|
4. Posted: Sun 9th Sep 2012 08:06 BST Just a note that BGMPLAY takes a number, not a string. So, if you do something like BGMPLAY MENU right on top of your program without defining the content of MENU variable, it is equivalent to BGMPLAY 0. There are a lot of preset music that is very convenient to use. Look under Help Menu 10 - Preset Music. You have 30 songs to choose from. |
|
Petit Computer Journal 3DS Friend Code: 1091-7596-4855 | |
| Author | Message |
|
5. Posted: Sun 9th Sep 2012 08:14 BST DATA statements are nice. You can have a lot of data in compact form. I always use label and RESTORE command along with READ, like this: @MYDATA Also, you can have more than one, selected by RESTORE keyword. For example, you can RESTORE @MYDATA2 to select that particular data. This is useful because you can have @LEVEL1, @LEVEL2, @LEVEL3 and so on. Use RESTORE LEVEL$ to do so, after assigning appropriate entry to LEVEL$ That being said, I'd just sooner assign the data to string variables directly. DATA keyword is specific to BASIC. You won't find it in any other languages. |
|
Petit Computer Journal 3DS Friend Code: 1091-7596-4855 | |
| Author | Message |
|
6. Posted: Sat 22nd Sep 2012 16:39 BST I guess I'll repost all my tutorially stuff here:
Edited on Mon 28th January, 2013 @ 23:47 by Morphtorok |
|
Oh look! A Morphloggery. Oh, and a Morphsite too. 3DS Friend Code: 0173-1330-0080 | |
| Author | Message |
|
7. Posted: Sat 22nd Sep 2012 18:56 BST SPRITE TUTORIAL There is some confusion in how to use sprites in Petit Computer. I hope this text will make the matter a bit clearer. In Petit Computer, sprites can be thought of as independent objects, with its own layer and behavior. This means the graphic,BG,Console display will never be corrupted by sprites. To use sprites, you must first define their existence. Just as you cannot use Arrays without DIM, you cannot use sprites without SPSET. This is all the command that you need to display sprites. To animate sprites, you can use SPOFS, and SPCHR. SPCHR: SPrite CHaRacter is the image (character number) that you want the sprite to be. For example: Boy is 64. Witch is 96. By changing this value, you can animate the sprite. Those two commands are the only ones you need to use the sprites. But Petit Computer does provide you with convenient animation capabilities. Think of the sprites as independent objects. When you tell the sprite to go somewhere via SPOFS, you can specify the time it takes to get there (in number of frames). If you want a sprite to go somewhere in 3 seconds, you can specify it using the time variable. Example: Move sprite 1 to location 15,60 in 180 frames: SPOFS 1,15,60,180. The sprite will do just that, unless there is another command that overrides it. Think of it as "Set it and forget it" type of mechanism. You can do other things without manually adjusting the sprites. Another convenient feature is SPANIM Here's an example: 'BOY ANIMATION - AUTOMATIC 'WITCH ANIMATION - MANUAL 'STOP BOY ANIMATION You can tell the difference between the two easily, if you stop the program midway. The witch animation stops, while the boy animation keeps going. Here's how you can use the automatic animation for your program. Notice the VSYNC 20. That means to cycle every 20 frames. If you use WAIT 20, the animation timing will be off. @LOOP LOCATE 0,0:?D$ VSYNC 20:GOSUB @ANIM @ANIM And there you have it: Sprites that moves by DPad yet animates smoothly! Edited on Sat 22nd September, 2012 @ 19:36 by ramstrong |
|
Petit Computer Journal 3DS Friend Code: 1091-7596-4855 | |
| Author | Message |
|
8. Posted: Sun 23rd Sep 2012 16:39 BST Duplicate definition (N, DIM) error? 'Program start @INIT Or you can use CLEAR to clear off all variables in memory. |
|
Petit Computer Journal 3DS Friend Code: 1091-7596-4855 | |
| Author | Message |
|
9. Posted: Thu 27th Sep 2012 06:31 BST How to make your own music with BGM. Repost from Post #596 GrabSomeEyes wrote:
I will add this program, which is straight from Help #44: Some MML strings are too long, so split them into sections, let's say "PART A", "PART B", "PART C". We'll store the song into song#128. User defined song can be numbered 128 to 255. In your main code, do this: Somewhere down in the DATA section: And that's it. Now find some MML strings out there and do it! |
|
Petit Computer Journal 3DS Friend Code: 1091-7596-4855 | |
| Author | Message |
|
10. Posted: Sat 29th Sep 2012 18:43 BST @Sprite: our general Petit Computer thread is here if you'd like to ask that question. This thread is only for users to post their completed tutorials, I'm afraid. If you post your question to the proper thread, I'm sure someone will be nice enough to help you out. :3 |
|
the future of NL >:3 3DS Friend Code: 3136-6802-7042 | Twitter: theblackdragon | |
| Author | Message |
|
11. Posted: Sun 30th Sep 2012 22:23 BST Hi i need help using and making stored data like this: DATA"HELLO" basically so i can just use the data to store text for l8r |
|
Linput-3DS friend code: 4725-8494-2702 I'm currently looking for some peeps to make SALLY a website, facebook, and email. If anyone does this u will be mentioned as a producer in the SALLY OS credits! :) | |
| Author | Message |
|
12. Posted: Sun 30th Sep 2012 22:34 BST UUUGHGHH!!!!!! All the terms I don't understand and odd pairing of words! It huuuuurtss. I wish I had the time to make sense of this all and carefully read the posts here multiple times. Guess I'll have to wait until december to get serious with Petit Computer. D: |
|
"When freaky aliens give you lemons, make freaky alien lemonade!" -Hades 3DS FC: 5026-4421-7593 | |
| Author | Message |
|
13. Posted: Tue 2nd Oct 2012 00:44 BST Retro_on_theGo wrote:
I know right? |
|
3ds FC is 1934-1168-4523 | |
| Author | Message |
|
14. Posted: Tue 23rd Oct 2012 02:00 BST I have an idea. |
|
smartman789 | |
| Author | Message |
|
15. Posted: Tue 23rd Oct 2012 05:39 BST Made a tutorial about large backgrounds + scrolling about a month ago. Guess I might as well add a link to it here. Tutorial comes with complete source + QR code. |
|
"What fun is there in making sense?" 3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew | |
| Author | Message |
|
16. Posted: Thu 25th Oct 2012 23:04 BST Discostew wrote:
sorry, but my "parental controls" for the internet resticted that website. |
|
smartman789 | |
| Author | Message |
|
17. Posted: Sat 27th Oct 2012 04:28 BST smartman wrote:
Unfortunately, the "tutorial" portion is quite lengthy, and I don't think it would be appropriate to post it all here. |
|
"What fun is there in making sense?" 3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew | |
| Author | Message |
|
18. Posted: Sun 28th Oct 2012 15:21 GMT Discostew wrote:
look at all the lengthy posts on this thread. HAVE NO SHAME. |
|
which is better? to be born a hero, or to be born evil and overcome that nature? 3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12 | |
| Author | Message |
|
19. Posted: Sat 3rd Nov 2012 08:42 GMT I found this on another website (I dont read the terms, so i dunno if i can post the website XD, i will read them, i promise). Alternate Loops |
|
3DS FC: 2921-9808-6856 | |
| Author | Message |
|
20. Posted: Sun 4th Nov 2012 23:42 GMT this site should help. it's a site this guy is running. he's translating the japanese version into english, so it should be a good relevant read. Edited on Mon 5th November, 2012 @ 00:07 by 0SP_ZELDAiii |
|
which is better? to be born a hero, or to be born evil and overcome that nature? 3DS Friend Code: 1032-1301-2772 | Nintendo Network ID: Milkman12 |

