I figured out why this is happening, and happens mostly with vsync off. its because of the way i am capturing change events.BPzeBanshee wrote:Woohoo! TATE works! Unfortunately I just discovered that the fullscreen toggle seems to lock me into fullscreen rather than go into Windowed mode. It does *something* but it just seems to flicker in and out. Odd. Scanlines definitely work too and look beautiful.
I cant replicate this at all. apart from the vsync off jitteryness, i dont see any slowdown. however i ll try running it on different system and see if it happens.BPzeBanshee wrote: Furthermore, I think I'm definitely having some kind of performance issue happening. When TATEd I find the game slows down when I use a bomb.
BPzeBanshee wrote: On the bright side though, the jitteryness I was having turned out to be from whatever timer system you've got in place (or at least I think it's that), because turning vsync on made it run quite smoothly apart from feeling a little bit laggy in input.
Code: Select all
void state_manager::run()
{
int loop = 0;
this->timer.start_timer();
while(this->accumulator >= this->deltatime) //deltatime set at 16
{//update block
//16.6667 = 1000 ms / 60 framepersecond | approx 16ms per frame, 62 FPS
this->accumulator -= this->deltatime;
loop++;
if(loop <= 1) //MAX 1 update per pass
{
this->bin->clear();
this->input->update(); //get frame input for game objects
state_stack.top()->hash();
state_stack.top()->collision();
state_stack.top()->update();
state_stack.top()->hudupdate();
}
}
{//render block
this->display->clear_screen();
//draw back marquee
this->drawmarquee();
//game render block
this->renderer->set_camera(this->state_stack.top()->cam.position);
this->renderer->set_camera(vector2df(this->state_stack.top()->cam.slider.var, 0.0f));
this->state_stack.top()->render();
this->renderer->reset_camera();//resets camera
this->state_stack.top()->hudrender();
this->renderer->reset_camera();//resets slider
//draw scanline block
this->drawscanline();
//finish
this->renderer->finalize();
}
//this->timer.delay(this->deltatime - this->timer.end_timer()); //sleep in free time, current build has this enabled
//has different effects at different times, resolution = 2ms, if less than 2ms returns immediately
this->display->swap_buffers();
this->accumulator += this->timer.end_timer();
}