By the way DX and DY are the speed of the ball. If you want to detect a collision with the paddle, then you must compare the argument with the paddle's coordinates and the space it use. You should add that on collission(X,Y)
And define this function below your loop.
DEF collission(X,Y)
IF X>50 THEN RETURN 1
IF X<0 THEN RETURN 1
IF Y>28 THEN RETURN 1
IF Y<0 THEN RETURN 1
RETURN 0
END
Store the position and the velocity of the ball. Then you must add this in your game loop:
LOCATE X,Y
? " "
IF collission(X,Y+DY) THEN DY=-DY
IF collission(X+DX,Y) THEN DX=-DX
INC X,DX
INC Y,DY
LOCATE X,Y
? "#"
Direct let you use command in real time while edit let you write the program and run all the sentence in the order that you write them.
I suggest you to read about good practices about game programming... learn the concept of game loop. Also, try to use def name instead of gosub @label
Yes, BGMPLAY has the track number as an argument. You can play up to 7 song at the same time. You can even use some tracks to do "sound effects" using MML.
You need to define your song with BGMSET before using BGMPLAY.
Example
BGMSET 128,"CDEF"
BGMSET 129,"BBBBBB"
BGMPLAY 0,128
BGMPLAY 1,129
This is a picture of GRP4. By the way, the player can control any entity on the map because his module only call the function of other modules(And each character/virus is a module). In the picture above, I'm using the blue virus(Spikey)
Th grp editor is a tool to edit the graphic of any game. You can find the key on smilebasicsource.com
The files that you need to edit are jumpdx_sp.grp and jumpdx_bg.grp
I got that sprite from a search in google. I'm using 8 bit sprites because the sprite page is too small.
Now, I tried to mimic the sprite from the game, but it doesn't look ok.
Well, megaman vs street fighter is an official fan game and I haven't seen news about capcom sending "cease and desist" on megaman fan game's projects(In fact, the projects die because the developers doesn't want to give more support.)
However, it's up to Smilebasic's moderators to judge if the game should be shut down.
Nope, before making this I tried to do a top-down roguelike but I got problems making the map(Mostly the camera and the 8 bit autotile).
If I can complete the engine, then the next step is to make something similar to tournament mode(Like mmbn 4 or 4.5)
Well, it's not finished yet. Right now I'm working on the entities engine (To handle the navis or enemies). Once I finish that, I will add attacks to each entity.
The last thing I will add is the chip screen.
This is a short example to handle button input. You need to use the button variable and the button constant(or the value of it) to detect the input.
VAR B
WHILE TRUE
CLS
B=BUTTON()
IF B AND #UP THEN ? "UP"
IF B AND #DOWN THEN ? "DOWN"
IF B AND #LEFT THEN ? "LEFT"
IF B AND #RIGHT THEN ? "RIGHT"
IF B AND #A THEN ? "A"
VSYNC 1
WEND