xythen
Still Fresh
I finally decided to have a bash at coding in fenix, so I've been bumbling my way through various tutorials and source codes for about the past week. And, surprisingly, my first project is coming on quite well (better than I expected at least!) It's a remake/reworking of Cauldron II for the c64.
There are a few things I'm having problems with, so hopefully some of the gurus here can help!
Firstly, is it possible to have gapless looping of background music? I tried it using a short 1 second .ogg of pink noise using the following code:
CODE
intro_tune = LOAD_SONG("sounds\pink_noise.ogg");
PLAY_SONG(intro_tune,-1);
however this introduced a ~0.5 second delay between loops. Also, how do you stop playback so that you can initiate another song (such as when changing levels etc.)?
Another problem I'm having is to do with calling variables from a separate process. I've come across two code examples of how to do it, but neither of them seem to work. Here's what I tried:
CODE
process mapcalc();
private pumpID, pumpx, pumpy;
begin
pumpID=get_id(pumpkin_m(x,y));
loop
pumpx=pumpID.x;
pumpy=pumpID.y;
if (pumpx < 0)
signal(type ghost_1,s_kill);
end
end
end
where "pumpkin_m(x,y)" is the process I'm trying to get the variables "x" & "y" from. Any ideas what's going wrong?
I'm having lots of other problems with collision detections etc., but I think I need to rewrite my movement code before I get into that.
Thanks in advance!
There are a few things I'm having problems with, so hopefully some of the gurus here can help!
Firstly, is it possible to have gapless looping of background music? I tried it using a short 1 second .ogg of pink noise using the following code:
CODE
intro_tune = LOAD_SONG("sounds\pink_noise.ogg");
PLAY_SONG(intro_tune,-1);
however this introduced a ~0.5 second delay between loops. Also, how do you stop playback so that you can initiate another song (such as when changing levels etc.)?
Another problem I'm having is to do with calling variables from a separate process. I've come across two code examples of how to do it, but neither of them seem to work. Here's what I tried:
CODE
process mapcalc();
private pumpID, pumpx, pumpy;
begin
pumpID=get_id(pumpkin_m(x,y));
loop
pumpx=pumpID.x;
pumpy=pumpID.y;
if (pumpx < 0)
signal(type ghost_1,s_kill);
end
end
end
where "pumpkin_m(x,y)" is the process I'm trying to get the variables "x" & "y" from. Any ideas what's going wrong?
I'm having lots of other problems with collision detections etc., but I think I need to rewrite my movement code before I get into that.
Thanks in advance!