GPWiki.org
GPWiki.org
It is currently Thu Jun 20, 2013 4:58 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Jun 28, 2011 3:26 pm 
Hi,
I am new in this site. I want to make an aero-fighter game.
But the main thing is I do not know how can i or what is the best idea to fell the gamer that the plane(aero-plane) is moving.
I think that i can move the background picture . But how can i do this ?
Please help me.


Top
  
 
PostPosted: Tue Jun 28, 2011 4:10 pm 
Cubic Contributor

Joined: Fri Apr 09, 2010 4:16 pm
Posts: 69
Location: wichita KS
So you have a plane flying around, and since it's centered you can't actually see it's moving? Probably the easiest way to handle that is to draw all objects at there location, minus the coordinates of the plane. You could just do this for the background picture as well, but it would have to be just as big as the area the plane is allowed to fly in or else the plane would fly off the picture. So what you probably want to do is this, give the background picture it's own location coordinates, and have them change as a function of the plane's speed. So if the plane goes to the right by 5 pixels, maybe the background picture should move one pixel. Then when the background picture has moved a certain distance it resets back to center. In order for the player to not see a jump though the picture will have to be a pattern and the re-centering has to occur exactly at the edge of one pattern length. That way when the player gauges his movement against the sky, it wont be very fast, but when he gauges it against the ground (which will move at one to one with the plane) or other objects he will appear to be going fast, just like a real plane. If you wanted to get more complicated still you could try parralax scrolling, which means you have a layered background image and the different layers move at different speeds. The near layer might be a skyline, and the far one might be the clouds.

I hope I wrote that clearly, and best of luck with your game! Feel free to ask about what I said if it doesn't make sense.

_________________
I code theirfor I am.
And more importently, theirfor my program am.
wait is that right... theirfor my code ams? no...theirfor i is... no... oh idk


Top
 Profile  
 
PostPosted: Wed Jun 29, 2011 10:28 am 
Thanks :thumbs . I have understood.
But how can i make the background picture? Frame by frame background picture? Is there any tools that can cut the motion picture in to many frame so that i can add them in my background?


Top
  
 
PostPosted: Wed Jun 29, 2011 5:46 pm 
Cubic Contributor

Joined: Fri Apr 09, 2010 4:16 pm
Posts: 69
Location: wichita KS
Unless the background picture has an animation you will only need one frame, you can make it like any other picture, I once used an actual photograph of the sky! The movement comes from rendering the picture at different coordinates. On the other hand, if you DO want it to be an animation, the best thing to do is have several pictures and cycle which one is rendered every so many frames.

_________________
I code theirfor I am.
And more importently, theirfor my program am.
wait is that right... theirfor my code ams? no...theirfor i is... no... oh idk


Top
 Profile  
 
PostPosted: Fri Jul 01, 2011 8:29 am 
Thanks :spin


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group