Hi!
Celebrating my first post with a dumb question. How can I create an ai for playing tetris attack?
The problem is getting the location of the current blocks.
I thought about reading the screen by using winapi's like getpixel, but that turned out to be kinda slow in a game with alot of screen action. My next idea was trying to read the location of the blocks by reading zsnes memory but i cant find the memory locations(using tsearch). If I did find the location would these change the next time zsnes is started (dynamic memory allocation) ?
The next problem came when trying to send keyboard input to zsnes. I tried using sendkeys and sendinput apis but no luck. Im using c# to develop this thing.
Anyone ever tried anything like this?
How to create an an ai to play tetris attack
Moderator: ZSNES Mods
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
... what ?
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
-
- ZSNES Developer
- Posts: 3904
- Joined: Tue Jul 27, 2004 10:54 pm
- Location: Solar powered park bench
- Contact:
ZSNES's memory is dynamically allocated for stuff like that.
Your best bet may just be finding the start of the ZSNES window, and reading the pixel data.
The usual APIs for faking input won't work though, most apps can't talk to ZSNES because we handle input a bit different.
Your best bet may just be finding the start of the ZSNES window, and reading the pixel data.
The usual APIs for faking input won't work though, most apps can't talk to ZSNES because we handle input a bit different.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
_____________
Insane Coding
-
- Buzzkill Gil
- Posts: 4294
- Joined: Wed Jan 12, 2005 7:14 pm