Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


Toshio

Member Since 16 Sep 2011
Offline Last Active Nov 24 2012 03:55 PM

Posts I've Made

In Topic: Weird artifacts and Frame Independent Movement

20 August 2012 - 02:54 PM

Thank you all, fixed the problem by moving the texture coordinates :)

In Topic: Weird artifacts and Frame Independent Movement

20 August 2012 - 03:38 AM

I think the artifacts are caused by wrapping. Clamping the texture to edges should prevent this.


I am using Clamp to edge.

The easiest way to fix those lines is probably to move the texture coordinates by 0.5 pixels. And for your timestepping problem: http://gafferongames...-your-timestep/


How can I move the texture coordinates by pixels?

In Topic: Returning an element from an array

18 July 2012 - 03:31 AM

Wow, thank you Servant of the Lord. Everything works now :D
Thanks ApochPiQ and everyone else who helped :)

In Topic: Returning an element from an array

17 July 2012 - 05:47 PM

void Game::OnInit()
{	
    Map map;
    Player p(map);
    p.Init();
}

void Game::OnLoop()
{
    Map map;
    Player p(map);
    p.Move();
}

Nothing compiles as it should.
Here are those two functions:

void Player::Init()
{
    CSurface c;
    x = 100;
    y = 100;
    texture = c.loadTexture("player.png");
}
void Player::Move()
{
    x += xVel * (delta / 1000.0f);
    y += yVel * (delta / 1000.0f);
 
    //...
}

In Topic: Returning an element from an array

17 July 2012 - 05:19 PM

Hmm.. It compiles now, but the initialization, loop and rendering of the Player all got messed up. None works properly.. Anyone knows why that might have happened?

PARTNERS