playMaker

Author Topic: [SOLVED] 2D game: Player going out of screen and appearing on the other side.  (Read 2484 times)

Erzberger

  • Playmaker Newbie
  • *
  • Posts: 5
Hi,

I have a 2d android game with a player moving along the x axis on the bottom of the screen (think breakout or certain SHMUPs with a fixed y axis). When I go out of screen on the right sight of the playing field I´d like him to reappear on the left.
Optimally I´d like this process to be seamless (i.e. when half of my player goes out of screen to the right, half of him appears to left).

But I don´t even have an inkling of an idea of how I would set this up. Any tips would be appreciated.

Thanks!
« Last Edit: April 15, 2015, 07:37:11 AM by Erzberger »

4ppleseed

  • Full Member
  • ***
  • Posts: 226
Here's the theory behind it:
http://gamedevelopment.tutsplus.com/articles/create-an-asteroids-like-screen-wrapping-effect-with-unity--gamedev-15055

I'd go for the simple version for now (should be pretty simple to convert to PM) and think about the advanced version later if the simple version just won't do.

Erzberger

  • Playmaker Newbie
  • *
  • Posts: 5
Thanks, 4ppleseed! This should get me started. I´ll tinker around with it when I get home.

Erzberger

  • Playmaker Newbie
  • *
  • Posts: 5
Ok, the simple solution provided in the link worked for me. I probably dumbed it down a bit further. I basically created trigger boxes just outside the screen that teleported the player to the other side of the screen.
The complex solution is a bit too demanding for me right now, but I am pleased with the result I got.