I have tested astrofora/starfield_donut demo in some emulators and im getting these strange artifacts, lastest SGDK version from git.
I have to admit I never tested with older versions, but it doesnt seem right only the top ones seem to be updated correctly
Edit i was doing stress tests in my application, i am using bundled sprite engine and controlling frames directly. I noticed that if i have lots of stuff in the screen but i dont change frame animation fps keeps at steady 60fps. But when i change frame, say 6/second, fps can drop to as low as 30 fps( there is collision code sumed to both cases).
I noticed that this sample does things a bit different. Even though the perfomance is good i see there are these artifacts
Artifacts on astrofora/starfield sample
Moderator: Stef
Artifacts on astrofora/starfield sample
- Attachments
-
- artifacts.png (13.57 KiB) Viewed 2928 times
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Artifacts on astrofora/starfield sample
Artefacts are expected as we reach the limit of sprites per line. Also there are different way of displaying these animated sprites on screen. If you re upload frame data for all sprites it will be very slow (but can be a good benchmark), if you pre upload all animations to VRAM then just change VRAM index for sprite it will be much faster (60 FPS easily).
Re: Artifacts on astrofora/starfield sample
Nevermind, i am checking spr_test.c from samples, and seeing benchmark there, thanks
I guess these are these methos fastest ones?
Initialization
Main Loop
I found it strange that in the complete initialization it is not incrementing "s" like in the main loop, maybe that is a bug.
I guess these are these methos fastest ones?
Initialization
Animation* anim = donut.animations[0];
(...)
TileSet* tileset = anim->frames->tileset;
VDP_loadTileSet(tileset, vramIndex, TRUE);
(...) After creating sprite
SPR_setAutoTileUpload(spr, FALSE);
(...)
/* Manually set VRAM index */
SPR_setVRAMTileIndex(spr, animVramIndexes[((s >> 4) + i) & 0x7]);
Main Loop
SPR_setVRAMTileIndex(spr, animVramIndexes[((s >> 4) + i) & 0x7]);
I found it strange that in the complete initialization it is not incrementing "s" like in the main loop, maybe that is a bug.