URGENT HELP!!

Non-platform specific questions.

URGENT HELP!!

Postby CrimsonTheDarkBat » Sat Feb 20, 2010 9:33 pm

Hey all.
I need some help majorly!
For my latest creation, I wan't my damn ugly physics to be fixed properly.
My last game PHailed due to this issue ¬¬
Basically, when you run up a hill/slope the camera shakes madly!
AND, when you run down a hill/slope, you seem to bounce a bit.

I have the core engine enclosed as an attatchment. See it to help me!
PLEASE!
Attachments
CoreEngine.zip
The Core Engine.
(1.53 MiB) Downloaded 43 times
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: URGENT HELP!!

Postby Hblade » Sun Feb 21, 2010 2:52 am

To do this, dont make the player the views parent. Instead, do this inside of Draw Actor (Assuming your resolution is 640x480)
Code: Select all
if (xscreen>328)
{
view.x+=4 //Assuming your player speed is 4 (when key down is pressed)
}
if (xscreen<313)
{
view.x-=4;
}
if (yscreen>248)
{
view.y+=4;
}
if (yscreen<233)
{
view.y-=4;
}

That should do it :D The view will only move if the player is a view pixels off from the center :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: URGENT HELP!!

Postby Bee-Ant » Sun Feb 21, 2010 6:12 am

Hblade wrote:To do this, dont make the player the views parent. Instead, do this inside of Draw Actor (Assuming your resolution is 640x480)
Code: Select all
if (xscreen>328)
{
view.x+=4 //Assuming your player speed is 4 (when key down is pressed)
}
if (xscreen<313)
{
view.x-=4;
}
if (yscreen>248)
{
view.y+=4;
}
if (yscreen<233)
{
view.y-=4;
}

That should do it :D The view will only move if the player is a view pixels off from the center :3

Instead of doing this, you better do :
view-DrawActor :
Code: Select all
x=max(player.x-340,min(x,player.x-300));
y=max(player.y-340,min(y,player.y-300));
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: URGENT HELP!!

Postby CrimsonTheDarkBat » Sun Feb 21, 2010 1:48 pm

Thanks guys, this fixed my problem :)

But, now whenever the player falls, he takes forever to hit the end of the view,
and the walls seem to defy gravity? :(

Any help regarding that peeps? :D
Sonic Velocity Development Thread --> http://game-editor.com/forum/viewtopic.php?f=4&t=11461

Completed Games:
Sonic: War of the Emeralds
Sonic: Empire of Nightmares
Sonic.EXE - The Game
Alice: Crimson Omen
Epsilon 27
User avatar
CrimsonTheDarkBat
 
Posts: 223
Joined: Fri Mar 21, 2008 10:54 am
Score: 20 Give a positive score

Re: URGENT HELP!!

Postby Hblade » Sun Feb 21, 2010 3:31 pm

Beeant, how do you learn this stuff! :D You just tought me somthin' :P
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: URGENT HELP!!

Postby Bee-Ant » Sun Feb 21, 2010 5:54 pm

CrimsonTheDarkBat wrote:Thanks guys, this fixed my problem :)

But, now whenever the player falls, he takes forever to hit the end of the view,
and the walls seem to defy gravity? :(

Any help regarding that peeps? :D

Wall defy gravity?
May try this :
Player-Collision-Left and Right side of Wall :
Code: Select all
yvelocity++;

After you add the Physical Response.
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: URGENT HELP!!

Postby Bee-Ant » Sun Feb 21, 2010 5:56 pm

Hblade wrote:Beeant, how do you learn this stuff?

From my anchestor :P
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: URGENT HELP!!

Postby Hblade » Sun Feb 21, 2010 6:02 pm

xD
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron