Jump to content

Search the Community

Showing results for tags 'Achtung Die Kurve'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I'm having some difficulties with a game. It's kinda like CurveFever (Achtung Die Kurve), but I just want it for personal 1P usage. The problem is just that I can't figure out a way to check if the line is colliding with any point of where it has been before. I know there are lots of ways to do it, but I always end up with the game running slow because of bad methods such as searching for pixels etc. Any suggestions on a faster method? (You would probably have to test the code yourself to know what I'm saying if you want to help :/ ) #include <misc.au3> #include <GDIPlus.au3> HotKeySet("{ESC}", "Terminate") #Region Win $WinWidth=895 $WinHeight=895 $hGUI=GUICreate("", $WinWidth, $WinHeight, -1, -1) GUISetBkColor(0x000000, $hGUI) GUISetState() #EndRegion #Region GDIPLUS _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) $hPen = _GDIPlus_PenCreate(0x9900FF00, 5) $hPenBorder = _GDIPlus_PenCreate(0xFFFFFFFF, 5) _GDIPlus_GraphicsDrawRect($hGraphic, 0, 0, $WinWidth-1, $WinHeight-1, $hPenBorder) #EndRegion #Region Vars $Width=56 $SpeedTime=100 $Switch=1 $x=5 $y=5 $VektorX=0 $VektorY=Sqrt($Width^2-($VektorX^2)) $Hole_Count=1 $Hole_MakeHole=Random(10, 1000, 1) Global $SpeedTime _GDIPlus_GraphicsDrawEllipse($hGraphic, $x, $y, 2.4, 2.4, $hPen) #EndRegion Sleep(1000) $Timer=TimerInit() While 1 If _IsPressed(25) Then TurnLeft() EndIf If _IsPressed(27) Then TurnRight() EndIf $x+=$VektorX/30 $y+=$VektorY/30 DrawLine() While TimerDiff($Timer)<$SpeedTime/6 WEnd $Timer=TimerInit() WEnd Func DrawLine() ;~ $Hole_Count+=1 If $Hole_Count>$Hole_MakeHole Then If $Hole_Count>$Hole_MakeHole+15 Then $Hole_Count=0 $Hole_MakeHole=Random(10, 1000, 1) EndIf Else _GDIPlus_GraphicsDrawEllipse($hGraphic, $x, $y, 2.4, 2.4, $hPen) EndIf EndFunc Func TurnLeft() If $Switch>0 Then $VektorX+=(2.5*$VektorY*$Switch)/$Width+0.0005 If $Switch<0 Then $VektorX-=(2.5*$VektorY*$Switch)/$Width+0.0005 If $VektorX>=$Width Then $Switch*=-1 $VektorX=$Width EndIf If $VektorX<=-$Width Then $Switch*=-1 $VektorX=-$Width EndIf $VektorY=Sqrt($Width^2-($VektorX^2))*$Switch EndFunc Func TurnRight() If $Switch>0 Then $VektorX-=(2.5*$VektorY*$Switch)/$Width+0.0005 If $Switch<0 Then $VektorX+=(2.5*$VektorY*$Switch)/$Width+0.0005 If $VektorX>=$Width Then $Switch*=-1 $VektorX=$Width EndIf If $VektorX<=-$Width Then $Switch*=-1 $VektorX=-$Width EndIf $VektorY=Sqrt($Width^2-($VektorX^2))*$Switch EndFunc Func Terminate() _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_PenDispose($hPen) _GDIPlus_Shutdown() Exit EndFunc
×
×
  • Create New...