You can save a program by going into run mode, making sure your program isn't running, (If it is, just press START or SELECT to stop it) and typing:
SAVE"FILENAME
Obviously "FILENAME" can be whatever you want, as long as it's not too long.
Publishing works by uploading your file (or folder) to the server, and then publishing it go receive a download code. This can all be done in the...
Try using BUTTON(2) instead of just BUTTON(), and try writing your IF statements with ELSEIF like this:
IF B AND #DOWN THEN
GOTO @ITEMLST2
ELSEIF B AND #A THEN
GOTO @HPOT
ELSEIF B AND #B THEN
GOTO @ITEM
ENDIF
This way will ensure only one action is used each. Note that order is very important here. If A and B are both pressed, it will GOTO @HPOT.
beginning or end of your code. It doesn't matter too much, but if you find something isn't displaying properly just try moving it to the other side. If you don't have one and do add one, it may seem to slow your game down since you would have originally programmed your game to run without it, but VSYNC really is a vital command to get proper timing and control over a game.
8, and then have a function that decreases the value by 1 each frame whenever it is greater than (>) 0. While DELAY is greater than 0, the player shouldn't be allowed to move.
Note, if you don't currently have a VSYNC 1 in your game loop, the timing for these sorts of things will be very unreliable and inconsistent. (Especially on O3DS vs. New3DS) Make sure you add one, to either the very...
Just add CLS (Or ACLS, which clears almost everything and loads all the default graphics) to the beginning of your program. (Or anywhere else you need to clear console text.)
As for a delay, there are a few different ways you could go about it. One simple way is to use a variable as a sort of timer. Say you want an 8 frame delay after punching. You could have variable DELAY and set it to...
That's cool! I'd say most of what you'll learn about programming will come from your own experiments, and picking up on better techniques and more efficient ways to program.
Another thing you should do is use GOSUB instead of GOTO. GOSUB works the same as GOTO, except you can then use RETURN to make the code return to where the GOSUB was called. For example...
GOSUB @WOW
PRINT "BOB"
END
@WOW
PRINT "HELLO "
RETURN
This will print "HELLO BOB" on-screen. You should use this technique for all the input commands instead of the GOTO @DODGE and then...
This becomes extremely useful. For example, say you have a 2D, top down RPG. You could store the map data in a two-dimensional (2 element) array, like this:
DIM MAP[256,256]
Then, after loading each tile into the array, you could check to see what type of tile the player is standing on like this:
IF MAP[X,Y]==...
If the player was standing at, say, 34X,232Y, the the value stored in...
to learn how to count starting from 0, instead of 1. So now you can say:
ARRAY [0] = 5
ARRAY [1] = 3
ARRAY [2] = 8
...
ARRAY [9] = 9000
Each stores it's own value. The reason arrays are so useful is that you can put variables in place if the elements. So, for example:
X=9
PRINT ARRAY[X]
Will print "9000". Changing X will allow you to print any other value stored in the array...
For example a three element array looks like the one above. A one element array looks like:
ARRAY[45])
The numbers you put in each element when dimming determine how many different values will be stored for that element. So,
DIM ARRAY [10]
can hold 10 different values. Note, *0* counts as a number, so it only goes up to nine. That's still 10 values, but when programming you have...
Arrays are basically multiple variables squeezed into one. For example, ARRAY[10,10] can store a value for ARRAY[0,0], another value for ARRAY [O,1], another value for ARRAY [3,7], etc. They can be useful for things like storing map data or lists, for example.
You can create an array like this:
DIM ARRAY[10,10,10]
You can have from one to four elements. (Being the different numbers...
I actually had a complete stranger come up to me once while programming a Petit Computer game in the store. I can't remember exactly what she said, but I was just like "Oh, I'm just programming a port of Chip's Challenge in PTC." I can't how she responded but I think she watched for like a minute.
A chess game shouldn't be too hard. You'd just need to create an 8x8 array (DIM BOARD[8,8]) that you would use to keep track of where each piece is, then just program the movement options for each piece. (When the player taps a king, they should only have options to move one each direction, for example) Obviously if you wanted a computer player, things would be much more complicated, but a pass...