atari-home.de - Foren

Software => Coding => Thema gestartet von: Omikronman am Mo 21.06.2010, 23:00:23

Titel: Kleines Demo in Future Basic (Mac)
Beitrag von: Omikronman am Mo 21.06.2010, 23:00:23
Hallo,

ich habe ein kleines Demo für dem Mac gebastelt.
Die Musik ist aber nur aus der YouTube Trickkiste.
http://www.youtube.com/watch?v=zAXoNwmruK8 (http://www.youtube.com/watch?v=zAXoNwmruK8)

Euer Omi
Titel: Re: Kleines Demo in Future Basic (Mac)
Beitrag von: Arthur am Mo 21.06.2010, 23:10:45
Hei Omi, interessant die Demo. Wieviel Codezeilen waren das jetzt und ist die Music auch im Programm erzeugt worden?

Gruß Arthur
Titel: Kleines Demo in Future Basic (Mac)
Beitrag von: Omikronman am Mo 21.06.2010, 23:21:31
Hallo Arthur,

das Demo hat weniger als 70 Zeilen. Ich füge den Quellcode noch bei (gif in zip umbenennen und auspacken). Die Musik ist nicht im Programm drin (da gibt es noch Probleme), daher hab ich für die Musik die Option von YouTube genutzt.

Grüße, Omi
Titel: Re: Kleines Demo in Future Basic (Mac)
Beitrag von: Arthur am Mi 23.06.2010, 22:59:00
Ich zeigs mal so... ;) Schleifen ohne Ende. Mal schauen wer das als erstes an GFA - oder Omikron - Basic anpasst.


dim as long f(1201,701),n(1201,701),x,y,n,a,b,g,a$
def fn test
def fn aktiv
def fn rise
def fn newcells
 
window 2, "Life",(0,0)-(1200,700),1
maxwindow 1200,700
minwindow 1200,700
cls

for a=450 to 750
for b=200 to 500
f(a,b)=1
next
next

for y=1 to 700
for x=1 to 1200
color=7
if f(x,y)=0 then color=0
plot x,y
next
next

"Loop"
g+=1
print @ (1,1),g

if rnd(250-5+1)+5-1=250 then fn newcells

"jmp"
for y=1 to 700
for x=1 to 1200
if f(x,y)=1 then fn rise
next
next

for y=1 to 700
for x=1 to 1200
if f(x,y)=0 and n(x,y)<>3 then n(x,y)=0:goto "ok"
if f(x,y)=0 and n(x,y)=3 then n(x,y)=1:goto "ok"
if f(x,y)=1 and n(x,y)<2 then n(x,y)=0:goto "ok"
if f(x,y)=1 and n(x,y)>3 then n(x,y)=0:goto "ok"
if f(x,y)=1 and n(x,y)>=2 and n(x,y)<=3 then n(x,y)=1
 
"ok"
if f(x,y)<>n(x,y) and n(x,y)=0 then color=0:plot x,y
if f(x,y)<>n(x,y) and n(x,y)=1 then color=7:plot x,y

f(x,y)=n(x,y):n(x,y)=0
next
next
 
a$=inkey$:if a$=chr$(32) then end

rem flushwindowbuffer
goto "loop"

local fn rise
n(x-1,y-1)+=1
n(x,y-1)+=1
n(x+1,y-1)+=1
n(x-1,y)+=1
n(x+1,y)+=1
n(x-1,y+1)+=1
n(x,y+1)+=1
n(x+1,y+1)+=1
end fn

local fn newcells
for a=300 to 400
for b=550 to 650
f(b,a)=1
next
next

for y=1 to 700
for x=1 to 1200
color=7
if f(x,y)=0 then color=0
plot x,y
next
next
'flushwindowbuffer
end fn
Titel: >OMIKRON BASIC: Kleines Demo in Future Basic (Mac)
Beitrag von: Omikronman am Do 24.06.2010, 18:24:06
Frag Omi! xD

Sowas ähnliches hab ich doch für den Atari auch mal gemacht:

http://www.youtube.com/watch?v=-gCsSwFxpM4 (http://www.youtube.com/watch?v=-gCsSwFxpM4)

Edit: Wieso bekomme ich von atari-home keine Nachricht über die Antwort im Forum? O.o