Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / how do i make 2d sidescroller scroll thing

Author
Message
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 30th Jan 2009 14:04 Edited at: 30th Jan 2009 14:35
Well topic much says all i have to say.
I just need to know how to scroll my camera (i dont know if i can call it like that in 2d)


GDK Developer since now
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 30th Jan 2009 15:43
In 2D you don't scroll a camera. You move your background. You essentially have to determine programatically what you need to display based on the current position of the central focus of the scroll.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 30th Jan 2009 16:29
ok so what i do is when player moves toward x axis i scroll background when player reaches some position on screen ?

GDK Developer since now
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 30th Jan 2009 16:56
It's a little beyond what I have time to go into at the moment. Essentially it depends on whether you're using tiles or not. If so then you need to determine which tiles are currently in the view port and how much to shift them in whatever direction.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 30th Jan 2009 18:06 Edited at: 30th Jan 2009 18:07
well i will use only a one map (sprite for map) since im making simple game now(shooter game like soldat(i dont say soldat is simple )).
can you give me some links about how could i make tile map and use it.

GDK Developer since now
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 30th Jan 2009 18:27
I haven't really looked into it but others here might have some pointers to some resources. If I were to do such a game I'd probably decide at the time how I'd do it depending largely on what my resources were and other things related to the graphics at hand.

General rule for support with general game related development is http://www.gamedev.net/. You'll have to sign up but it's all free and there are many forums for asking these kinds of questions and past articles that cover a large number of subjects.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 30th Jan 2009 19:10
Ok i hope ill find things i need there

GDK Developer since now
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 1st Feb 2009 22:31
Or u could use 3d planes to make things like, for example Soldat.
Check it out, it is realy cool

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Feb 2009 01:52
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 4th Feb 2009 00:21
Dont know.. What about her? I just picked a random image that I could see anyone else using.

Login to post a reply

Server time is: 2024-09-30 17:37:56
Your offset time is: 2024-09-30 17:37:56