Go to Post By seeing other robot designs, teams can plan before hand on how to defend or defeat it. - Don Wright [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 06-11-2010, 18:05
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Computer playing Bejeweled Blitz project

As started in this thread, I'm actually working on this project. I have chosen Facebook's Bejeweled Blitz*, like was first suggested.

I've worked on it a bunch so far and have made a main program with the different parts sketched out. I only have the computational part right now, but it finds matches and knows where to move what gem where. It looks at an array of numeric values, which be converted to from the screen.It doesn't find "gap" matches yet, where there's two gems in a row with a gap in the middle that you can fill in with a third. It only looks for a row of 2 that it can complete. It does this by looking at a theoretical position to move the current gem being tested. Then it looks around that gem to see if there's one match with the original. If so, it looks further in the same direction to see if there's a second match. It counts that as a full match and passes that on the the rest of the program.

Now I need to code up how it will interact with the computer. It was suggested to interact with the Windows API to control the mouse and click in the right spots to move the gems. The Library Call node will do this for you. I looked into it though, and configuring it is beyond me since I don't know a lot about API commands. Does someone have an example or tutorial on how to use them with LabVIEW? I've Googled it and looked at NI's Dev Zone, but a lot of things expect you to know about Windows API.

Also, anyone have any suggestions for looking at the screen and getting the colors of certain pixels? I know you could do a screen capture somehow and then save the file and analyze it, but I think that might slow and/or a round-about way of doing it. Again, this might take some API work.

Thanks for your help! I've attached the VI's in case you're interested. You can run them and they'll work, I've put in the test screen shot into the array. Sorry that there's not a ton of documentation yet.


*An 8x8 playing "board" that has gems you must switch to make 3 in a row or more. Then these gems disappear and more drop from the top, Connect 4 style.
Attached Thumbnails
Click image for larger version

Name:	Test_Shot_1.jpg
Views:	20
Size:	33.4 KB
ID:	9396  
Attached Files
File Type: vi Main.vi (11.2 KB, 15 views)
File Type: vi Move.vi (15.6 KB, 13 views)
File Type: vi M_L1 match test (SubVI).vi (7.8 KB, 15 views)
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Science or Computer Engineering? KRibordy College & University Education 14 09-10-2009 01:56
saving project as a new project windell747 NI LabVIEW 3 01-02-2009 04:41
Music Playing Problem on Computer John Gutmann Chit-Chat 9 31-07-2007 17:04
pic: Kaizen Blitz Presents... The Blitz Box 2006 Ian Curtis Robot Showcase 0 24-02-2006 16:47
The Blitz is a GO!! Erin Rapacki Off-Season Events 6 06-06-2003 19:31


All times are GMT -5. The time now is 10:12.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi