@hairmanban19 You always give me such nice compliments, thank you so much!
So I was wondering if anyone knew how many audio channels Petit Computer supports? While playing the Harvest Moon song (which has 6 channels of simultaneous audio), if I play the keyboard type sound during certain parts, some of the channels will cut out. I don't know if I'm overloading the system with sounds, or if it's something else entirely.
If I recall, you can have 8 tracks play simultaneously, but you're limited to 16 channels (from 0 to 15) total because that's how many hardware channels the DSi has. That is with your regular MIDI instruments based on samples. PSGs and Noise are more limited because they are produced by the hardware rather than samples. I'm sure PTC arranges the channels to what is required and where, but PSGs can only be produced on channels 8 through 13 of the physical hardware (so 6 channels total), and noise on channels 14 and 15 (2 channels).
Here's a new OS cuz I kinda got tired of GTA OS. There were only games, it was pretty boring. I present, Isle OS. (You'll need CODEV1, the OS loading thing, for that part to work.) Also, GTC is coming along ok, I fixed the problem, now how do I, when I press x again to get out of the car, get the car to stay where it is?
Hey, I have a game I would like to try and make, so would anyone mind if I asked TONS of questions? Also, is there a simple sprite based game that teaches you how to use sprites in the code?
there isnt really a program like that mystman, and ask all the questions you need just dont spam (weve had some trouble with that). a good place to start is to read through the tutorial thread and find what youre looking for there, it covers almost every major command, then ask about whatever you dont understand.
@ChangeV Good job! The font I used is somewhat similar to yours. Do you mind? Anyone have ideas for touch screen though?
I don't mind.
Here is the outlined font I originally used in my game. (before I switched to my brother's font)
ACLS
CLEAR
'using default font.
CHRINIT "BGF"
'hide the process
'VISIBLE 1,1,1,1,1,0
FOR J=0 TO 255
'skip certain characters.
IF J==9 OR J==13 THEN NEXT
GFILL 0,0,7,7,0
'font outline
GPUTCHR 0+0,0-1,"BGF",J,1,1
GPUTCHR 0+1,0-1,"BGF",J,1,1
GPUTCHR 0+1,0+0,"BGF",J,1,1
GPUTCHR 0+1,0+1,"BGF",J,1,1
GPUTCHR 0+0,0+1,"BGF",J,1,1
GPUTCHR 0-1,0+1,"BGF",J,1,1
GPUTCHR 0-1,0+0,"BGF",J,1,1
GPUTCHR 0-1,0-1,"BGF",J,1,1
'font
GPUTCHR 0,0,"BGF",J,15,1
'set font
A$=""
FOR I=0 TO 63
C=(GSPOIT(I%8,I/8))
A$=A$+HEX$((C>=31)*14+(C==255),1)
NEXT
CHRSET "BGF",J,A$
NEXT
'VISIBLE 1,1,1,1,1,1
'display font
FOR I=0 TO 255
? CHR$(I);
NEXT
GCLS 10
first, get 1 letter from font.
draw black outline all around the letter.
then draw white letter inside.
put it back to font. next character...
it takes a while to process all the characters.
you can hide the process by turning off the GRP layer.
VISIBLE 1,1,1,1,1,0 (then back on. VISIBLE 1,1,1,1,1,1)
@randomous: Would you be willing to do something for me? Would you be willing to try to port another song, maybe not one from lttp but something else. how about the donkey kong country original theme for gameboy . The gameboy didn't have as many custom sounds. So this might be portable into MML what do you think? Would some of those pitch bends be possible? https://www.youtube.com/watch?v=JCmw1Lc06a4
Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D
I want to know also why some of this code isn't working, I'm getting all kinds of errors. Mostly, subscript out of range from PetitComputer. what am I doing wrong? Are multidimensional arrays limited? So confused! any help is greatly appreciated in advance thank you all for the help you've given me so far.
DIM BALLS(25,4)
FOR T=1 TO 10
NEGY=RND(2)
IF NEGY==1 THEN BALLS(T, 3)=1
IF NEGY==2 THEN BALLS(T, 4)=0
IF NEGY==2 THEN BALLS(T, 4)=BALLS(T, 4)-1
NEXT T
Got a project? PM ME on here!
Youtube: lostkitty64x
Want help with coding? PM ME! PM ME PM ME!! XD
FC: WIll post later.
Systems I own: ds lite, 3DS, PC/gaming, steam platform. I play alot of games. Just ask ! Minecraft anyone? :D
I want to know also why some of this code isn't working, I'm getting all kinds of errors. Mostly, subscript out of range from PetitComputer. what am I doing wrong? Are multidimensional arrays limited? So confused! any help is greatly appreciated in advance thank you all for the help you've given me so far.
...
You realize that arrays start counting at zero, right? So if your array is: Balls(25, 4) then the first element is Balls(0,0) and the last element is Balls(24, 3).
I didn't look into the code very much at all, but it looked like that was a problem and it would explain all the "subscript out of range" errors.
@Gimmemorecoinz I can try the Donkey Kong song from the GB. Also, arrays are indexed starting from 0, not 1. This is why you're having problems, your BALLS(25,4) array can only go up to 24 in the X and 3 in the Y.
Edit: Whoops, someone already said that!
@mystman12 DIM is used to set a hard limit on the size of an array. An array is a variable that can hold a collection of values instead of just one. The DIM command tells a variable to become an array of that size.
DATA commands allow you to define static data (data that doesn't change, like a map or something) within the program, which you can read later with the READ command. These can go anywhere really, but they must be preceded by a label. For instance:
Now MYARRAY will have the values 9 5 2 3 7 6 8 1 4 0 in that order. The RESTORE command tells the program where to start looking for data. The READ command reads a single value from the DATA portion and stores it into the variable that follows it. Notice that I used commas in between the data, that signifies the separation between the data that will be retrieved with the READ command. You can have multiple lines of data, just like I have, and it won't change the way the data is read. I could have had 10 DATA lines each with one value and it would have still been the same. Hope that helps!
Forums
Topic: Petit Computer
Posts 2,481 to 2,500 of 9,620
Please login or sign up to reply to this topic