0

I have some browser flash game. In this game there are some players/objects, and I can steer one of them. I want to write bot for this game. Bot will 'read' the state of game (capturing the part of the screen and finding the positions of players), and steer my object (by java Robot).

And now I want to draw on screen on calculated positions of the object some circles. Just for debug purposes. I want to make sure if everything is okay. Circles of coure will move, just like players. But how to do that?

I can create big transparent window, and then I can draw debug, and I can read the game. But I can't steer the game, because browser isn't on top. If my browser would be on top, then I can't see debug drawings. I want solution in which my browser is on top, and my debug drawings are also visible on the browser.

Is it even possible?

Thanks

tucuxi
  • 17,561
  • 2
  • 43
  • 74
Adi
  • 2,011
  • 2
  • 15
  • 14
  • what code? I don't have drawing code. I don't know how to do that. – Adi Aug 02 '12 at 21:19
  • 2
    This isn't a site where people do your coding for you, its a place to get help with *your* code. What have you tried? – Rob Wagner Aug 02 '12 at 21:20
  • I don't want coding for me. I want to help me with method. – Adi Aug 02 '12 at 21:20
  • 4
    In technology, almost anything is possible. – Alfabravo Aug 02 '12 at 21:21
  • 1
    @Alfabravo Exactly. It's possible, but I'm not going to sit here and try to work it out for you. Do some research, try something, and come back when you have code for us to work with. – Rob Wagner Aug 02 '12 at 21:22
  • I was googling. Give me some links if you know how to do that. I didn't found anything. I wouldn't ask if I didn't try to found it myself. – Adi Aug 02 '12 at 21:24
  • 1
    Thought provoking question - basically you don't want the Java window to consume the event, but continue passing it to the next window. I seem to remember a way of passing on events - but will have to look at it again. – Nick Rippe Aug 02 '12 at 21:30
  • @NickRippe thats kind of answer I was looking for. I will check it out. – Adi Aug 02 '12 at 21:36
  • 1
    What OS? On Windows (and I'm pretty sure as well as on Mac) transparent windows WON'T trap the mouse events UNLESS there is something in there way (kind of like shining a laser pointer at a wall, unless something gets in its way, it will always reach the wall) – MadProgrammer Aug 02 '12 at 22:04
  • @MadProgrammer I use keyboard, not mouse :< OS is mainly Mac and Windows. – Adi Aug 02 '12 at 22:44
  • 1
    Try setting the window to non focusable (setFocusableState I think), also, take advantage of the always on top property if you aren't already – MadProgrammer Aug 02 '12 at 22:59

0 Answers0