The big stutter comes from the fact, that you're reloading the font in every single loop iteration, which is quite a heavy operation. When you load it only once the stuttering is only minimal. I'm not quite sure what you're interpolation is doing and I don't really want to read the whole article, so maybe you could give a quick summary? What's the actual advantage over the one without + interpolate?
Anyways the problem probably is that you eventually can only display on integer coordinates (since 1px is the smallest resolution with an untouched view), thus moving between 0.0px and 1.0px well get rounded up or down and can sometimes lead to strange stuttering.
Here's the slightly modified code:
#include <SFML/Graphics.hpp>
#include <iostream>
const int TICKS_PER_SECOND = 25;
const int SKIP_TICKS = 1000 / TICKS_PER_SECOND;
const int MAX_FRAMESKIP = 5;
//StateManager TargetState;
int main()
{
sf::RenderWindow Window(sf::VideoMode(800,600,32), "Test", !sf::Style::Resize | sf::Style::Close);
// Game loop variables
sf::Clock ticker;
sf::Int32 next_game_tick = ticker.getElapsedTime().asMilliseconds();
int loops;
float interpolation;
//TargetState.changeState(MenuState::Instance(&Window));
sf::Font font;
font.loadFromFile("arial.ttf");
while(Window.isOpen()) {
//TargetState.input();
// Update the game
loops = 0;
while(ticker.getElapsedTime().asMilliseconds() > next_game_tick && loops < MAX_FRAMESKIP) {
//TargetState.update();
next_game_tick += SKIP_TICKS;
++loops;
sf::Event event;
while(Window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
Window.close();
}
}
interpolation = float(ticker.getElapsedTime().asMilliseconds() + SKIP_TICKS - next_game_tick)
/ float (SKIP_TICKS);
Window.clear();
//TargetState.draw(interpolation);
sf::Text test("###", font, 250);
sf::Text test2("###", font, 250);
static float lex = 0.0;
test.setPosition(lex + interpolation, 0);
test2.setPosition(lex , 200);
lex += 0.05;
Window.draw(test);
Window.draw(test2);
Window.display();
}
return 0;
}