jvanegmond Posted May 14, 2006 Share Posted May 14, 2006 (edited) Here's a modified version of the Snake v4. It plays, and looks just a bit better. Blindwig is Edited May 14, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
blindwig Posted November 18, 2011 Author Share Posted November 18, 2011 Hello, to anyone that's been here long enough to remember me! I got a sudden hankering to check out my old 360 Snake game a few days ago, so I downloaded it and the latest version of AuoIt, wondering if it would still work. More or less, it does. It requires adding includes for WindowsConstants and ComboConstants (as these used to be part of GUIConstants) Executing the script gave me mixed results: On my home computer, a 2-core 32-bit WindowsXP machine, the script crashes AutoIt right after the game starts On my work computer, a 4-core 64-bit Windows 7 machine, running under Autoit 32-bit, it also crashes On my work computer, running under AutoIt 64-bit, it runs but very slow I traced the crashes down to 4 lines in the FoodDraw() routine; calls to function "LineTo" in GDI32 need to have the last parameter removed. So for example this: DllCall($hDLL_GDI32, "int", "LineTo", "hwnd", $hd[0], "int", $Food[2], "int", $Food[3], "int", 0) changes to this: DllCall($hDLL_GDI32, "int", "LineTo", "hwnd", $hd[0], "int", $Food[2], "int", $Food[3]) The script no longer crashes, and runs fine on my 32-bit XP machine. It also no longer crashes on my 64-bit W7 machine in 32-bit mode, but as with 64-bit mode it runs the script very slowly. It still run very slowly on the 64-bit machine with AutoIt64 So all this leaves me with a few questions: Why did this extra parameter crash the latest version of AutoIt, and why did it not crash earlier versions? And why does it only crash 32-bit versions? Why does it run so slowly on my 64-bit machine? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
Zedna Posted November 18, 2011 Share Posted November 18, 2011 Why does it run so slowly on my 64-bit machine?Try to add#AutoIt3Wrapper_UseX64=n Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
blindwig Posted November 19, 2011 Author Share Posted November 19, 2011 Try to add#AutoIt3Wrapper_UseX64=nSlightly faster (maybe?) but still unplayably slow My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
funkey Posted November 19, 2011 Share Posted November 19, 2011 Slightly faster (maybe?) but still unplayably slowI think this is because Aero. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now