i recently made a main menu for my game but it slows down my game to about 20 frames per second, but if i just skip to my game and leave the main menu out i get my desired 60 frames per second.
the menu system uses 2 sprites, sprite 2 is the background image and sprite 1 is for which option is selected. my code is
do
sprite 2,0,0,6
set Sprite 2, 1, 0
mx=mousex()
my=Mousey()
if my<250 and my>160 then menuop#=1
if my<330 and my>255 then menuop#=2
if my>585 and my<630 then menuop#=3
if menuop#=1
sprite 1,200,140,2
if mouseclick()=1
delete sprite 1: delete sprite 2
gosub game
endif
endif
if menuop#=2
sprite 1,200,230,2
endif
if menuop#=3
sprite 1,200,560,2
if mouseclick()=1 then end
endif
sync
loop
i cant figure out why when it goes to my game loop it is slows it to 20 frames per second
Aku Soku Zan
Wicked Immedate Slay
Slay Evil Immedately