New to Fuse4-want a Faery Tale Adventure like game
-
@tdg8934 Hah, that is absolutely crazy-- phenomenal work, amazing!
I'm not a big fan of the white noise channel though-- is that supposed to be white noise?
In my play music code, there is a way to control which melody type is being used-- try flipping it to the one which does two melody channels, versus one melody and one white noise. It might even be called "melodyTypeTwo"?
-
@tdg8934 Your Youtube links were shortened and for some reason don't display properly. If you paste them in to the browser address bar it expands them and that is what you need to put in your posts (I have fixed these for you)
-
@tdg8934 that's a lot of notes i'd just use the root notes and copy the root notes with a bass and have accompanying notes to high light the melody 4 channels, but i like how in depth your going .
-
@pianofire The videos work now. Thank you!
-
@Spacemario thank you for your kind words. I have changed around the instruments (ie saw) or melody channels for the best sound so all the channels (0-3? are heard) but I can keep playing with it. Currently I’m working on the GUI menus at the bottom .
-
Sticking to 4 channels is probably going to give it a nice retro sound. Like pixel art, but for your ears!
-
@tdg8934 You should do a new video-- I'd love to hear the overworld song, but sounding correct with all of the channels :D
-
@Spacemario I’ll work on that note music this weekend. But I have discovered another issue I need some direction on first.
-
Ok so for a while I have noticed in my game that it crashes after a few minutes of playing the note music. I get a system error that kicks me out of Fuze and back to the Nintendo Switch main screen. It’s a black screen with a message that says “The software was closed because an error occurred “ [OK ]
I trouble shooted my program by commenting out the play music function in the main program loop. This time as no note music was playing and not touching anything, a couple of minutes later I get a Fuze Stack Overflow error.
My Animated knight function was the culprit. Stack overflow, too many functions called, maximum memory for variables exceeded. (Context: A3777000)
Any ideas what to do next?
-
Sounds like your function has a bug. Check your loops?
-
@tdg8934 Is it possible that you are creating new sprites using createSprite without first freeing the memory using removeSprite? This can lead to memory leaks.
If you go to Settings -> Preferences -> Show FPS + Memory Meter When Running Programs
and change it to Yes this will display the amount of free memory when you program is running which should show if there is a leak
-
If you are using
loadAudio()
then there is a memory leak each time you press + to run your code. Technically the leak is when you go back to the editor. This is fixed in the next release. It's not going to be causing things to crash when the program is running but it won't help if you are also running out every time you stop / start. Right now, there is nothing you can do about this bug aside from come out of Fuze once in a while or not load audio!. Apologies for the inconvenience on that one. -
@pianofire this really helped me identify the function loosing memory . Thank you
-
@Martin thank you but I did not find and code that used the load audio routine
-
@pianofire this is the function I made that is loosing memory .
loop
clear()
DrawMap()
centreSpriteCamera(knight.x, knight.y)
UpdateSprites()KnightWalk()
:
//Draw 9 arrows for direction
Arrows(800,1040,red,green,blue,0)
Arrows(750,990,red,green,blue,90)
Arrows(850,990,red,green,blue,-90)
//6 more arrow function calls
:
playMusic()update()
repeat:
Function Arrows(trx,try,col1,col2,col3,rot)
gw=1950/30
gh=1080/30shape1=createTriangle(gw/3+trx, gh/3+try, gw/3+gw/3+trx, gh/3+try, gw/2+trx, gh-gh/3+try)
setVertexColour(shape1,0,col1)
setVertexColour(shape1,1,col2)
setVertexColour(shape1,2,col3)rotateshape(shape1,rot)
drawShape(shape1)
//update()
return voidEven with 1 Arrows function call looses memory slowly and it crashes
In the knightWalk function it also calls the Arrows function to highlight the direction when the knights button are pressed. Currently those Arrows function calls are commented out. However, it would look like this:
Arrows(800,1040,red,white,blue,0)So it appears my function Arrows is too complicated and looses memory
-
This post might help...
https://fuzearena.com/forum/topic/107/stack-overflow-with-controls-n/8
-
I think you are losing memory because you are not doing deleteShape() on your arrows after you have drawn them.
This is a serious bug in Fuze, since memory allocated for shapes is not returned even after you quit your program (same as with audio files).
-
@n_yohan thanks but adding another update() or sleep(0.0001) or smaller causes the music and character movement to be very slow and not realistic to use. As well also causes the memory loss and eventual crashing- just slower.
-
-
Thank you! That did the trick. All is fully functional again - back to normal. I’ve learned so much with the members and staff in this forum. Great work!