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.

2D All the way! / 2D Camera?

Author
Message
Luciant
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location:
Posted: 11th Dec 2008 07:06
Hello, I am loading a background larger than my current screen, I have an animated sprite that can walk around but I am trying to make it so the screen will move along with the character.

The 2D functions in Dark GDK seems to just have a update and some other stuff for 3D cameras.

Is there a simple function that someone can show?

Basically just move camera once players x position is over 70% of screen etc.

But I'm not sure how to create a larger environment and focus the camera on the sprite. Thx
Smaadmin
15
Years of Service
User Offline
Joined: 23rd Nov 2008
Location:
Posted: 13th Dec 2008 16:06
Thats easy

when your players position is say at greater then 70% of the screen, move all the objects on the screen, including the background AND the character to the left. And to the right for less than 30%

add me on smaadmin@hotmail.com and i can help you with it, also giving it very smooth camera movement

SMAAD presents GOD (Glory Of Dementia).. wierd music... and games... GLOWWORM BETA DEMO AVAILABLE, PLEASE REVIEW AND GIVE FEEDBACK: http://forum.thegamecreators.com/?m=forum_view&t=140564&b=8
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 13th Dec 2008 19:31
Or use the 2d image to texture a flat 3d plain, and use the 3d camera commands.

~Zenassem
Luciant
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location:
Posted: 14th Dec 2008 09:10
yeah, i got that. im just working on diagional scrolling now
Luciant
15
Years of Service
User Offline
Joined: 11th Dec 2008
Location:
Posted: 16th Dec 2008 01:46
I have the movement method here but my only issue is the fact that when the player hits the push mark on the screen, it will stick there and not be able to move backoutside the push zone.
i have to stop the sprite from moving and start the background moving when I reach the zone, so there is a issue with collision with the "zones".

I am probably missing one small step here, if not i might have to try a 3d camera, but i dont know how to set that up from here.

any helpers?



Login to post a reply

Server time is: 2024-05-03 23:48:49
Your offset time is: 2024-05-03 23:48:49