Forums

Topic: Petit Computer

Posts 9,061 to 9,080 of 9,621

Discostew

@randomous Unfortunately, I don't think there is any "direct" way of preventing a channel in a track from playing or resuming a channel in a track after getting overridden by another track. While I believe you can use multiples of the same instrument at the same time, the hardware is limited to 4 channels capable of playing pulse wave and 2 playing noise, since those are hardware-based, not coded as data like PCM. PTC handles how those get dealt with internally with no method on the outside for the BASIC programmer to manipulate them. The only thing I can think of is to make an audio wrapper that defines what can and what can't play.

For my project, I designate each SFX a priority number, and if the SFX track is playing nothing (BGMCHK) or if the one to be played has a greater priority than the one currently playing, then I play the SFX. Since I limit my project to one BGM and one SFX, and both are only capable of playing 2 pulse waves and one noise channel each, I avoid this cut-off problem. Maybe you can do something along those lines for this. Set a priority for each SFX, but also set a value for each, saying how many noise channels it uses. Also a global variable that says how many noise channels are currently in use. When you play an SFX, you check how many noise channels are currently in use. If the SFX's noise channel usage plus the global is greater than two, you can then check if the priority of this SFX is greater than any of the current SFXs being played that also use noise channels. Stop a currently played SFX in such a case and examine the noise channel usage again until you can play it without problem. You may also have to make a function that gets checked every game loop to see if any SFXs have ended, and reduce the overall noise channel count in those cases.

Not exactly a straight-forward approach, but it's the only one I can think up.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

randomous

@Discostew Bah, silly constraints lol. Oh well, I'll try to do something like that. It'll require a lot of code rewriting, but it's probably the best solution in this case. Thanks.

randomous

damolii

@IAmAPersson The text engine is amazing!! It's definitely more efficient than my previous method, thank you! But... I have so many questions XD!! 1: Could you explain what each line does? I could review what each command does, and apply that knowledge so this is not a big priority, but it would be nice. 2: Could this work with DATA? I'm thinking of the creation of a database (perhaps somehow stored as a variable?), which leads to my final question: How would I be able to use a database on this? Is it even possible? Sorry for so many questions, but I feel as if I'm not using this engine as effectively as it could be used. For instance, my only ideas so far on moving from one line to another are to change the main text variable over and over again, or to save one variable equal to the main variable, then checking if they're equal later on, and if they are, then changing the main variable and thus beginning the cycle again. However, these call for many lines of code that make it seem bulky and the changes are required in the main code. A database would really make me feel more at ease.. Thank you again! XD

EDIT: I just read your previous comment where you stated you wanted to "efficiant-ize" it so it is possible?
ALSO: An explanation is not necessary, seeing as you already gave one earlier I was just reading the code and not paying attention to the other text.

Edited on by damolii

I don't have a 3DS so what do I put here? -Damolii

randomous

@Discostew Now that I think about it, I actually can't do that. Some of the noise comes from the song, so either I'd have to just mute the noise sound effects entirely while a certain song is playing, or somehow know the exact parts where the noise is being generated.

Is there any way to make a noise-like sound using PCM? It doesn't need to be great, it just needs to sound sort of like rain. Could I use a whole pile of different PCM waves played sequentially to make it more like random noise?

Edited on by randomous

randomous

Discostew

randomous wrote:

@Discostew Now that I think about it, I actually can't do that. Some of the noise comes from the song, so either I'd have to just mute the noise sound effects entirely while a certain song is playing, or somehow know the exact parts where the noise is being generated.

Is there any way to make a noise-like sound using PCM? It doesn't need to be great, it just needs to sound sort of like rain. Could I use a whole pile of different PCM waves played sequentially to make it more like random noise?

Well, you wouldn't exactly be able to get PCM quality by stringing them together, as each "instrument" you make yourself is either a 64 or 128 character waveform string and timing for them would be practically impossible. Just to give an idea, the "noise" from the NES and GB-like audio hardware is actually made up of a pseudo-random bit generator, I believe with 32767 steps in it. Your best bet is to find a similar instrument like Moorpheel suggests

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

InsertPi

@damolii yes, it will work with DATA. Just set it into a string. Second, put the engine into a subroutine. Then it'll be much easier to use.

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens.

3DS Friend Code: 2148-9259-0831 | Nintendo Network ID: IAmAPerson620 | Twitter:

LeviCelJir

Well I didn't take the advice and made the game cover before the game >.<
Untitled
such guilts

Hi I'm Levi and I like Bloopys :^)

randomous

@Discostew @Morpheel Thanks, I guess I'll have to come up with something else or just deal with the sound. The helicopter is too choppy by the way.

randomous

bigdog00

@moorpheel I friended you.
Do you have MK7?

I like petit computer! Asphault 3d is awesome!

3DS Friend Code: 0473-8697-6288 | Twitter:

damolii

@IAmAPersson Thank you. I still don't completely get how to use DATA in this process, but I'll get it sooner or later.

The next thing I'm going to talk about is off-topic, but it is very urgent to me. Yesterday, my DSi suddenly went to max volume when it reached low battery and the red light shone. It did this by itself, and I thought it weird but I did not think it had an effect on it. Now however, I can't control the volume at all anymore. I went to DSi Sound to manually shift it down there, but it literally just went back up by itself (I would put it on low, and it gradually increased the volume, I could even see it on the screen as it adjusted the volume). Now I don't know what to do. The volume's too loud to do anything. I don't want to have to plug in my earphones just to decrease the noise every time I use my DSi. I've researched as much information on this subject as I can, and suggestions range from using a toothbrush to clean dirt off the area, to removing the back of the DSi and adjusting items. I have tried the former, but I do not want to try the latter, as I fear I could break the device. I am posting this on this forum because I don't know what to do about this situation, and I'm running out of ideas.....

Edited on by damolii

I don't have a 3DS so what do I put here? -Damolii

LeviCelJir

damolii wrote:

@IAmAPersson Thank you. I still don't completely get how to use DATA in this process, but I'll get it sooner or later.

The next thing I'm going to talk about is off-topic, but it is very urgent to me. Yesterday, my DSi suddenly went to max volume when it reached low battery and the red light shone. It did this by itself, and I thought it weird but I did not think it had an effect on it. Now however, I can't control the volume at all anymore. I went to DSi Sound to manually shift it down there, but it literally just went back up by itself (I would put it on low, and it gradually increased the volume, I could even see it on the screen as it adjusted the volume). Now I don't know what to do. The volume's too loud to do anything. I don't want to have to plug in my earphones just to decrease the noise every time I use my DSi. I've researched as much information on this subject as I can, and suggestions range from using a toothbrush to clean dirt off the area, to removing the back of the DSi and adjusting items. I have tried the former, but I do not want to try the latter, as I fear I could break the device. I am posting this on this forum because I don't know what to do about this situation, and I'm running out of ideas.....

glue the slider down

Hi I'm Levi and I like Bloopys :^)

Zalkia-ent

@leviseljir did you use photoshop?it might do a better job for combining photo's like that .but it might take a while to make it.and the fact that you put the petit computer cover to the right is awesome!good luck with your game!

email:[email protected]
if facebook,myspace,instagram and twitter were all shut down, 90% of the teenage population would go insane. if your one of the 10% that would be laughing at them, copy&past this to your signature and hope it happens. Wait... NO!

LeviCelJir

Zane-dude wrote:

@leviseljir did you use photoshop?it might do a better job for combining photo's like that .but it might take a while to make it.and the fact that you put the petit computer cover to the right is awesome!good luck with your game!

Thanks. No I actually used online photo editors with this Untitled
all I had to do was white out any things in the way and filled the background with black and put numbers on it and the name

Hi I'm Levi and I like Bloopys :^)

damolii

@LeviCelJir Thanks for the advice, but I got it fixed. Apparently, it must've been a dust problem, as using the toothbrush did work eventually (I cleaned it, then left it all night to dry, and it worked). Crisis averted Also, DSi has touch buttons, not a slider....

I don't have a 3DS so what do I put here? -Damolii

LeviCelJir

damolii wrote:

@LeviCelJir Thanks for the advice, but I got it fixed. Apparently, it must've been a dust problem, as using the toothbrush did work eventually (I cleaned it, then left it all night to dry, and it worked). Crisis averted Also, DSi has touch buttons, not a slider....

oh lol

Hi I'm Levi and I like Bloopys :^)

Mariominer

I have made a slight modification to Iamapersson's text scroller. ONLY THE BEEP STATEMENT. This makes it have noises for different sounds, like a or b. So say BEEP 13 (or x ), 0, ASC(MID$(TEXT$,I,1))*1.5 And you have a functional AC beeper! Just play around with it to optimize it.

Like a boss? Please, I AM a boss. You're welcome

3DS Friend Code: 1543-5315-3818 | Nintendo Network ID: Storybookten9

Discostew

Quick question (and this may sound shocking coming from me, but I don't have my 3DS with me to check):

I believe SPSET resets everything (like position, animation, etc), but does SPCHR do that? Like, if I call SPANIM, and then midway through the animation, I call SPCHR, would it reset the animation to the beginning of where SPCHR sets, or continue on at whatever frame it is at with the new offset being where the index is set with SPCHR? Here's an example of what I mean.

Suppose the character index is at 0, and I set the animation for 4 frames, so it would animate like this: 0, 1, 2, 3, 0, 1, 2, 3, etc.
Supposed when it is at 2, I change the sprite with SPCHR so now the starting character index is 16. Would it then automatically be at 18 to proceed to 19 and then wrap back to 16 to do the sequence of: 16, 17, 18, 19 - or would it reset the animation to start it at 16?

This is very important as it may bring about a major performance improvement in my sprite handler.

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

GraphicGenius

I will be doing Petit Computer less sadly but I am making a JavaScript forum so you could learn from it!

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens. Wait was that just a joke?

3DS Friend Code: 1478-3545-5136 | Nintendo Network ID: GreatGamer123

Top

Please login or sign up to reply to this topic