Sign in to follow this  
grzegorz_ae

How to show a part of screen? Award for answer!

Recommended Posts

[color=#1C2837][size=2]Hi,
I'm developer of game Space STG II for Android phones... and I want to add to this game new option. To do this I need to know how to do movable screen. I want to do a battle like in Might & Magic Heroes, but in mobile phone screen is small... I don't know how developers show only a part on screen of all things on map. I want to make a small map in corner which show which part of map is shown on screen.
I can't find it :/ I spend 2 days and I found only 2d tile moving, but I need smooth moves. Please help. I will give activation codes for Space STG II for help.
Here is link to game:
[url="https://market.android.com/details?id=org.ovh.grzegorzaeSTG2&feature=more_from_developer"]Space STG II link[/url] [/size][/color]

Share this post


Link to post
Share on other sites
This is one of the simplest things to do; Maybe I dont understand your question.

If you are using say OpenGL or DirectX, there are matrices you can use. Simply multiply all vertex coords by the matrix and your good.

lets say your level is 2x the size of the screen width. To move "right" you do M = MC where M is the current transform matrix and C is a translation matrix in the -x direction (moving everything backward, which in turn shows everything to the right)

draw as usual but with the added matrix to every point

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this