Jump to content

  • Log In with Google      Sign In   
  • Create Account


SIC Games

Member Since 22 Jun 2012
Offline Last Active Aug 13 2014 09:50 AM

Posts I've Made

In Topic: What happened to Rastertek?

13 August 2014 - 09:49 AM

I need to always expand my skills so I may be converting rastertek tutorials everything into DirectX11.1 and openGL. When fully finished I'll send the link to anyone who will needed the tutorials. Sounds cool?


In Topic: What happened to Rastertek?

03 August 2014 - 02:26 PM

Apparently the guy from twitter told me the person doing the tutorials permently  stopped. Just completely stopped creating the tutorials. Here's my conversation snipplet of the conversation below.


In Topic: Camer Shake Effect when big scary monster comes charging

02 August 2014 - 11:40 AM

Yes, the execessive jitter was the main issue because I looked at the log file and I saw the if statements were never being reached because the cameraShakeAmount was constantly accumulating to the current camera Yaw and testing to see if if was greater than the maxium shake amount was never being reached. So I came up with this new code which helps out a lot more than previous and I don't have to multiply the results to the camera yaw - just assign it.

void CameraShake() {
		static float shakeAmount = 0.0f;
		float oldCameraYaw = cameraYaw;

		static float maxShake = 1.0f * cameraYaw + (1.0f * XM_PI / 2 * 0.2f);
		static float rndJerkiness = ((rand() % 5) - 2);

		shakeAmount += 0.5f; // +rndJerkiness; // ((rand() % 2) + cameraYaw - 2); // +(XM_PI / 4.0f);

		if (shakeAmount > 1.0f * maxShake) {
			shakeAmount *= -0.5f; // * rndJerkiness;
		}
		if (shakeAmount < -1.0f * maxShake) {
			shakeAmount *= 0.5f;// *rndJerkiness;
		}
		oldCameraYaw = shakeAmount;
		cameraYaw = oldCameraYaw;
		updateCameraLens();


	}

I know I can use XM_PIDIV2 for the max shake equation but I'll get to that later. What's good is that it doesn't shake out of countrol leaving the player facing the other direction. If the player got to ecape he sure doesn't want to face a wall or obstacle each time the ground shakes.  The camera shake may be used as a post process effect which I'll get into later because I don't think I want the camera to shake all the time - only when there's a major event happen to signify the importance of why the ground is shaking. Like tomb stones rising from the ground or something or the ground breaking in half causing the camera shake effect to happen. Or when the house explodes at the ending or something like that.

 

I may even create a joint for the camera to the player so if the ground shakes the camera will be linked to the player already as the player moves up and down - creating the effect of camera shake in first player mode.

 

I love the fact when I come on here my creative juices begin flowing because of the help with great people on this forum.


In Topic: Camer Shake Effect when big scary monster comes charging

02 August 2014 - 09:28 AM

Only reason why I chose the rotation not position is because the rotation avoids collision detection with walls - so if the player is pinned against the wall and the camera shake happens - then there could be issues, right? In some games I was able to go pass the physics collider of a wall or something with enough running and jumping at the wall (doesn't do it a lot though). The rotation keeps the player at the same position giving a bit jitter.


In Topic: What happened to Rastertek?

30 July 2014 - 11:13 AM

You're a Ninja too! :D  Any word yet? If not I can use the webarchive url post. It doesn't expire til Novemeber 2014 - perhaps he's redesgning the site??


PARTNERS