#1✎ 306MinxrodThird YearMy account is over 3 years oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthVideo GamesI like to play video games!HobbiesNot optimized or even good, but it's fun to play around with and I'm out of upload slots
Touch to draw walls, touch while pressing a button to place dots. Maximum number of dots can be modified by changing the variable MAC.
ACLS
XSCREEN 3
OPTION DEFINT
VAR MAC = 1000 'this is a pretty good starting point
DIM DT[MAC]
DIM DX[MAC]
DIM DY[MAC]
DIM C[4]
COPY C,"@D"
'---------------------
DISPLAY 1
GBOX 0,0,319,239,#BLACK 'invisible border around screen
'---------------------
WHILE 1
FOR I=0 TO MAC-1
GPSET DX[I],DY[I],0
IF T && BUTTON(0)THEN
DX[I] = X
DY[I] = Y
VSYNC 1
ELSE
GPSET X,Y,#GRAY 'wall color, feel free to change this
ENDIF
'the messy bit that needs work
IF DT[I]==0 THEN
INC DX[I]
IF GSPOIT(DX[I],DY[I]) THEN DEC DX[I]:INC DT[I]
ELSEIF DT[I]==1 THEN
INC DY[I]
IF GSPOIT(DX[I],DY[I]) THEN DEC DY[I]:INC DT[I]
ELSEIF DT[I]==2 THEN
DEC DX[I]
IF GSPOIT(DX[I],DY[I]) THEN INC DX[I]:INC DT[I]
ELSEIF DT[I]==3 THEN
DEC DY[I]
IF GSPOIT(DX[I],DY[I]) THEN INC DY[I]:DT[I]=0
ENDIF
TOUCH OUT T,X,Y
GPSET DX[I],DY[I],C[DT[I]]
NEXT
VSYNC 1
WEND
@D
DATA #RED, #YELLOW, #LIME, #CYAN
I feel like somehow this sort of dot physic could be used in a game, but I'm not sure how. Anyways hopefully someone can get some use out of this. :P
EDIT: So it's broken. No idea why, I guess I'll just improve this and upload the program file for use with SBFM. Or maybe I'll try and make this into something playable... Hmm.
Posted
Edited
by Minxrod
#2✎ 593IAmRalseiForum LeaderHiddenAchievementsFirst YearMy account is over 1 year oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthI’ll type it for you then upload it and edit in the key.
This could take a while.
Edit:oh noes your code is broken
When I run it, it says wend without while but if I comment the problematic wend out, it says while without wend WHAT IS THIS TRICKERY?
I did fix a typo you made (you typed thne instead of then) but that’s the only thing I changed. So it is most likely your code.
Posted
Edited
by IAmRalsei
#3✎ 593IAmRalseiForum LeaderHiddenAchievementsFirst YearMy account is over 1 year oldWebsiteExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthI’ve fixed it enough so it doesn’t crash...
But I don’t think this is how it’s supposed to work. Key:REMOVED
Posted
Edited
by IAmRalsei