Why if i put a:
PSET(...)
command alone the program will run.
but if i put a :
SFX(0)
command alone i wont hear a thing ? (i have made the '0' sfx in sfx editor)
well, i would assume that SFX only play while the program is running, so if your program immediately terminates (goes to the command prompt) then its probably that you need to keep the program running to hear it. (please note, you can listen to SFX by pressing space in the editor, if that's what this is about)
pset is drawing something on the screen, its just changing the memory adress of that certain pixel into another colour (I think I explained that correctly)
Sfx actually goes to that memory adress, and then reads whats in it.
Did I explain that right?
It's pretty counterintuitive, yeah - I'm not sure why the sound card only runs when the game loop is running (either flip() commands or the _update()/_draw() pair of functions) but it does mean you have to do shenanigans to hear sfx() and music() commands output sound.
[Please log in to post a comment]