Wenn der Ball nach oben hüpft und zu weit oben ist kommt "sie sind hinabgestürzt", zudem würde ich das Feld wie bei DoodleJump am Spieler, nicht autoslide, ausrichten.
MfG
Beiträge von Xorianator
-
-
Oh, nen herzlichen nachträglich du Minecraft Nachwuchs

-
-
Hallo AutoIt Community,
[autoit]
eine etwas andere Frage mal von mir.
Man kann Programme ja mit Startoptionen starten, sei es ein Beispiel:ShellExecute("MeinProgramm", "+Startoption1")
[/autoit]
[autoit]
Wie kann ich so eine Startoption reinfügen, also Pseudoscript:If $Startoption = "Startoption1" Then
[/autoit]
MfG Mattthias -
Ja gut es geht um eine Seite für AutoIt, kann man auch falsch verstehen, Darter; nicht weinen

-
Es gibt doch bereits die AutoIt Wiki !
http://wiki.autoit.de/ -
-
Ich könnte dir die Objekte in Cinema 4D nachmodellieren, wie du sie einbindest - Bereichere dich mit Wissen, ich weiß es nicht

PS: Da ich ein iPhone besitze, zufällig auch das Spiel (Jailbreak FTW) habe ich das original vor mir -
-
@Threadersteller
-> Das Bild ist von: Mattthias ; nicht EliteMatthias ; bitte um Korrektur ! -
Und so erkämpft sich Minecraft Platz Nummer 3 !
Wie man unter craftern so sagt - Notch is epic - AutoIt ist noch epischer ! -
Na mensch BB aber da hätten noch n paar Partikel oder sowas reinkommen können
-
Ich hab eh Nr 5 genommen, von wem auch immer es ist

-
Ich hab die Nr 5 genommen, das war das für mich am originellsten wirkende

Nr 2 sieht stark nach Blender / C4D aus
@BB, wie willst du es überprüfen ? -
Du liegst im Recht, Sprenger, allerdings muss "is" weg

Coole UDF -
Ich habe es mal "Idiotensicher" gemacht und jetzt eine Font-Abfrage reingebaut, ich mach sie demnächst mal "speziefischer" ...
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstants.au3>
#include <GDIPlus.au3>
#include "VectorMath.au3"
#include <Misc.au3>
#include <WinAPI.au3>
#include <Array.au3>; - Author: name22(http://www.autoit.de)
[/autoit] [autoit][/autoit] [autoit]Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]
If IniRead(@ScriptDir & "\font.ini", "Font", "Font", "NO") = "NO" Then
Global $SelectFont = InputBox("Font", "Type in which font you would" & @CRLF & "use in this game.")
IniWrite(@ScriptDir & "\font.ini", "Font", "Font", $SelectFont)
ElseIf IniRead(@ScriptDir & "\font.ini", "Font", "Font", "NO") <> "NO" Then
$SelectFont = IniRead(@ScriptDir & "\font.ini", "Font", "Font", "NO")
EndIf
$iGUIWidth = 600
$iGUIHeight = 400
$nFPS = 50$nSlowMotion = 5
[/autoit] [autoit][/autoit] [autoit]$nFriction = 0.98
[/autoit] [autoit][/autoit] [autoit]$nPlayerSpeedMax = 200
[/autoit] [autoit][/autoit] [autoit]
$nAccelerationForce = 10$nProjectileSpeedPlayer = 500
[/autoit] [autoit][/autoit] [autoit]
$iCoolDownPlayer = 200$nSlowMotionFuelMax = 100
[/autoit] [autoit][/autoit] [autoit]
$nSlowMotionFuel = 100
$nSlowMotionRefillSpeed = 8
$nSlowMotionConsumptionSpeed = 20$nLifeForcePlayer = 60
[/autoit] [autoit][/autoit] [autoit]
$nHealthRegenSpeed = 1$nDisplayWave = 3000
[/autoit] [autoit][/autoit] [autoit]$nSleepTime = 1000 / $nFPS
[/autoit] [autoit][/autoit] [autoit]
$nOffsetSleepTime = 0$nFPS_Display = 0
[/autoit] [autoit][/autoit] [autoit]
$nFPS_Average = 0
$iCounter = 1
$iWaveCounter = 1$bNewGame = True
[/autoit] [autoit][/autoit] [autoit]
$bNewWave = TrueGlobal $hBitmapBG
[/autoit] [autoit][/autoit] [autoit]
Global $pause = False$nTimeMod = 1
[/autoit] [autoit][/autoit] [autoit]$vUser32Dll = DllOpen("User32.dll")
[/autoit] [autoit][/autoit] [autoit]
$vNTdll = DllOpen("ntdll.dll")$tRectBorder = DllStructCreate($tagRECT)
[/autoit] [autoit][/autoit] [autoit]
$tPoint = DllStructCreate($tagPOINT)
DllStructSetData($tRectBorder, "Left", 0)
DllStructSetData($tRectBorder, "Top", 0)
DllStructSetData($tRectBorder, "Right", $iGUIWidth)
DllStructSetData($tRectBorder, "Bottom", $iGUIHeight)$tPrecSleep = DllStructCreate("int64 time;")
[/autoit] [autoit][/autoit] [autoit]
$pPrecSleep = DllStructGetPtr($tPrecSleep)$hWnd = GUICreate("AutoIt Arena Fight v1.0 - Author: name22(http://www.autoit.de)", $iGUIWidth, $iGUIHeight)
[/autoit] [autoit][/autoit] [autoit]
GUISetCursor(16, 1, $hWnd)
GUISetState()$hDC = _WinAPI_GetDC($hWnd)
[/autoit] [autoit][/autoit] [autoit]
$hCDC_Buffer = _WinAPI_CreateCompatibleDC($hDC)
$hGDI_Bitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iGUIWidth, $iGUIHeight)
_WinAPI_SelectObject($hCDC_Buffer, $hGDI_Bitmap)_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHDC($hCDC_Buffer)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2)
_GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)_WinAPI_BitBlt($hDC, 0, 0, $iGUIWidth, $iGUIHeight, $hCDC_Buffer, 0, 0, 0x00CC0020)
[/autoit] [autoit][/autoit] [autoit]$hBrush_Enemy = _GDIPlus_BrushCreateSolid(0xFFFF0000)
[/autoit] [autoit][/autoit] [autoit]
$hBrush_Player = _GDIPlus_BrushCreateSolid(0xFF0000FF)
$hBrush_FPS = _GDIPlus_BrushCreateSolid(0xFF000000)
$hBrush_BG_Menu = _GDIPlus_BrushCreateSolid("0x" & Hex(200, 2) & "F0F0F0")
$hBrush_ProjectileBG = _GDIPlus_BrushCreateSolid(0xFF000000)
$hBrush_MenuTextNormal = _GDIPlus_BrushCreateSolid(0xFF000000)
$hBrush_MenuTextHighlight = _GDIPlus_BrushCreateSolid(0xFF808080)
$hBrush_LifeBar = _GDIPlus_BrushCreateSolid(0xFFFF0000)
$hBrush_SlowMotionBar = _GDIPlus_BrushCreateSolid(0xFF0000FF)
$hBrush_Announcement = _GDIPlus_BrushCreateSolid("0x" & Hex(200, 2) & "000000")$hPen_Bar = _GDIPlus_PenCreate(0xFF000000, 2)
[/autoit] [autoit][/autoit] [autoit]
$hPen_Cursor = _GDIPlus_PenCreate(0xFF505050, 2)$hStringFormat = _GDIPlus_StringFormatCreate()
[/autoit] [autoit][/autoit] [autoit]
$hFamily_SegoeUI = _GDIPlus_FontFamilyCreate($SelectFont)
$hFont_FPS = _GDIPlus_FontCreate($hFamily_SegoeUI, 7)
$hFont_Menu = _GDIPlus_FontCreate($hFamily_SegoeUI, 20)
$hFont_Announcement = _GDIPlus_FontCreate($hFamily_SegoeUI, 50)$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, "FPS 000", $hFont_FPS, _GDIPlus_RectFCreate(), $hStringFormat)
[/autoit] [autoit][/autoit] [autoit]
$tLayout_FPS = $aMeasure[0]
$aMeasure = ""
DllStructSetData($tLayout_FPS, "X", $iGUIWidth - DllStructGetData($tLayout_FPS, "Width") - 3)
DllStructSetData($tLayout_FPS, "Y", $iGUIHeight - DllStructGetData($tLayout_FPS, "Height"))
DllStructSetData($tLayout_FPS, "Width", DllStructGetData($tLayout_FPS, "Width") + 3)$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, "Continue", $hFont_Menu, _GDIPlus_RectFCreate(0, 100), $hStringFormat)
[/autoit] [autoit][/autoit] [autoit]
$tLayout_Menu_Continue = $aMeasure[0]
$aMeasure = ""
DllStructSetData($tLayout_Menu_Continue, "X", $iGUIWidth / 2 - DllStructGetData($tLayout_Menu_Continue, "Width") / 2)
DllStructSetData($tLayout_Menu_Continue, "Width", DllStructGetData($tLayout_Menu_Continue, "Width") + 1)$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, "Start", $hFont_Menu, _GDIPlus_RectFCreate(0, 100), $hStringFormat)
[/autoit] [autoit][/autoit] [autoit]
$tLayout_Menu_Start = $aMeasure[0]
$aMeasure = ""
DllStructSetData($tLayout_Menu_Start, "X", $iGUIWidth / 2 - DllStructGetData($tLayout_Menu_Start, "Width") / 2)
DllStructSetData($tLayout_Menu_Start, "Width", DllStructGetData($tLayout_Menu_Start, "Width") + 1)$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, "Quit", $hFont_Menu, _GDIPlus_RectFCreate(0, 150), $hStringFormat)
[/autoit] [autoit][/autoit] [autoit]
$tLayout_Menu_Quit = $aMeasure[0]
$aMeasure = ""
DllStructSetData($tLayout_Menu_Quit, "X", $iGUIWidth / 2 - DllStructGetData($tLayout_Menu_Quit, "Width") / 2)
DllStructSetData($tLayout_Menu_Quit, "Width", DllStructGetData($tLayout_Menu_Quit, "Width") + 1)$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, "Wave 1", $hFont_Announcement, _GDIPlus_RectFCreate(), $hStringFormat)
[/autoit] [autoit][/autoit] [autoit]
$tLayout_Announcement = $aMeasure[0]
$aMeasure = ""
DllStructSetData($tLayout_Announcement, "X", $iGUIWidth / 2 - DllStructGetData($tLayout_Announcement, "Width") / 2)
DllStructSetData($tLayout_Announcement, "Y", $iGUIHeight / 2 - DllStructGetData($tLayout_Announcement, "Height") / 2)
DllStructSetData($tLayout_Announcement, "Width", 0)
DllStructSetData($tLayout_Announcement, "Height", 0)$nX_PlayerPos = Random(10, $iGUIWidth - 10)
[/autoit] [autoit][/autoit] [autoit]
$nY_PlayerPos = Random(10, $iGUIHeight - 10)
$nX_PlayerSpeed = 0
$nY_PlayerSpeed = 0
$nLifeForce = $nLifeForcePlayerGlobal $aEnemys[1][6] = [[0]], $aProjectiles[1][6] = [[0]], $aAccelForce = _Vector_Create(0, 0), $nProjectileSpeedEnemy
[/autoit] [autoit][/autoit] [autoit]GUISetOnEvent($GUI_EVENT_CLOSE, "_Close", $hWnd)
[/autoit] [autoit][/autoit] [autoit]_Pause()
[/autoit] [autoit][/autoit] [autoit]
$bNewGame = False$nT_CoolDown = TimerInit()
[/autoit] [autoit][/autoit] [autoit]
$nT_DisplayWave = TimerInit()
$nRestartCheck = 0$nT_Sleep = TimerInit() + $nSleepTime
[/autoit] [autoit][/autoit] [autoit]
$nT_UpdateFPS = TimerInit()
$nT_AdjustSleepTime = TimerInit()While True
[/autoit] [autoit][/autoit] [autoit]
_istPause()
If $pause == False Then
DllStructSetData($tPrecSleep, "time", -10000 * ($nSleepTime - TimerDiff($nT_Sleep) + $nOffsetSleepTime))
DllCall($vNTdll, "dword", "ZwDelayExecution", "int", 0, "ptr", $pPrecSleep)
$nFrameTime = TimerDiff($nT_Sleep)
$nT_Sleep = TimerInit()$nFPS_Cur = 1000 / $nFrameTime
[/autoit] [autoit][/autoit] [autoit]
If TimerDiff($nT_UpdateFPS) >= 500 Then
$nFPS_Average = ($nFPS_Average * ($iCounter - 1) + $nFPS_Cur) / $iCounter
$iCounter += 1
$nFPS_Display = $nFPS_Cur
$nT_UpdateFPS = TimerInit()
EndIf
If TimerDiff($nT_AdjustSleepTime) >= 5000 Then
If $nFPS_Average - $nFPS < -2 Then $nOffsetSleepTime -= 0.5
If $nFPS_Average - $nFPS > 2 Then $nOffsetSleepTime += 0.5
$iCounter = 1
$nT_AdjustSleepTime = TimerInit()
EndIfSwitch _IsPressed("20", $vUser32Dll)
[/autoit] [autoit][/autoit] [autoit]
Case True
Switch $nTimeMod
Case 1
If $nSlowMotionFuel >= 10 Then
$nTimeMod = $nSlowMotion
$nSlowMotionFuel -= $nSlowMotionConsumptionSpeed / $nFPS_Cur
EndIf
Case $nSlowMotion
If $nSlowMotionFuel > 0 Then
$nSlowMotionFuel -= $nSlowMotionConsumptionSpeed / $nFPS_Cur
Else
$nTimeMod = 1
EndIf
EndSwitch
Case False
$nTimeMod = 1
EndSwitch$nFPS_Cur *= $nTimeMod
[/autoit] [autoit][/autoit] [autoit]Select
[/autoit] [autoit][/autoit] [autoit]
Case $nLifeForce >= 1 And $nLifeForce < $nLifeForcePlayer
$nLifeForce += $nHealthRegenSpeed / $nFPS_Cur
Case $nLifeForce > $nLifeForcePlayer
$nLifeForce = $nLifeForcePlayer
Case $nLifeForce <= 0
$iWaveCounter = 1
$bNewWave = True
$bNewGame = True
_Pause()
$bNewGame = False
_Restart()
EndSelectSelect
[/autoit] [autoit][/autoit] [autoit]
Case $nSlowMotionFuel >= 0 And $nSlowMotionFuel < $nSlowMotionFuelMax
$nSlowMotionFuel += $nSlowMotionRefillSpeed / $nFPS_Cur
Case $nSlowMotionFuel > $nSlowMotionFuelMax
$nSlowMotionFuel = $nSlowMotionFuelMax
Case $nSlowMotionFuel < 0
$nSlowMotionFuel = 0
EndSelect$aCursorInfo = GUIGetCursorInfo($hWnd)
[/autoit] [autoit][/autoit] [autoit]
If $aCursorInfo[2] And TimerDiff($nT_CoolDown) >= $iCoolDownPlayer * $nTimeMod Then
$aProjectiles[0][0] += 1
ReDim $aProjectiles[$aProjectiles[0][0] + 1][6]$aDiff = _Vector_Create($aCursorInfo[0] - $nX_PlayerPos, $aCursorInfo[1] - $nY_PlayerPos)
[/autoit] [autoit][/autoit] [autoit]
$aDirection = _Vector_Normalize($aDiff)$aProjectiles[$aProjectiles[0][0]][0] = $nX_PlayerPos
[/autoit] [autoit][/autoit] [autoit]
$aProjectiles[$aProjectiles[0][0]][1] = $nY_PlayerPos
$aProjectiles[$aProjectiles[0][0]][2] = $aDirection[0] * $nProjectileSpeedPlayer
$aProjectiles[$aProjectiles[0][0]][3] = $aDirection[1] * $nProjectileSpeedPlayer
$aProjectiles[$aProjectiles[0][0]][4] = 8
$aProjectiles[$aProjectiles[0][0]][5] = 1$nT_CoolDown = TimerInit()
[/autoit] [autoit][/autoit] [autoit]
EndIf$aAccelForce[0] = 0
[/autoit] [autoit][/autoit] [autoit]
$aAccelForce[1] = 0If _IsPressed("25", $vUser32Dll) Or _IsPressed("41", $vUser32Dll) And Sqrt($nX_PlayerSpeed ^ 2 + $nY_PlayerSpeed ^ 2) < $nPlayerSpeedMax Then $aAccelForce[0] = -1
[/autoit] [autoit][/autoit] [autoit]
If _IsPressed("26", $vUser32Dll) Or _IsPressed("57", $vUser32Dll) And Sqrt($nX_PlayerSpeed ^ 2 + $nY_PlayerSpeed ^ 2) < $nPlayerSpeedMax Then $aAccelForce[1] = -1
If _IsPressed("27", $vUser32Dll) Or _IsPressed("44", $vUser32Dll) And Sqrt($nX_PlayerSpeed ^ 2 + $nY_PlayerSpeed ^ 2) < $nPlayerSpeedMax Then $aAccelForce[0] = 1
If _IsPressed("28", $vUser32Dll) Or _IsPressed("53", $vUser32Dll) And Sqrt($nX_PlayerSpeed ^ 2 + $nY_PlayerSpeed ^ 2) < $nPlayerSpeedMax Then $aAccelForce[1] = 1$aAccelDirection = _Vector_Normalize($aAccelForce)
[/autoit] [autoit][/autoit] [autoit]
$nX_PlayerSpeed += $aAccelDirection[0] * $nAccelerationForce
$nY_PlayerSpeed += $aAccelDirection[1] * $nAccelerationForce$nX_PlayerSpeed *= $nFriction
[/autoit] [autoit][/autoit] [autoit]
$nY_PlayerSpeed *= $nFriction
$nX_PlayerPos += $nX_PlayerSpeed / $nFPS_Cur
$nY_PlayerPos += $nY_PlayerSpeed / $nFPS_CurIf $nX_PlayerPos - 10 <= 0 And $nX_PlayerSpeed < 0 Then
[/autoit] [autoit][/autoit] [autoit]
$nX_PlayerSpeed *= -1
$nX_PlayerPos = 10
EndIf
If $nX_PlayerPos + 10 >= $iGUIWidth And $nX_PlayerSpeed > 0 Then
$nX_PlayerSpeed *= -1
$nX_PlayerPos = $iGUIWidth - 10
EndIf
If $nY_PlayerPos - 10 <= 0 And $nY_PlayerSpeed < 0 Then
$nY_PlayerSpeed *= -1
$nY_PlayerPos = 10
EndIf
If $nY_PlayerPos + 10 >= $iGUIHeight And $nY_PlayerSpeed > 0 Then
$nY_PlayerSpeed *= -1
$nY_PlayerPos = $iGUIHeight - 10
EndIf_GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)
[/autoit] [autoit][/autoit] [autoit]
Switch TimerDiff($nT_DisplayWave) < $nDisplayWave
Case True
Switch $bNewWave
Case True
$nLifeForce = $nLifeForcePlayer
Dim $aProjectiles[1][6] = [[0]]
$aMeasure = _GDIPlus_GraphicsMeasureString($hGraphic, "Wave 1", $hFont_Announcement, _GDIPlus_RectFCreate(), $hStringFormat)
$tLayout_Announcement = $aMeasure[0]
$aMeasure = ""
DllStructSetData($tLayout_Announcement, "X", $iGUIWidth / 2 - DllStructGetData($tLayout_Announcement, "Width") / 2)
DllStructSetData($tLayout_Announcement, "Y", $iGUIHeight / 2 - DllStructGetData($tLayout_Announcement, "Height") / 2)
DllStructSetData($tLayout_Announcement, "Width", 0)
DllStructSetData($tLayout_Announcement, "Height", 0)
$bNewWave = False
EndSwitch
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Wave " & $iWaveCounter, $hFont_Announcement, $tLayout_Announcement, $hStringFormat, $hBrush_Announcement)
Case False
If $nRestartCheck < $nT_DisplayWave Then
_Restart()
$nRestartCheck = $nT_DisplayWave
EndIf
If $aEnemys[0][0] = 0 Then
$nT_DisplayWave = TimerInit()
$bNewWave = True
$iWaveCounter += 1
EndIf
EndSwitchFor $i = 1 To $aEnemys[0][0]
[/autoit] [autoit][/autoit] [autoit]
If $i > $aEnemys[0][0] Then ExitLoop
If $aEnemys[$i][4] <= 0 Then
_ArrayDelete($aEnemys, $i)
$aEnemys[0][0] -= 1
$i -= 1
Else
If TimerDiff($aEnemys[$i][5]) >= $aEnemys[$i][6] * $nTimeMod Then
$aProjectiles[0][0] += 1
ReDim $aProjectiles[$aProjectiles[0][0] + 1][6]$aDiff = _Vector_Create($nX_PlayerPos - $aEnemys[$i][0], $nY_PlayerPos - $aEnemys[$i][1])
[/autoit] [autoit][/autoit] [autoit]
$aDirection = _Vector_Normalize($aDiff)$aProjectiles[$aProjectiles[0][0]][0] = $aEnemys[$i][0]
[/autoit] [autoit][/autoit] [autoit]
$aProjectiles[$aProjectiles[0][0]][1] = $aEnemys[$i][1]
$aProjectiles[$aProjectiles[0][0]][2] = $aDirection[0] * $nProjectileSpeedEnemy
$aProjectiles[$aProjectiles[0][0]][3] = $aDirection[1] * $nProjectileSpeedEnemy
$aProjectiles[$aProjectiles[0][0]][4] = 5
$aProjectiles[$aProjectiles[0][0]][5] = 0$aEnemys[$i][5] = TimerInit()
[/autoit] [autoit][/autoit] [autoit]
EndIf$aEnemys[$i][0] += $aEnemys[$i][2] / $nFPS_Cur
[/autoit] [autoit][/autoit] [autoit]
$aEnemys[$i][1] += $aEnemys[$i][3] / $nFPS_CurIf $aEnemys[$i][0] - 10 <= 0 And $aEnemys[$i][2] < 0 Then $aEnemys[$i][2] *= -1
[/autoit] [autoit][/autoit] [autoit]
If $aEnemys[$i][0] + 10 >= $iGUIWidth And $aEnemys[$i][2] > 0 Then $aEnemys[$i][2] *= -1
If $aEnemys[$i][1] - 10 <= 0 And $aEnemys[$i][3] < 0 Then $aEnemys[$i][3] *= -1
If $aEnemys[$i][1] + 10 >= $iGUIHeight And $aEnemys[$i][3] > 0 Then $aEnemys[$i][3] *= -1_GDIPlus_GraphicsFillEllipse($hGraphic, $aEnemys[$i][0] - 10, $aEnemys[$i][1] - 10, 20, 20, $hBrush_Enemy)
[/autoit] [autoit][/autoit] [autoit]
EndIf
Next_GDIPlus_GraphicsFillEllipse($hGraphic, $nX_PlayerPos - 10, $nY_PlayerPos - 10, 20, 20, $hBrush_Player)
[/autoit] [autoit][/autoit] [autoit]For $i = 1 To $aProjectiles[0][0]
[/autoit] [autoit][/autoit] [autoit]
If $i > $aProjectiles[0][0] Then ExitLoopDllStructSetData($tPoint, "X", $aProjectiles[$i][0])
[/autoit] [autoit][/autoit] [autoit]
DllStructSetData($tPoint, "Y", $aProjectiles[$i][1])If _WinAPI_PtInRect($tRectBorder, $tPoint) Then
[/autoit] [autoit][/autoit] [autoit]$aProjectiles[$i][0] += $aProjectiles[$i][2] / $nFPS_Cur
[/autoit] [autoit][/autoit] [autoit]
$aProjectiles[$i][1] += $aProjectiles[$i][3] / $nFPS_Cur_GDIPlus_GraphicsFillEllipse($hGraphic, $aProjectiles[$i][0] - 4, $aProjectiles[$i][1] - 4, 8, 8, $hBrush_ProjectileBG)
[/autoit] [autoit][/autoit] [autoit]Switch $aProjectiles[$i][5]
[/autoit] [autoit][/autoit] [autoit]
Case 0
_GDIPlus_GraphicsFillEllipse($hGraphic, $aProjectiles[$i][0] - 3, $aProjectiles[$i][1] - 3, 6, 6, $hBrush_Enemy)
Case 1
_GDIPlus_GraphicsFillEllipse($hGraphic, $aProjectiles[$i][0] - 3, $aProjectiles[$i][1] - 3, 6, 6, $hBrush_Player)
EndSwitchSwitch $aProjectiles[$i][5]
[/autoit] [autoit][/autoit] [autoit]
Case 0
If _CircleIsTouchingCircle($aProjectiles[$i][0], $aProjectiles[$i][1], $nX_PlayerPos, $nY_PlayerPos, 6, 10) Then
$nLifeForce -= $aProjectiles[$i][4]
_ArrayDelete($aProjectiles, $i)
$aProjectiles[0][0] -= 1
$i -= 1
EndIf
Case 1
For $i2 = 1 To $aEnemys[0][0]
If _CircleIsTouchingCircle($aProjectiles[$i][0], $aProjectiles[$i][1], $aEnemys[$i2][0], $aEnemys[$i2][1], 6, 10) Then
$aEnemys[$i2][4] -= $aProjectiles[$i][4]
_ArrayDelete($aProjectiles, $i)
$aProjectiles[0][0] -= 1
$i -= 1
ExitLoop
EndIf
Next
EndSwitch
Else
_ArrayDelete($aProjectiles, $i)
$aProjectiles[0][0] -= 1
$i -= 1
EndIf
Next_GDIPlus_GraphicsDrawRect($hGraphic, 5, 5, 100, 10, $hPen_Bar)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDrawRect($hGraphic, 5, 18, 100, 10, $hPen_Bar)
_GDIPlus_GraphicsFillRect($hGraphic, 5, 5, $nLifeForce * 100 / $nLifeForcePlayer, 10, $hBrush_LifeBar)
_GDIPlus_GraphicsFillRect($hGraphic, 5, 18, $nSlowMotionFuel * 100 / $nSlowMotionFuelMax, 10, $hBrush_SlowMotionBar)_GDIPlus_GraphicsDrawEllipse($hGraphic, $aCursorInfo[0] - 8, $aCursorInfo[1] - 8, 16, 16, $hPen_Cursor)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0], $aCursorInfo[1] - 11, $aCursorInfo[0], $aCursorInfo[1] - 4, $hPen_Cursor)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0] - 11, $aCursorInfo[1], $aCursorInfo[0] - 4, $aCursorInfo[1], $hPen_Cursor)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0], $aCursorInfo[1] + 11, $aCursorInfo[0], $aCursorInfo[1] + 4, $hPen_Cursor)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0] + 11, $aCursorInfo[1], $aCursorInfo[0] + 4, $aCursorInfo[1], $hPen_Cursor)
_GDIPlus_GraphicsDrawStringEx($hGraphic, "FPS " & Int($nFPS_Display), $hFont_FPS, $tLayout_FPS, $hStringFormat, $hBrush_FPS)_WinAPI_BitBlt($hDC, 0, 0, $iGUIWidth, $iGUIHeight, $hCDC_Buffer, 0, 0, 0x00CC0020)
[/autoit] [autoit][/autoit] [autoit]Switch _IsPressed("50", $vUser32Dll)
[/autoit] [autoit][/autoit] [autoit]
Case True
Dim $aTimerOffset[4 + $aEnemys[0][0]]$aTimerOffset[0] = TimerDiff($nT_Sleep)
[/autoit] [autoit][/autoit] [autoit]
$aTimerOffset[1] = TimerDiff($nT_UpdateFPS)
$aTimerOffset[2] = TimerDiff($nT_AdjustSleepTime)
$aTimerOffset[3] = TimerDiff($nT_CoolDown)
For $i = 1 To $aEnemys[0][0]
$aTimerOffset[$i + 3] = TimerDiff($aEnemys[$i][5])
Next_Pause()
[/autoit] [autoit][/autoit] [autoit]$nT_Sleep = TimerInit() - $aTimerOffset[0]
[/autoit] [autoit][/autoit] [autoit]
$nT_UpdateFPS = TimerInit() - $aTimerOffset[1]
$nT_AdjustSleepTime = TimerInit() - $aTimerOffset[2]
$nT_CoolDown = TimerInit() - $aTimerOffset[3]
For $i = 1 To $aEnemys[0][0]
$aEnemys[$i][5] = TimerInit() - $aTimerOffset[$i + 3]
Next
EndSwitch
Else
Sleep(10)
EndIf
WEndFunc _Pause()
[/autoit] [autoit][/autoit] [autoit]
$hBitmapBG = _GDIPlus_BitmapCreateFromHBITMAP($hGDI_Bitmap)
$hGraphicTmp = _GDIPlus_ImageGetGraphicsContext($hBitmapBG)
_GDIPlus_GraphicsFillRect($hGraphicTmp, 0, 0, $iGUIWidth, $iGUIHeight, $hBrush_BG_Menu)
_GDIPlus_GraphicsDispose($hGraphicTmp)Do
[/autoit] [autoit][/autoit] [autoit]
Sleep(20)
Until Not _IsPressed("50", $vUser32Dll)$nT_Sleep = TimerInit() + $nSleepTime
[/autoit] [autoit][/autoit] [autoit]
$nT_UpdateFPS = TimerInit()
$nT_AdjustSleepTime = TimerInit()While Not _IsPressed("50", $vUser32Dll)
[/autoit] [autoit][/autoit] [autoit]
DllStructSetData($tPrecSleep, "time", -10000 * ($nSleepTime - TimerDiff($nT_Sleep) + $nOffsetSleepTime))
DllCall($vNTdll, "dword", "ZwDelayExecution", "int", 0, "ptr", $pPrecSleep)
$nFrameTime = TimerDiff($nT_Sleep)
$nT_Sleep = TimerInit()$nFPS_Cur = 1000 / $nFrameTime
[/autoit] [autoit][/autoit] [autoit]
If TimerDiff($nT_UpdateFPS) >= 500 Then
$nFPS_Average = ($nFPS_Average * ($iCounter - 1) + $nFPS_Cur) / $iCounter
$iCounter += 1
$nFPS_Display = $nFPS_Cur
$nT_UpdateFPS = TimerInit()
EndIf
If TimerDiff($nT_AdjustSleepTime) >= 5000 Then
If $nFPS_Average - $nFPS < -2 Then $nOffsetSleepTime -= 0.5
If $nFPS_Average - $nFPS > 2 Then $nOffsetSleepTime += 0.5
$iCounter = 1
$nT_AdjustSleepTime = TimerInit()
EndIf$aCursorInfo = GUIGetCursorInfo($hWnd)
[/autoit] [autoit][/autoit] [autoit]_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmapBG, 0, 0, $iGUIWidth, $iGUIHeight)
[/autoit] [autoit][/autoit] [autoit]
Switch $bNewGame
Case True
Switch _PointIsInRect($aCursorInfo[0], $aCursorInfo[1], DllStructGetData($tLayout_Menu_Start, "X"), DllStructGetData($tLayout_Menu_Start, "Y"), DllStructGetData($tLayout_Menu_Start, "Width"), DllStructGetData($tLayout_Menu_Start, "Height"))
Case True
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Start", $hFont_Menu, $tLayout_Menu_Start, $hStringFormat, $hBrush_MenuTextHighlight)
If $aCursorInfo[2] Then ExitLoop
Case False
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Start", $hFont_Menu, $tLayout_Menu_Start, $hStringFormat, $hBrush_MenuTextNormal)
EndSwitch
Case False
Switch _PointIsInRect($aCursorInfo[0], $aCursorInfo[1], DllStructGetData($tLayout_Menu_Continue, "X"), DllStructGetData($tLayout_Menu_Continue, "Y"), DllStructGetData($tLayout_Menu_Continue, "Width"), DllStructGetData($tLayout_Menu_Continue, "Height"))
Case True
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Continue", $hFont_Menu, $tLayout_Menu_Continue, $hStringFormat, $hBrush_MenuTextHighlight)
If $aCursorInfo[2] Then ExitLoop
Case False
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Continue", $hFont_Menu, $tLayout_Menu_Continue, $hStringFormat, $hBrush_MenuTextNormal)
EndSwitch
EndSwitch
Switch _PointIsInRect($aCursorInfo[0], $aCursorInfo[1], DllStructGetData($tLayout_Menu_Quit, "X"), DllStructGetData($tLayout_Menu_Quit, "Y"), DllStructGetData($tLayout_Menu_Quit, "Width"), DllStructGetData($tLayout_Menu_Quit, "Height"))
Case True
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Quit", $hFont_Menu, $tLayout_Menu_Quit, $hStringFormat, $hBrush_MenuTextHighlight)
If $aCursorInfo[2] Then _Close()
Case False
_GDIPlus_GraphicsDrawStringEx($hGraphic, "Quit", $hFont_Menu, $tLayout_Menu_Quit, $hStringFormat, $hBrush_MenuTextNormal)
EndSwitch
_GDIPlus_GraphicsDrawEllipse($hGraphic, $aCursorInfo[0] - 8, $aCursorInfo[1] - 8, 16, 16, $hPen_Cursor)
_GDIPlus_GraphicsDrawStringEx($hGraphic, "FPS " & Int($nFPS_Display), $hFont_FPS, $tLayout_FPS, $hStringFormat, $hBrush_FPS)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0], $aCursorInfo[1] - 11, $aCursorInfo[0], $aCursorInfo[1] - 4, $hPen_Cursor)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0] - 11, $aCursorInfo[1], $aCursorInfo[0] - 4, $aCursorInfo[1], $hPen_Cursor)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0], $aCursorInfo[1] + 11, $aCursorInfo[0], $aCursorInfo[1] + 4, $hPen_Cursor)
_GDIPlus_GraphicsDrawLine($hGraphic, $aCursorInfo[0] + 11, $aCursorInfo[1], $aCursorInfo[0] + 4, $aCursorInfo[1], $hPen_Cursor)
_WinAPI_BitBlt($hDC, 0, 0, $iGUIWidth, $iGUIHeight, $hCDC_Buffer, 0, 0, 0x00CC0020)
WEndIf $bNewGame Then
[/autoit] [autoit][/autoit] [autoit]
$nT_DisplayWave = TimerInit()
$bNewWave = True
EndIfDo
[/autoit] [autoit][/autoit] [autoit]
Sleep(20)
Until Not _IsPressed("50", $vUser32Dll) And Not _IsPressed("01", $vUser32Dll)
EndFunc ;==>_PauseFunc _Restart()
[/autoit] [autoit][/autoit] [autoit]
$iEnemys = Ceiling($iWaveCounter / 5)
If $iEnemys > 8 Then $iEnemys = 8$nProjectileSpeedEnemy = 200 + $iWaveCounter * 5
[/autoit] [autoit][/autoit] [autoit]
$nEnemySpeed = Random($iWaveCounter * 10 + 50, $iWaveCounter * 10 + 100, 1)
If $nEnemySpeed > 500 Then $nEnemySpeed = Random(400, 500, 1)Dim $aEnemys[$iEnemys + 1][7] = [[$iEnemys]]
[/autoit] [autoit][/autoit] [autoit]
For $i = 1 To $aEnemys[0][0]
$aEnemys[$i][0] = Random(10, $iGUIWidth - 10)
$aEnemys[$i][1] = Random(10, $iGUIHeight - 10)
$aNormTmp = _Vector_Normalize(_Vector_Create(Random(-1, 1), Random(-1, 1)))
$aEnemys[$i][2] = $aNormTmp[0] * $nEnemySpeed
$aEnemys[$i][3] = $aNormTmp[1] * $nEnemySpeed
$aEnemys[$i][4] = 5 + $iWaveCounter * 5
$aEnemys[$i][5] = TimerInit()
$aEnemys[$i][6] = Random(800 - $iWaveCounter * 5, 1000 - $iWaveCounter * 5, 1)
If $aEnemys[$i][6] < 200 Then $aEnemys[$i][6] = Random(200, 250, 1)
Next
EndFunc ;==>_RestartFunc _Close()
[/autoit] [autoit][/autoit] [autoit]
_WinAPI_ReleaseDC($hWnd, $hDC)
_WinAPI_DeleteDC($hCDC_Buffer)
_WinAPI_DeleteObject($hGDI_Bitmap)_GDIPlus_GraphicsDispose($hGraphic)
[/autoit] [autoit][/autoit] [autoit]
_GDIPlus_BitmapDispose($hBitmapBG)
_GDIPlus_BrushDispose($hBrush_Player)
_GDIPlus_BrushDispose($hBrush_Enemy)
_GDIPlus_BrushDispose($hBrush_BG_Menu)
_GDIPlus_BrushDispose($hBrush_FPS)
_GDIPlus_BrushDispose($hBrush_ProjectileBG)
_GDIPlus_BrushDispose($hBrush_MenuTextNormal)
_GDIPlus_BrushDispose($hBrush_MenuTextHighlight)
_GDIPlus_BrushDispose($hBrush_LifeBar)
_GDIPlus_BrushDispose($hBrush_SlowMotionBar)
_GDIPlus_BrushDispose($hBrush_Announcement)
_GDIPlus_PenDispose($hPen_Bar)
_GDIPlus_PenDispose($hPen_Cursor)
_GDIPlus_StringFormatDispose($hStringFormat)
_GDIPlus_FontFamilyDispose($hFamily_SegoeUI)
_GDIPlus_FontDispose($hFont_FPS)
_GDIPlus_FontDispose($hFont_Menu)
_GDIPlus_Shutdown()DllClose($vUser32Dll)
[/autoit] [autoit][/autoit] [autoit]
DllClose($vNTdll)
Exit
EndFunc ;==>_CloseFunc _PointIsInCircle($iX_Point, $iY_Point, $iX_Circle, $iY_Circle, $iRadius_Circle)
[/autoit] [autoit][/autoit] [autoit]
$iDistPoints = _GetPointsDistance($iX_Point, $iY_Point, $iX_Circle, $iY_Circle)
If ($iRadius_Circle > 0 And $iDistPoints < $iRadius_Circle) Or ($iRadius_Circle < 0 And $iDistPoints > $iRadius_Circle) Or $iDistPoints = 0 Then Return 1
Return 0
EndFunc ;==>_PointIsInCircleFunc _CircleIsTouchingCircle($iX_Circle1, $iY_Circle1, $iX_Circle2, $iY_Circle2, $iRadius_Circle1, $iRadius_Circle2)
[/autoit] [autoit][/autoit] [autoit]
$iDistCircles = _GetPointsDistance($iX_Circle1, $iY_Circle1, $iX_Circle2, $iY_Circle2)
If $iDistCircles < $iRadius_Circle1 + $iRadius_Circle2 Then Return True
Return False
EndFunc ;==>_CircleIsTouchingCircleFunc _PointIsInRect($iX_Point, $iY_Point, $iX_Rect, $iY_Rect, $iWidth_Rect, $iHeight_Rect)
[/autoit] [autoit][/autoit] [autoit]
If $iX_Point >= $iX_Rect And $iX_Point <= $iX_Rect + $iWidth_Rect And $iY_Point >= $iY_Rect And $iY_Point <= $iY_Rect + $iHeight_Rect Then Return 1
Return 0
EndFunc ;==>_PointIsInRectFunc _GetPointsDistance($iPointX1, $iPointY1, $iPointX2, $iPointY2)
[/autoit] [autoit][/autoit] [autoit]
Return Sqrt(($iPointX1 - $iPointX2) ^ 2 + ($iPointY1 - $iPointY2) ^ 2)
EndFunc ;==>_GetPointsDistanceFunc _istPause()
[/autoit]
If Not WinActive("AutoIt Arena Fight v1.0 - Author: name22(http://www.autoit.de)") Then
$pause = True
Else
$pause = False
EndIf
EndFunc ;==>_istPause -
Man kann ja das AutoIt Logo aus Schrottteilen nachbauen, eine kleine LED leuchte die bei Laptops immer die Tastatur von oben beleuchtet nimmt man noch damit es von innen leuchtet

-
Bei mir kommt nur die GUI

Mit dem "Shooter" draur -
Lass mich doch ein Minecraft Freak sein

Sieht aus wie das Wallpaper nur "Trapezoid" und aufgepeppelt -
Oha, na ob ich da mithalten kann

Mein Bild ist ne GIF
[Blockierte Grafik: http://elitemattthias.el.funpic.de/AutoIt%20Logo.gif]
Nicht wundern
-
Ich warte langsam auf die Abstimmung
