Automating gaming app designed in Macromedia Director?

Hi,
I have a question whether Eggplat can be used to test my gaming application.

My gaming application is prettymuch show and tell kind of thing.

Game1: A circle with segments will show up. In Each segment some images will quickly show up. Among these images, one image will match with the taget image. We have to click that image. We get some points. Like that it repeats till all trials are done. So, as a tester we have to remember which segment has the correcr image

Please note that the location of correct image will vary among one of those segments..

Can Eggplant automate this application?

Also, we have cheatcode where it shows which segment has that image...SO, Does eggplant can read that number from that screen...

Note, our application is designed using Macromedia Director...

Comments

  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    In general, Eggplant should be able to automate this type of game. Macromedia Director shouldn't be a problem. Looking for images on the screen is the way Eggplant works, so you should be able to write a script that will find the location of the target image and then either click on it (to score points) or click elsewhere (to test an incorrect answer).

    The only thing you mentioned that might pose a problem is that you said "some images will quickly show up". Are these images only being shown briefly and then being hidden again? If so, you could encounter timing issues caused by the length of time it takes Eggplant to look for an image on the screen (it is probably not as fast as a human gamer). In a situation like that it's possible that it would miss seeing the image while it's visible. If the images stay on the screen until the user clicks, this won't be an issue.
  • positposit Member
    You understand my question correctly. Yes, the images shows up for few milliseconds and greys out (just like show-hide-tell-EarnPoints). As a player, we have to rememeber (meaning one has to have good visual brain) to click the correct location.

    I also suspect that Eggplant may not act so quickly.

    That's OK I believe..As a QA Player, we have cheat code which shows which segment has that target image (eg: It shows 2 on that Macromedia Screen. As a QA, I manually count and click on that segment to get the points. If eggplant can read the number (not sure how??) and if it can click then I am OK...
  • positposit Member
    Do anyone has any idea whether Eggplant can do this?
  • SenseTalkDougSenseTalkDoug ForumAdmin admin
    Yes, there are a number of ways Eggplant can do this. If the number of possible answers is fairly small (maybe 20 or so) the simplest thing is probably to just capture images of each possible answer. You can then put all of those cheat code images into a collection, search for the collection, and then check to see which image was found, like this:
    if imageFound("CheatCodeImages") then
    	set imageName to the lastPathComponent of the foundImageInfo's imagePath
    	delete the last item delimited by "." of imageName -- remove the file extension
    	log "Found image " & imageName
    else
    	logError "No Cheat Code found"
    end if
    
    This will set imageName to the name of the detected cheat code image. If those images are named "cc1", "cc2", and so forth, then you could get the segment number like this:
    set segmentNumber to chars 3 to last of imageName
    
    Then you can use the segmentNumber to determine where to click.

    There are other ways it can be done, but this seems like it might be a good approach in your situation. You may find it helpful to limit the search area to the region where the cheat code is shown, by setting the SearchRectangle before calling imageFound() (remember to reset it to the full screen again afterward).

    I hope this gives you a starting point for solving your problem. You may need to adapt some of this for your exact situation.
Sign In or Register to comment.