BB2D 3D Achterbahn.
Übersicht

![]() |
KabelbinderSieger des WM-Contest 2006Betreff: BB2D 3D Achterbahn. |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi
Mir ist heute im Matheunterricht so ne Ideegekommen, als wir über Funktionen gesprochen haben. Hat auch so geklapp, wie ich mir das vorgestellt hab ![]() Vielleicht kann man dauraus so ne Art Rennspiel machen ![]() hier der Code: Code: [AUSKLAPPEN] AppTitle "Graph Racer"
Graphics 640,480,16,2 SetBuffer BackBuffer() SeedRnd MilliSecs() Global bend#,dir#,stat,scroll,brace,control,mx,my bend = -0.25 scroll = 0 stat = 0 dir = 0 brace = 1 MoveMouse 320,240 Repeat mx = MouseX() my = MouseY() If KeyHit(57)=1 Then brace = Not brace EndIf ;autosteuerung bend = bend - 0.01 * (Sgn(dir)*(Abs(dir)/5)) scroll = scroll + 5 * (Sgn(dir)*(Abs(dir)/5)) ;maussteuerung ;control = MouseXSpeed() ;bend = bend - 0.01 * (Sgn(control)*(Abs(control)/5)) ;scroll = scroll + 5 * (Sgn(control)*(Abs(control)/5)) dir = dir + Rand(-1,1) dir = dir + bend/4 dir = dir * 0.98 If stat >= 20 Then stat = 0 Else stat = stat + 2 EndIf Color 0,255,0 For i = 0 To 440 Plot 320+i*bend+scroll,40+(i^2)/400 Plot 320+i*(bend+0.5)+scroll,40+(i^2)/400 If i Mod 20 = 0 Then Line 320+(i+stat)*bend+scroll,40+((i+stat)^2)/400,320+(i+stat)*(bend+0.5)+scroll,40+((i+stat)^2)/400 If brace = 1 Then If bend > 0 Then Rect 320+(i+stat)*bend+scroll,40+((i+stat)^2)/400,1,500 EndIf If bend < -0.5 Then Rect 320+(i+stat)*(bend+0.5)+scroll,40+((i+stat)^2)/400,1,500 EndIf EndIf EndIf Next Color 255,255,255 Text 0,0,bend,0,0 Text 0,10,scroll,0,0 Text 0,20,dir,0,0 Text 0,30,Str$(Abs(dir)/5),0,0 Color 255,0,0 Text 400,0,"Leertaste: Stützen ausblenden" Flip Cls Until KeyHit(1) End thx for reading cu |
||
<Wing Avenger Download> ◊◊◊ <Macrophage Download> |
![]() |
theotheoderich |
![]() Antworten mit Zitat ![]() |
---|---|---|
Das ist ja spassig, erinnert irgendwie an Stund-Car-Racer auf dem C64 ![]() |
||
Gruß
TheoTheoderich -- The box label said, "Requires Windows XP or better.", so I bought an Amiga Computer. |
TOONY |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ist interessant, aber eine achterbahn seh ich da nicht | ||
![]() |
KabelbinderSieger des WM-Contest 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Ja, stimmt eigentlich. Ich hab's im Nachhinein so genannt, damit sich's mehr Leute ansehen ![]() |
||
<Wing Avenger Download> ◊◊◊ <Macrophage Download> |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group