Jump to content
  • Advertisement
Sign in to follow this  
Zimbo

Need project "card game reader" feedback

This topic is 4937 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I am sorry if this thread not to suppose to be here. Please let me know if I should post this on another secion. I was wondering if you guys wouldn't mind to give me some feedback solution on my project. Basically, the goal is to be able to log every game action that's taken (that we can see) in a 2d graphic card game. For example in Microsoft Heart's game, CPU opponent is dealt a card (face down, unknown), CPU opponent discards a five of spades, we (human player) are dealt a six of hearts. So the logger is able to log in text five of spades for cpu opponent, and human player dealt six of hearts. One approach that I can think of is to tap the graphical feed (like a screenshot)and then do some OCR over there. Still don't know how am I going to tap it and do the OCR, it's still just an idea. Thx again for reading this

Share this post


Link to post
Share on other sites
Advertisement
It should be possible, but the image recognition may get a bit tricky. Getting a picture of the game window should be easy - a little bit of FindWindow(), some GetDC(), and some BitBlt() will take care of that for you. Once you have the image, you'll need a way to check for known cards.

I'd suggest focusing on recognizing the corners of each card, since they are usually visible, and they will give you all the information you need about the card. This should work in all the card games that use the standard deck-o-cards image set. Unfortunately I don't know anything about image recognition, so I can't offer any tips on how to actually do that step, but working just with corners should make things much simpler (don't have to worry about overlapping cards, etc.).

Share this post


Link to post
Share on other sites
Hi ApochPiQ,

Thx for the input.
Like you said, the biggest challenge is the card recognition image algorithm.
Gosh...this is painful.

Too bad, I cannot modify or add the source code. It has to be done outside from it.

Guess, there's no other way to deal with this besides doing the card recognition image, huh?


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you use your program / a screenshot program to take a picture of each of the cards..basically store them as a 'database' or list of cards to search through. The search should be fast as you would only need to grab the pixel area of the card currently on screen (within known locations if you keep the window size/position constant) against the pixel area of the cards you have previously recorded in a list.

The other alternative, maybe just find an open source version of solitaire or whatever card game you want and modify it directly...that would be much easier i would think.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!