Changing the game screen area/size/position to allow perfect wrap x and wrap y

ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
Hi everyone

I'm currently creating a retro shoot em up like asteroids but I'm having trouble with my WRAP X & Y area.

The main problem is that the game screen area that would normally be the whole visible screen area is different on my game.

I have created a virtual arcade cabinet that sits over the scene. There is an area in the top main part of the screen that shows the action but there are also sides and a bottom area (Where the gamer controls are - rotate, thrust and shoot). The controls are on the arcade cabinet graphic that sits over the whole game screen.

I have the wrap x and y working great but as you might imagine now, when the player goes off the top of the game screen it wraps ok on the y axis but it doesn't appear straight away in the game screen as its obviously still traveling up the screen under the cabinet graphic until it pops up again on the game screen.

My question...is it possible to set the game screen area on a scene so that my wrap x and y will work correctly. It's not such a problem on the X axis as there is minimal cabinet showing on the sides, its on the Y axis as the bottom of the scene shows the arcade cabinet control area, which just has the arcade buttons on them...

Can anyone help or am i stuck with the screen as it is.

Thanks guys :)

It takes a Zombie to know a Zombie!!!

Comments

  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    edited December 2013
    I've added a screen of my game to show you all what the game screen looks like...hopefully it will make sense - as you can see the actual game screen area is located within the scene...this is what I want to define so the Wrap X & Y work correctly.

    image

    Thanks guys

    It takes a Zombie to know a Zombie!!!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You can capture the actor's x and y velocities when they reach the edge of your smaller screen area and then change their position to the opposite edge of the smaller screen and set their velocity to the captured amounts.

    Come to think of it, you might be able to just get away with changing their position as I think their velocity would continue at that point.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    yeah that might work...will try that idea. Thanks Tatiang

    It takes a Zombie to know a Zombie!!!

Sign In or Register to comment.