1001z
Junior Member

Posts: 51
|
Post by 1001z on Jun 21, 2022 19:54:44 GMT
Any best in practice to check game is crashed (freezing/no respone) for any games? As I can think we can check like "Do something" like open a menu and check some element appeared.
But any better way than this?
|
|
|
Post by Exilereven on Jun 21, 2022 21:29:26 GMT
This is just something i use and have tried before. there are many different ways to accomplish what your wanting.
It depends on the games nature....does it have menus that are on every screen?
does it have some image you can check for on each main loop?
Most the time i will use an "Anchor" image to know when im on the right page(or certain image has not gone by in a while).
Example:
while true do --our loop --do stuff inside the loop, call our functions to do something. checkHome() --make a function that detects certain image or images to know that your on the right screen
end
if checkHome() does not come back true after so many minutes or so many times, then do a startApp() and wait till home screen is back and start again.
would be awesome if Ankulua just had a way to tell if a process is running or not lol
like startApp(com.example.com) but
isRunning(specific PID, or com.example bla bla bla)
would be way more accurate and use less resources checking for anchors all the time lol.
|
|
1001z
Junior Member

Posts: 51
|
Post by 1001z on Jun 27, 2022 22:35:42 GMT
This is just something i use and have tried before. there are many different ways to accomplish what your wanting. It depends on the games nature....does it have menus that are on every screen? does it have some image you can check for on each main loop? Most the time i will use an "Anchor" image to know when im on the right page(or certain image has not gone by in a while). Example: while true do --our loop --do stuff inside the loop, call our functions to do something. checkHome() --make a function that detects certain image or images to know that your on the right screen end if checkHome() does not come back true after so many minutes or so many times, then do a startApp() and wait till home screen is back and start again. would be awesome if Ankulua just had a way to tell if a process is running or not lol like startApp(com.example.com) but isRunning(specific PID, or com.example bla bla bla) would be way more accurate and use less resources checking for anchors all the time lol.
Yes, I doing the same, click menu and check some elemennts or pixel check if X times duplicate so restart... But still looking for better way hehe
If someone interesting how I do ...
local lastCheckColor = nil local dupColor = 0 local _regCheckColor = Region(1000, 300, 10, 10) function checkCrash() local r, g, b = getColor(_regCheckColor) local checkColor = r..g..b -- toast(checkColor) if (checkColor == lastCheckColor) then dupColor = dupColor + 1 if (dupColor >= 10) then ------------------- doSomething() lastCheckColor = nil dupColor = 0 end else lastCheckColor = checkColor dupColor = 0 end end
|
|