Wednesday, June 2, 2010

Summer Break

Thanks for the awesome year guys!

Enjoy your summer!


.

Tuesday, May 11, 2010

Jump Code

// Up top

bool jump = false;
bool falling = false;
bool ready = true;

// In Update

if (keystate.IsKeyDown(Keys.Space) && oldKeyState.IsKeyUp(Keys.Space) && !jump && ready)
{
jump = true;
ready = false;
velocity = new Vector2(0f, -5f);
playerPos.Y--;
}

if (jump)
{
playerPos += velocity;
if (playerPos.Y <= 440)
falling = true;
}

if (playerPos.Y <>
{
jump = false;
velocity += new Vector2(0f, (float)(13.8 * gameTime.ElapsedGameTime.TotalSeconds));
playerPos += velocity;
if (playerPos.Y > 450)
{
jump = false;
falling = false;
ready = true;
playerPos.Y = 450;
}
}

Thursday, May 6, 2010

2 Scrolling BG's

if (playerPos.X > 400)
{
bgPos.X-=bgspeed;
bg2Pos.X-=bgspeed;
}

if (bgPos.X == -800)
{
bg2Pos.X = 800;
}
if (bg2Pos.X == -800)
{
bgPos.X = 800;
}

SSL-VPN

Log into Windows
  • https://remote.cantonlocal.org/
  • Accept all SSL exceptions
  • Choose either Java or ActiveX; install all controls needed

Wednesday, May 5, 2010

Path Follow

Vector2 location = new Vector2(400, 300);

int pathIndex = 1;


...


if (pathIndex == 1 && location.Y >= 100)
{
location.Y--;

if (location.Y == 100)
pathIndex = 2;
}

if (pathIndex == 2 && location.X <= 700)
{
location.X++;

if (location.X == 700)
pathIndex = 3;
}

Monday, May 3, 2010

2D Side-Scroller Tutorial


Our assignment today is to read, follow, and reproduce THIS TUTORIAL

Aim for a level of mastery such that you can reapply the methods used in your own game.


.

Friday, April 30, 2010

Sprite Sheet Adaptations

After the review session, we're going to implement the code from yesterday:
  • This is where I borrowed the project
  • Add the animation effect to either Pong or Raining Triangles of Death.
  • The addition should make sense and add effect to your game.
  • You have the entire class to make your additions.
  • You are working by yourself.
  • You can do this.
  • I will not be looking at your code whilst answering your questions.

.