Joined: 9/6/2012(UTC) Posts: 32
Thanks: 3 times Was thanked: 1 time(s) in 1 post(s)
|
I want to make a simple 2D game. How can I make a level which is wider than viewport (height is equal). The user can move the camera left or right if he clicks on the right/left side on the screen. Please find attached image (paint rulz) Game started with main menu (like GhostWars), then I load Level01Scene (inherited from Scene). And I stopped :) Camera plan
|
|
|
|
Joined: 12/19/2011(UTC) Posts: 529
Thanks: 10 times Was thanked: 16 time(s) in 15 post(s)
|
Basically you should be able to draw outside of the Screen or at least you can position your sprite outside of the screen, it doesn't get rendered from delta as long as it's outside to save performance. When the user clicks left/right, you just move the sprite towards the appropriate direction, so if the user clicks on the left side, you move the sprite towards there and similar for the right side, only the movement has to be the opposite. Look at the Sidescroller sample, it should be more or less the correct direction to start, even though it has no manual camera, it should be that what you desire :) |
|
|
|
|
Joined: 9/6/2012(UTC) Posts: 32
Thanks: 3 times Was thanked: 1 time(s) in 1 post(s)
|
Thank you I think it will be perfect for me. :)
|
|
|
|
Joined: 12/19/2011(UTC) Posts: 529
Thanks: 10 times Was thanked: 16 time(s) in 15 post(s)
|
I'm glad I could help you :) Let us hear your results, we're always there to help |
|
|
|
|
Joined: 9/6/2012(UTC) Posts: 32
Thanks: 3 times Was thanked: 1 time(s) in 1 post(s)
|
Sure, I can working on this on weekend a bit more. I'll show you I got.
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
For a bit more guidance you could also check the Tutorials 10-20, which do similar things as in the SideScroller sample and explain how to do it step by step: http://deltaengine.net/learn/tutorials#entities10
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.