Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CRT and set FPS bugs
#1
Hi!

I found 2 bugs in Tilengine.

The first one is about the CRT filter. When I set a bitmap as background and a tilemap as layer, I have a strange glitch with the CRT enabled (nothing special if disabled) :
[Image: c074ae287b032a05044bcb97fe177df1-Full.webp?w=1308&h=863]

Here is the code :
Code:
#include "Tilengine.h"
#include <SDL2/SDL.h>

int main(void) {
    TLN_Tilemap foreground;

    TLN_Init (400, 240, 1, 0, 0);

    TLN_Bitmap bm = TLN_LoadBitmap("elis.bmp");
    TLN_Tilemap tm = TLN_LoadTilemap("assets/sonic/Sonic_md_fg1.tmx", NULL);
    TLN_SetBGBitmap(bm);
    TLN_SetLayerTilemap(0, tm);
    TLN_CreateWindow (NULL, CWF_S3|CWF_NOVSYNC);
    int fps = 60;
    TLN_SetTargetFps(10);
    int average_fps = 0;
    while (TLN_ProcessWindow()) {
        /* adjust game logic pacing to target fps */
        uint32_t begin = SDL_GetTicks();
TLN_DrawFrame(0);
        uint32_t end = SDL_GetTicks();
        uint32_t delta = end - begin;
        printf("FPS = %f\n", 1000.0 / (float)delta);
    }

    TLN_Deinit ();
}


The second is when I change the FPS, seems the animations of the flowers are always at the same speed. Is that normal? Shouldn't it be slower (or faster if above screen refresh rate)?

Thanks for your answer!
Reply


Messages In This Thread
CRT and set FPS bugs - by System64 - 03-28-2024, 07:29 AM
RE: CRT and set FPS bugs - by megamarc - 04-02-2024, 04:20 AM
RE: CRT and set FPS bugs - by System64 - 04-02-2024, 10:36 AM
RE: CRT and set FPS bugs - by megamarc - 04-04-2024, 03:18 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)