Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 4:25 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: creating world!!!!
PostPosted: Wed Jun 20, 2012 4:07 pm 
Offline

Joined: Fri Nov 11, 2011 7:49 am
Posts: 58
hi guys!!

im makin a 2D horizontal side scroller train game!!so ive made the graphics!!as like there are 15-20 images with stations,farms,mountain along the tracks!

now my question is how do i join all this like when i press up key the train moves(actually we know that the bacground only moves makin an illusion as train moves).

i want it like first the train starts from station A and it goes across the farm and then mountain to the next station.so how do i do that??


what i have done so far is im havin a variable worldCount

so when the worldCount is 0.station is drawn in the screen with the next image drawn in the ((0-imageWidth),0) so when station moves the next image follows it makin a illusion of train moving.so when each image crosses screenwidth.the count is ++ed.

and after worldCount = 2 the farm is loaded in two variables of type Image it loops around the screen creating a view as the train is going across a great valley of farm!!for like 30 to 40 values of worldCount it is repeated after that value the mountain is loaded to the image makin the same process and at a given value like worldCount=some 50 the next station is loaded making the train arraiving at the station.

so this is what my brain could think!!!but this may not be the best algorithm.also when switching between images i mean from station to farm and farm to mountains it causes flickering making it artificial.so can anyone say a better way to do this thing???

_________________
http://jakkarrl.in/


Top
 Profile  
 
 Post subject: Re: creating world!!!!
PostPosted: Thu Jun 21, 2012 8:21 pm 
Offline
Regular

Joined: Thu Sep 22, 2011 4:39 pm
Posts: 165
Location: Belgium
maybe you could preload your images using a spritesheet?


Top
 Profile  
 
 Post subject: Re: creating world!!!!
PostPosted: Fri Jun 22, 2012 10:49 pm 
Offline

Joined: Wed Jun 20, 2012 9:18 pm
Posts: 9
Could you tell me what you used to make the graphics? i cant make art for my life


Top
 Profile  
 
 Post subject: Re: creating world!!!!
PostPosted: Sat Jun 23, 2012 12:30 pm 
Offline

Joined: Fri Nov 11, 2011 7:49 am
Posts: 58
mortias wrote:
maybe you could preload your images using a spritesheet?




how do i do that???

_________________
http://jakkarrl.in/


Top
 Profile  
 
 Post subject: Re: creating world!!!!
PostPosted: Sat Jun 23, 2012 12:30 pm 
Offline

Joined: Fri Nov 11, 2011 7:49 am
Posts: 58
Olipton wrote:
Could you tell me what you used to make the graphics? i cant make art for my life




i took some tilesets and used Tiled to put them the way i want!! and i saved it as png images

_________________
http://jakkarrl.in/


Top
 Profile  
 
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 0 guests


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
You cannot post attachments in this forum

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