whole BG

Forum for J2ME mobile games related topics including programming doubts, books and other resources for J2ME game development

whole BG

Postby rahul7star » Sun Jul 27, 2008 3:59 am

Hi

well now i am able to move BG(only 1 image..dats keep on replicating :( ) and player can walk and jump also.....but how to make a complete BG (with diff object)where many up and down tiles are there and he can jump on that...can this attached images helps me to proceed....plz solve this issue ...do i need to use tilelayer concept, or how can i modify this attached image so that i can fix tile any wer i want....



Thanks ..
Attachments
images.jpg
images.jpg (2.8 KiB) Viewed 4777 times
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Sun Jul 27, 2008 10:06 am

In this case, you can fill the background in blue and then move the cloud images from right to left as the player moves. In this case, you don't need tiles as it will slow down the game. Better use color fill and only 2 images that move. Otherwise you can bring those things to the tiles in the foreground also.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Sun Jul 27, 2008 4:04 pm

Hi thanks for ur help....but in this case cloud is fixed how can i move that...sorry if i asked stupid question..but i dont knw the ans.... :(
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Mon Jul 28, 2008 4:40 am

"When the clouds are fixed", do you mean fixed in the screen? then I hope you dont have to move it but draw in the same place everytime. But if you mean fixed in the bg, you have to move it 1 pixel everytime when the player moves in the opposite direction of the player.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Mon Jul 28, 2008 5:40 am

Hi
can you plz provide me a link where BG is moving ..so that i can undertsand how things are goin on ......


thanks
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Mon Jul 28, 2008 5:48 am

You can check this game, Goto this url for free mobile games and download the Racer Hunter game, I'll explain according to this context.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Mon Jul 28, 2008 6:22 am

Hi well this is wap link...not possible to run into pC :( ..........how to chk this
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Mon Jul 28, 2008 6:36 am

May be you can test that with your S60 emulator. Otherwise, try it from your handset.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Mon Jul 28, 2008 6:42 am

well IF the game is free y dont u provide me the source code so that i can go through this....plz


thanks...
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Mon Jul 28, 2008 6:45 am

Its free but not open-source. If you check the game and let me know if you have any doubt I can explain you how we wrote the code. In this forum, we don't share our complete source code but we help you solving your problems.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Mon Jul 28, 2008 11:30 am

hi
i wasted my whole day to find as how to scroll BG along with player but in vain...............plz give me nyother link (codes not urs but forn other source))


i really need to get rid of this problm help me...................................
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Mon Jul 28, 2008 11:55 am

Code: Select all
            for(int i = -(x % background.getWidth()); i <= Store.DisplayWidth; i += background.getWidth())
                g.drawImage(background, i, 0, g.TOP|g.LEFT);


This is the code we use for most repeated background screens. X is the location of the player in x axis and keeps on increasing as the player moves right.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Mon Jul 28, 2008 12:05 pm

i want to show u my jar file plz send me your mail id ...and y jar cannt be uploaded here :shock:
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Re: whole BG

Postby DevelopmentTeam » Mon Jul 28, 2008 12:24 pm

plz try uploading it in a zip file, or send it to hari [ @ ] smackall.com
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India

Re: whole BG

Postby rahul7star » Tue Jul 29, 2008 5:28 am

i had sent u mail ..plz go through this...........can you povide me gmail id ..if possible


thanks
rahul
rahul7star
Regular User
 
Posts: 84
Joined: Fri Aug 17, 2007 11:22 am

Next

Return to J2ME Games

Who is online

Users browsing this forum: No registered users and 1 guest

cron