Well, isn't that obvius? Happends with any program out there, because your active folder is not the same as the project folder, so it gives you such stuff because that folder is not where the necessary files are located.
PX=0 'Player coordinates on X axis
PY=0 'Player coordinates on Y axis
IF BUTTON(2) AND #UP THEN DEC PY
IF BUTTON(2) AND #LEFT THEN DEC PX
IF BUTTON(2) AND #RIGHT THEN INC PX
IF BUTTON(2) AND #DOWN THEN INC PY
LOCATE PX,PY
PRINT "P"
Giving you a sample code, i think, is a bad idea. Since any game/app you're going to make has it's own unique challenges, so instead of copy/paste a code, try to learn how it works so you won't have these problems again in the future.
What @eddie tried to say is that anything you display onscreen is based on coordinates, so to move something on the screen you should modify those coordinates-CONT-
You can use CHKCHR() that will return the character of the graphic screen at the given coordinates:
IF CHKCHR(X,Y)=="Enemy" THEN 'Collision
Take into account the drawing process, since if something overwrites the enemy character, this function will not return the enemy.
Entretenido y desafiante, como debe de ser. Me tomo un tiempo en darme cuenta que cada caja representa un tanque con diferentes controles.
De nuevo juego no tengo muchas ideas, pero podrías ir practicando con diferentes comandos de SB. Quizás te encuentres con una idea en medio del proceso. Así me sucedió con Food Splatterhouse.
Y por cierto, DRAGON te quedó brutal. Sigue así.
SPVARS are useful when you want to handle multiple sprites with the same values, but independent of each other, so you don't need to declare arrays or stuff like that.
Imagine that every sprite has "life points" attached to it, that's were SPVARS comes in.
@raimondz
Your function only works if you're parsing a string var, however, returns "Type Mismatch" if you're parsing a string directly. Seems that the " S$[0]="" " doesn't work in that case.
I once tried to transcribe a Scratch program into legit code, i failed because either the algoritm made use of Scratch-specific commands (like the pen), or i was too dumb to transcribe it correctly.
But beyond that, no.
@Alex is noisy because raytracing works by tracing the path of rays on different locations. And also, it takes A LOT to compute, that's why is noisy: High realism at High cost.
Also, sometime on the execution of the program, the sprite should mirror itself on real-time, and SPDEF won't help in that case. Therefore, more reasons to use SPCHR.
SPDEF is more useful when you have different sprites using the same definitions. That's what SPDEF is for: To define a common set of dimensions for different sprites to use.
Is better to use SPCHR since on most cases, each sprite are unique with their unique dimensions, so a common definition won't work for all of them.
I answered you on the previous pic about flipping the sprites, but well...
To answer your question: You only need to flip the sprites that you're using. You don't have to flip every single frame of the sprite since the whole sprite is flipped. Seems that you're confusing Sprite with Frame.
You should look for the Instruction List, which contains all the commands with examples and explanations:
http://smilebasic.com/en/reference/
Or you could place the text cursor over a command and press the "?" button on the touch screen.
Because SPDEF only creates a new template. What you're looking is SPCHR.
SPCHR Management number,[U],[V],[W],[H],[Attribute]
In your case, it would be:
SPCHR 0,16,32,16,16,#SPSHOW+#SPREVH