RFO BASIC позволяет легко создавать приложения на андроид ос
FREEWARE GNU General Public License
возможности:
графический режим + мультитач
динамический gui c помощью html и js
дополнительно :
Здесь пишут программу и отвечают на вопросы - http://annimon.com/forum/id396951
Здесь документация - http://annimon.com/forum/id83244-150 -
http://rfobasic.com/ - учебник на русском языке, открывается на английском и через 5 секунд спрашивает
" перевести ? " отвечаем - перевести ( Google Chrome ).
Или http://4pda.ru/forum/index.php?showtopic=319131&st=20 - тут руководство и учебник на русском.
Очень даже хорошо через компьютер собирается в apk!
На форуме есть куча примеров уже переведенных в apk - очень достойно, не стыдно и
в Market выложить.
И очень удобно использовать текстовый и графический экраны ( на графическом работают
операторы графики ).
В самой программе куча примеров.
Для переноса на компьютер и сборке apk для андроид специальная программа BASIC! Quick APK (WiFi).
ПРИМЕР:
REM Start of BASIC! Program
gr.open 255,255,255,255
gr.color 255,25,0,255,0
gr.rect rct1,50,40,60,15
gr.render
for i=50 to 100 step 1
gr.modify rct1, "left", i
gr.modify rct1, "right", (i+10)
gr.render
pause 1
next
pause 1
gr.close
END
ПРИМЕР:
REM Start of BASIC! Program
gr.open 255,255,255,255
gr.color 255,250,0,255,0
gr.orientation 1
gr.text.draw txt1, 1, 60, "My current 'x' position is 1"
for i=1 to 100 step 1
gr.modify txt1, "x", i
gr.modify txt1, "text", "My current 'x' position is " + str$(i)
gr.render
pause 1
next
pause 1000
gr.close
END
ПРИМЕР :
score = 0
speed = 4.0
gr.open 255, 255, 255, 255
gr.orientation 1
gr.color 255, 30, 30, 30, 1 % play area
gr.rect area, 0, 300, 0, 300 % play area
gr.color 255, 255, 0, 0, 1
gr.circle ball, round(rnd() * 300), 0, 10
gr.color 255, 0, 0, 255, 1
gr.rect player, 150, 280, 200, 300
gr.text.draw scoreboard, 0, 350, "Score: " + str$(score)
gr.render
do
do
gr.touch touched, x, y
until touched
gr.get.position ball, x1, y1
gr.get.position player, x2, y2
if x < (x2 + 15)
let direction = -10
elseif x > (x2 + 35)
let direction = 10
else
let direction = 0
endif
gr.modify ball, "y", y1 + round(speed)
gr.modify player, "left", x2 + direction
gr.modify player, "right", x2 + 50 + direction
gr.render
if gr_collision(ball, player)
score = score + 1
speed = speed + 0.2
gosub positionBall
endif
if y1 > 300
score = score - 1
gosub positionBall
endif
gr.render
pause 5
until 1 = 2
positionBall:
gr.modify scoreboard, "text", "Score: " + str$(score)
gr.modify ball, "y", 0
gr.modify ball, "x", round(rnd() * 300)
return
OnBackKey:
popup "Score: " + str$(score),0,0,1
end
ПРИМЕР :
Rem Blink
Rem Built with RFO Basic!
Rem June 2015
Rem Version 1.00
Rem By Roy
di_height = 1230 % set to my Device
di_width = 800
gr.open
gr.set.AntiAlias 1
gr.orientation 1
pause 1000
gr.screen screenWidth,screenHeight
scale_x=screenWidth/di_width
scale_y=screenHeight/di_height
gr.scale scale_x,scale_y
gr.render
gr.set.stroke 1
gr.text.size 80
xx = 800 : xxx = - 30
dim wink[15]
gosub SetColours
gosub BlinkEyeLeft
gosub BlinkEyeRight
gosub BlinkText
gosub Blink
end
Blink:
do
for x = 2 to 10
pause 100
if x = 6 then pause 200
!Eye Left
if x = 2 then gr.modify wink[2], "paint", black
if x = 3 then gr.modify wink[3], "paint", black
if x = 4 then gr.modify wink[4], "paint", black
if x = 5 then gr.modify wink[5], "paint", black
if x = 6 then gr.modify wink[5], "paint", magenta
if x = 7 then gr.modify wink[4], "paint", white
if x = 8 then gr.modify wink[3], "paint", white
if x = 9 then gr.modify wink[2], "paint", white
!Eye Right
if x = 2 then gr.modify wink[7], "paint", black
if x = 3 then gr.modify wink[8], "paint", black
if x = 4 then gr.modify wink[9], "paint", black
if x = 5 then gr.modify wink[10], "paint", black
if x = 6 then gr.modify wink[10], "paint", magenta
if x = 7 then gr.modify wink[9], "paint", white
if x = 8 then gr.modify wink[8], "paint", white
if x = 9 then gr.modify wink[7], "paint", white
gosub ChangeTextColour
gr.render
next
until 0
return
BlinkEyeLeft:
Gr.oval wink[1], 200, 200, 400, 400
gr.modify wink[1], "paint", black
Gr.oval wink[2], 200,220, 400, 380
gr.modify wink[2], "paint", white
Gr.oval wink[3], 200,240, 400, 360
gr.modify wink[3], "paint", white
Gr.oval wink[4], 200, 260, 400, 340
gr.modify wink[4], "paint", white
Gr.oval wink[5], 250, 280, 350, 320
gr.modify wink[5], "paint", magenta
gr.render
return
BlinkEyeRight:
Gr.oval wink[6], 400, 200, 600, 400
gr.modify wink[6], "paint", black
Gr.oval wink[7], 400,220, 600, 380
gr.modify wink[7], "paint", white
Gr.oval wink[8], 400,240, 600, 360
gr.modify wink[8], "paint", white
Gr.oval wink[9], 400, 260, 600, 340
gr.modify wink[9], "paint", white
Gr.oval wink[10], 450, 280, 550, 320
gr.modify wink[10], "paint", magenta
gr.render
return
BlinkText:
t$ = "Blinking Eyes"
t2$ = "Demo using gr.paint.get <colour> and gr.modify <pointer>, 'paint', <colour>"
gr.text.width w , t$
tab = di_width/2 : tab = tab - (w / 2)
gr.text.bold 1
gr.text.draw wink[11],tab, 100, t$
gr.modify wink[11], "paint", red
gr.text.draw wink[12],xx, 600, t2$
gr.modify wink[12], "paint", red
return
SetColours:
gr.color 255,0,0,0,1 % black
gr.paint.get black
gr.color 255,255,0,0,1 % Red
gr.paint.get red
gr.color 255,0,255,0,1 % green
gr.paint.get green
gr.color 255,0,0,255,1 % blue
gr.paint.get blue
gr.color 255,255,255,0,1 % yellow
gr.paint.get yellow
gr.color 255,0,255,255,1 % cyan
gr.paint.get cyan
gr.color 255,255,0,255,1 % magenta
gr.paint.get magenta
gr.color 255,255,255,255,1 % white
gr.paint.get white
return
ChangeTextColour:
if x = 2 then gr.modify wink[11], "paint", red
if x = 3 then gr.modify wink[11], "paint", green
if x = 4 then gr.modify wink[11], "paint", blue
if x = 5 then gr.modify wink[11], "paint", yellow
if x = 6 then gr.modify wink[11], "paint", cyan
if x = 7 then gr.modify wink[11], "paint", magenta
if x = 8 then gr.modify wink[11], "paint", white
xx += xxx : gr.modify wink[12], "x", xx
if xx < - 2500 then xxx = abs(xxx)
if xx > 800 then xxx = - xxx
gr.render
return
ПРИМЕР :
INPUT "Введите N",N$
GR.OPEN 0, 0, 0, 0
GR.ORIENTATION 2
s=len(N$)
GR.SCREEN w,h
x=0
y=0
a=1
c=1
r=0
g=0
b=255
u=0
! Draw a Black text alignment line
! Set the text color to Red with fill = false
! Set the text size to 1/25th screen height
GR.TEXT.SIZE w/20
! Set the text align to Left = 1
GR.TEXT.ALIGN 1
x=1
y=2
skeip:
GR.CLS
GR.COLOR 255,255, 0, 0, 255
GR.RECT Paddle, w/2, h/2, w/2+40, h/2+40
m=RND()*3+1
GR.COLOR 255,r, g, b, 255
GR.TEXT.DRAW M, 30, 30,str$(s)
GR.TEXT.DRAW P, x, y, N$
x=x+a
y=y+c
IF x>w-s
a=-m
r=255
g=0
b=0
ENDIF
IF x<5
a=m
b=255
g=0
r=0
ENDIF
IF y>h-5
c=-m
g=255
b=0
r=0
ENDIF
IF y<12
c=m
r=255
b=255
g=0
ENDIF
GR.RENDER
GOTO skeip
DO
UNTIL 1
***** Сами программы находятся здесь:
http://annimon.com/forum/id396951-150
http://forum.boolean.name/showthread.php?t=18623&page=5
RFO-Basic v1.88 -
В RFO-Basic пишется программа, отлаживается и если все нормально, то сбрасывается
на ПК и в Eclipse собирается в apk .
Смотреть готовые программы на RFO-Basic и они же собраные в apk здесь:
http://laughton.com/basic/programs/games/
Интересная идея. Посмотрю.
Спасибо за разработку.
Приглашаю в группу, посвященную RFO/FreeBasic
REM Start of BASIC! Program
REM Цветные шарики со звуком и без
GR.OPEN 255,200,200,200
GR.ORIENTATION 0
GR.SCREEN w,h
start:
gr.cls
cx=20
cy=h/2
loop:
r=255*((sgn(rnd()-0.5)+1))
g=255*((sgn(rnd()-0.5)+1))
b=255*((sgn(rnd()-0.5)+1))
GR.COLOR 255,r,g,b,1
dx=(rnd()-0.3)*30
dy=(rnd()-0.5)*40
cx=cx+dx
cy=cy+dy
! tone 3300-cy*10,186 % если убрать "!" будет звук
! 186 минимум миллисекунд данного устройства
GR.CIRCLE nc,cx,cy,8
if cy<0 then goto start
if cy>h then goto start
if cx>w then goto start
GR.RENDER
goto loop
В программе выше для каждого устройства свои миллисекунды!
Они определяются : запускаем набранную программу командой RUN и она если
находит не соответствие выдает ОШИБКУ в которой указывает нужные миллисекунды.
Сама программа находиться здесь :
http://annimon.com/forum/id396951-180
Команды и графика Basic-RFO на русском скачать здесь:
http://annimon.com/forum/id396951-180
Разбор программы Цветные шарики :
http://annimon.com/forum/id396951-180
или
http://4pda.ru/forum/index.php?showtopic=319131&st=20
Есть хороший форум Игроделов - http://gcup.ru/forum/64-0-1
Рекомендую!
1961uvg
> Gr.oval wink[1], 200, 200, 400, 400
> gr.modify wink[1], "paint", black
> Gr.oval wink[2], 200,220, 400, 380
> gr.modify wink[2], "paint", white
> Gr.oval wink[3], 200,240, 400, 360
> gr.modify wink[3], "paint", white
> Gr.oval wink[4], 200, 260, 400, 340
> gr.modify wink[4], "paint", white
Жесть. Код уровня того говна что мы писали в 9 классе на уроках программирования. Что это за школьная поделка?
Есть люди которые все знают и им это не интересно.
А есть люди которые это не знают и им это интересно.
Вопрос : что больше другого места не нашлось чтобы нагадить?