Does it run at a stable framerate? Given that enough resources can be used for the game logic and graphics, a neat fighting game could be made with this.
Key: «5EECKQV»
Here's something I've had for a while... Color Match!
It's a very simple concept. This was originally going to be my entry for a certain contest, but I deemed it too simple. Now I'm finally sharing it with you.
Feel free to post feedback and highscores! Also, feel free to look and play with the code. It's a bit messy, though.
I'd actually suggest NOT to use SPDEF unless absolutely necessary (if you have a sprite size different than the default template), since the system already has predefined all sprites. If you want to find the Definition# for these sprites, you can find them in the SmileTool under SPDEF.
You haven't created a sprite with Management# 0 (the first parameter). This is because SPDEF only redefines a sprite definition template (in this case, Definition# 0), but doesn't actually create a sprite. To create the sprite you need to call SPSET and specify a Management# (the sprite's ID) and a Definition# (the template the sprite's based on). So you need to call SPSET 0,0 after the SPDEF.
You should remove PRINT XSCREEN, since XSCREEN is an instruction (and has no return values). Trying to print an instruction with no return values just prints 0.
Also, you should remove all those PRINT "" since they serve absolutely no purpose.
It's an easy custom function. You just need to remember that a string is really just an array of individual characters, so you can iterate over it. I'll give you an example with text (TX$), a wait amount (WT), and even a sound (BP) as a parameter.
DEF TYPE TX$,WT,BP
FOR I=0 TO LEN(TX$)-1
?TX$[I];
BEEP BP
WAIT WT
NEXT
END
You can then call it like this...
TYPE "SMILEBASIC",10,9
You use CHKFILE to check if the file exists. It follows this syntax...
<Boolean>=CHKFILE("<Filetype:><Filename>")
The function will return either true or false, so it's suggested you place it in a conditional, like this...
IF CHKFILE("TXT:SAVEDATA") THEN
NAME$=LOAD("TXT:SAVEDATA",FALSE)
ENDIF
Loading it is very simple as well. Similarly, you'd need a string variable and the LOAD command. You can use LOAD with either of these syntax...
<String$>=LOAD("TXT:<Filename>",FALSE)
LOAD "TXT:<Filename>",FALSE OUT <String$>
It is suggested that you call CHKFILE before you try to load something. This is so that you prevent loading a file that doesn't exist, since it would throw an error.
Sorry for the late reply. If you want to save a string, you simply need a string and the SAVE command. You can save a text file with this syntax...
SAVE "TXT:<Filename>",<String$>
For example...
NAME$="EXAMPLE"
SAVE "TXT:SAVEDATA",NAME$
Do note that a dialog will appear to the user in order to save, meaning that the user may cancel saving.
Well, as long as it actually has nothing to do with FNAF, I could help. I'm more of the "I'll teach you to code for yourself" than the "I'll code for you" kind, though. You know how the proverb goes... Give a man a fish...
Cool! I don't think there was one where it would go on both directions. After all, calling SPCOLOR with #WHITE would leave the sprite with its default colors, if I recall correctly. How did you edit the colors like that?