File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Game Development and the fly likes Gamescreen wrap-around Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Gamescreen wrap-around" Watch "Gamescreen wrap-around" New topic

Gamescreen wrap-around

Henrik �stman

Joined: Apr 09, 2005
Posts: 11

I'm trying to create a replica of the old Intellivision game "Biplane".
It's just basicaly two airplanes on a 2D screen trying to shoot down the other one. The problem a have, besides i'm a newbee, is when a airplane leaves the screen to the left or right it's suposed to reappere on the other side of the screen. So for example, if the plane is halfway though the screen on the right side, you should see the nose on the left side of the screen. How do i solve this in Java/Swing?? Do i have to create two objects when this happens and draw one to the right and the other one to the left? Or can one tell Swing to wrap the screen around??

ANY help with this is realy appreciated!!

// Henrik
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199


Welcome to JavaRanch!

Please don't ask the same question in more than one forum; it wastes people's time. I deleted the other copy of this you posted in the Swing forum.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Gamescreen wrap-around
It's not a secret anymore!