Hello,
here is little example of how to make a game
which will run in two windows at the same time.
It can be used to make a two player game.
Both actors have to be controlled by the same window because the other windows
key down events don't work when other one is active. But you can make other one follow other player
and another one will follow another one.
The basic idea is that game window 1 writes characters state (position, animindex, animpos) into file and the game window 2 reads them from there. It actually seems to work fast enough for make games with that system.
So, the character is actually running by the key down event just in window 1 but window2 reads that info from file and makes the character also move.
Sorry if this made no sense, it's hard to explan this.
That's how it works:
AND SORRY FOR EXTREMELY BAD GRAPHICS! xD
Download: (UPDATED!)
http://www.mediafire.com/download.php?i7n5ib1o3kh2xt9
Please post if you have any questions or feedback.
lcl
ps. what's wrong with the forum uploadings?
I can't use the java uploader, it just doesn't add the file and the normal uploader says that file size limit is 100 KiB though it should be 2 MB!