Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline panky  
#1 Posted : Thursday, September 5, 2013 10:24:07 AM(UTC)
panky

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 :)
UserPostedImage

Camera plan

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline internetfreak  
#2 Posted : Thursday, September 5, 2013 11:09:16 AM(UTC)
internetfreak

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 :)
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline panky  
#3 Posted : Thursday, September 5, 2013 12:32:21 PM(UTC)
panky

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. :)
Offline internetfreak  
#4 Posted : Thursday, September 5, 2013 4:34:58 PM(UTC)
internetfreak

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
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline panky  
#5 Posted : Friday, September 6, 2013 11:33:16 AM(UTC)
panky

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.
Offline Benjamin  
#6 Posted : Wednesday, September 11, 2013 9:48:45 AM(UTC)
Benjamin

Medals: Admin

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
Rss Feed  Atom Feed
Users browsing this topic
Guest (2), OceanSpiders 2.0
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.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.055 seconds.