Frohes neues Jahr - 2016
Frohes neues Jahr - 2016
Hi meine lieben,
ich wünsche euch ein frohes neues Jahr. Feliz año nuevo! Feiert schön.
ich wünsche euch ein frohes neues Jahr. Feliz año nuevo! Feiert schön.
- Imhotheb
- Beiträge: 192
- Registriert: 10.10.2014 13:14
- Computerausstattung: Intel 8086, 640 KB RAM, Hercules Video Adapter, 2 x 5 1/4" 360kb Floppy, MS-DOS 3
- Wohnort: Wolfenbüttel
Re: Frohes neues Jahr - 2016
Ein frohes neues Jahr euch allen
weil einfach einfach einfach ist ... mach' ich es anders
Re: Frohes neues Jahr - 2016
Von mir auch ein Frohes neues Jahr
Alles ist möglich, fragt sich nur wie...
Projekte ThreadToGUI / EventDesigner V3 / OOP-BaseClass-Modul
Downloads auf MyWebspace / OneDrive
Projekte ThreadToGUI / EventDesigner V3 / OOP-BaseClass-Modul
Downloads auf MyWebspace / OneDrive
Re: AW: Frohes neues Jahr - 2016
Ein frohes neues Jahr und alles Gute vom Frosch.
"Never run a changing system!" | "Unterhalten sich zwei Alleinunterhalter... Paradox, oder?"
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520
Useralter in 2024: 56 Jahre.
PB 6.02 x64, OS: Win 7 Pro x64 & Win 11 x64, Desktopscaling: 125%, CPU: I7 6500, RAM: 16 GB, GPU: Intel Graphics HD 520
Useralter in 2024: 56 Jahre.
Re: Frohes neues Jahr - 2016
Code: Alles auswählen
EnableExplicit
InitSprite()
Structure Vector
X.f
Y.f
EndStructure
Structure Spark
Position.Vector
Velocity.Vector
Time.i
Color.i
Blink.i
Weight.i
EndStructure
Structure Bullet
Position.Vector
Velocity.Vector
Time.i
Color.i
Weight.i
Type.i
EndStructure
Global NewList Bullet.Bullet()
Global NewList Spark.Spark()
Enumeration
#Window
EndEnumeration
OpenWindow(#Window, 0, 0, 1200, 800, "ScreenTitle", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(#Window), 0, 0, WindowWidth(#Window), WindowHeight(#Window), 0, 0, 0)
RandomSeed(4)
Define Time.i, OldTime.i, TimeFactor.f, Length.f, I.i, Angle.f, Radius.f, Factor.f, *Spark.Spark
Repeat
Repeat
Select WindowEvent()
Case #PB_Event_CloseWindow
End
Case #PB_Event_None
Break
EndSelect
ForEver
ClearScreen(0)
Time = ElapsedMilliseconds()
TimeFactor = (Time-OldTime)*0.001
OldTime = Time
StartDrawing(ScreenOutput())
ForEach Spark()
Spark()\Position\X + Spark()\Velocity\X*TimeFactor
Spark()\Position\Y + Spark()\Velocity\Y*TimeFactor
Spark()\Velocity\Y + 98.1*TimeFactor
If Time > Spark()\Time-250
Factor = (Spark()\Time-Time)/250.
Else
Factor = 1.0
EndIf
If Spark()\Weight Or Spark()\Blink
Circle(Spark()\Position\X, Spark()\Position\Y, Spark()\Blink+Sqr(Spark()\Weight/100), RGB(Red(Spark()\Color)*(Factor*0.5+0.5), Green(Spark()\Color)*(Factor*0.5+0.5), Blue(Spark()\Color)*(Factor*0.5+0.5)))
Else
Line(Spark()\Position\X, Spark()\Position\Y, 1, 1, RGB(Red(Spark()\Color)*Factor, Green(Spark()\Color)*Factor, Blue(Spark()\Color)*Factor))
EndIf
If Spark()\Blink
*Spark = Spark()
Angle = Radian(Random(3600)/10.)
Radius = Sqr(Random(1000)/1000.)*10
AddElement(Spark())
Spark()\Position = *Spark\Position
;Spark()\Velocity = *Spark\Velocity
Spark()\Velocity\X + Cos(Angle)*Radius
Spark()\Velocity\Y + Sin(Angle)*Radius
Spark()\Color = $40B0F0 + (Random($F)|Random($F)<<8|Random($F)<<16)
Spark()\Time = Time + 250 + Random(250)
ChangeCurrentElement(Spark(), *Spark)
EndIf
If Time > Spark()\Time
If Spark()\Weight
*Spark = Spark()
For I = 1 To *Spark\Weight
Angle = Radian(Random(3600)/10.)
Radius = Sqr(Random(1000)/1000.)*40+10
AddElement(Spark())
Spark()\Position = *Spark\Position
Spark()\Velocity = *Spark\Velocity
Spark()\Velocity\X + Cos(Angle)*Radius
Spark()\Velocity\Y + Sin(Angle)*Radius
Spark()\Color = $40B0F0 + (Random($F)|Random($F)<<8|Random($F)<<16)
Spark()\Time = Time + 250 + Random(250)
Next
ChangeCurrentElement(Spark(), *Spark)
EndIf
DeleteElement(Spark())
EndIf
Next
ForEach Bullet()
Bullet()\Position\X + Bullet()\Velocity\X*TimeFactor
Bullet()\Position\Y + Bullet()\Velocity\Y*TimeFactor
Bullet()\Velocity\Y + 98.1*TimeFactor
Length = Sqr(Bullet()\Velocity\X*Bullet()\Velocity\X+Bullet()\Velocity\Y*Bullet()\Velocity\Y)
Circle(Bullet()\Position\X, Bullet()\Position\Y, 1+Sqr(Bullet()\Weight/100), $C0C0C0)
LineXY(Bullet()\Position\X, Bullet()\Position\Y, Bullet()\Position\X-Bullet()\Velocity\X*20/Length, Bullet()\Position\Y-Bullet()\Velocity\Y*20/Length, $808080)
If Bullet()\Time < Time
Select Bullet()\Type
Case 0
For I = 1 To Bullet()\Weight
Angle = Radian(Random(3600)/10.)
Radius = Pow(Random(1000)/1000., 0.25)*Sqr(Bullet()\Weight)*5
AddElement(Spark())
Spark()\Position = Bullet()\Position
Spark()\Velocity = Bullet()\Velocity
Spark()\Velocity\X + Cos(Angle)*Radius
Spark()\Velocity\Y + Sin(Angle)*Radius
Spark()\Color = Bullet()\Color + (Random($F)|Random($F)<<8|Random($F)<<16)
Spark()\Time = Time + 1000 + Random(1000)
Next
Case 1
For I = 1 To Bullet()\Weight/10
Angle = Radian(Random(3600)/10.)
Radius = Sqr(Random(1000)/1000.)*Sqr(Bullet()\Weight)*5
AddElement(Spark())
Spark()\Position = Bullet()\Position
Spark()\Velocity = Bullet()\Velocity
Spark()\Velocity\X + Cos(Angle)*Radius
Spark()\Velocity\Y + Sin(Angle)*Radius
Spark()\Color = Bullet()\Color + (Random($F)|Random($F)<<8|Random($F)<<16)
Spark()\Time = Time + 500 + Random(500)
Spark()\Weight = 50
Next
Case 2
For I = 1 To Bullet()\Weight/10
Angle = Radian(Random(3600)/10.)
Radius = Sqr(Random(1000)/1000.)*Sqr(Bullet()\Weight)*5
AddElement(Spark())
Spark()\Position = Bullet()\Position
Spark()\Velocity = Bullet()\Velocity
Spark()\Velocity\X + Cos(Angle)*Radius
Spark()\Velocity\Y + Sin(Angle)*Radius
Spark()\Color = Bullet()\Color + (Random($F)|Random($F)<<8|Random($F)<<16)
Spark()\Time = Time + 2500 + Random(500)
Spark()\Blink = #True
Next
EndSelect
DeleteElement(Bullet())
ElseIf Random(1) = 0
Radius = Random(50)+50
Angle = Radian(Random(100)/10.-5) + ATan2(Bullet()\Velocity\X, Bullet()\Velocity\Y)
AddElement(Spark())
Spark()\Position = Bullet()\Position
Spark()\Velocity = Bullet()\Velocity
Spark()\Velocity\X - Cos(Angle)*Radius
Spark()\Velocity\Y - Sin(Angle)*Radius
Spark()\Color = $40B0F0 + (Random($F)|Random($F)<<8|Random($F)<<16)
Spark()\Time = Time + 1000 + Random(1000)
EndIf
Next
If Random(20) = 0
Angle = Radian(Random(400)/10.+250)
AddElement(Bullet())
Bullet()\Position\X = ScreenWidth()/2 - 100 + Random(200)
Bullet()\Position\Y = ScreenHeight()
Bullet()\Velocity\X = Cos(Angle)*350
Bullet()\Velocity\Y = Sin(Angle)*350
Bullet()\Color = PeekI(?Color+Random(5)*SizeOf(Integer))
Bullet()\Time = Time + 2000 + Random(500)
Bullet()\Weight = 100+Random(800)
Bullet()\Type = Random(2)
EndIf
StopDrawing()
FlipBuffers()
ForEver
DataSection
Color:
Data.i $4060F0, $00F040, $F08040, $00D0F0, $F040C0, $F0F0F0
EndDataSection
Zuletzt geändert von STARGÅTE am 01.01.2016 16:28, insgesamt 3-mal geändert.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Aktuelles Projekt: Lizard - Skriptsprache für symbolische Berechnungen und mehr
Re: Frohes neues Jahr - 2016
@STARGÅTE
Nice
Nice
Re: Frohes neues Jahr - 2016
Ich wünsche Euch auch ein gutes neues Jahr.
PureBasic Linux-API-Library: http://www.chabba.de
- ts-soft
- Beiträge: 22292
- Registriert: 08.09.2004 00:57
- Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel - Wohnort: Berlin
Re: Frohes neues Jahr - 2016
Von mir auch ein schönes neues Jahr!
@STARGÅTE
Cool!
Unter Linux kommt leider ein IMA in WindowEvent(), aber unter Windows läuft es einwandfrei. Schätze mal ein Bug in Linux
und nicht in Deinem Code.
@STARGÅTE
Cool!
Unter Linux kommt leider ein IMA in WindowEvent(), aber unter Windows läuft es einwandfrei. Schätze mal ein Bug in Linux
und nicht in Deinem Code.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Re: Frohes neues Jahr - 2016
So, hoffentlich sind alle gut durchgekommen. Ich wünsche euch allen viel Erfolg und Gesundheit fürs neue Jahr.
@STARGÅTE: Immer wieder verblüffend, was mit so wenig Code möglich ist. Echt klasse gemacht!
@ts-soft: Bei mir läuft es unter Linux mit PB_5.41_x64 ohne Probleme. Edit: Ok, wenn man das Fenster verschieben möchte oder wenn das Fenster den Fokus verliert, kommt der von ts-soft besagte Fehler.
@STARGÅTE: Immer wieder verblüffend, was mit so wenig Code möglich ist. Echt klasse gemacht!
@ts-soft: Bei mir läuft es unter Linux mit PB_5.41_x64 ohne Probleme. Edit: Ok, wenn man das Fenster verschieben möchte oder wenn das Fenster den Fokus verliert, kommt der von ts-soft besagte Fehler.
Warum OpenSource eine Lizenz haben sollte :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (Syntax-Farbschema) :: RegEx-Engine (kompiliert RegExes zu NFA/DFA)
Manjaro Xfce x64 (Hauptsystem) :: Windows 10 Home (VirtualBox) :: Neueste PureBasic-Version