Search found 172 matches

by alko
Sat Jan 02, 2016 8:00 pm
Forum: SGDK
Topic: synchronization of game cycles
Replies: 9
Views: 4872

Re: synchronization of game cycles

I did not understand... Do you offer like that? int TICKS_PER_SECOND; int SKIP_TICKS; int MAX_FRAMESKIP ; u32 CB; int loops; ... int main() { loops = 0; MAX_FRAMESKIP = 10; TICKS_PER_SECOND = 50; SKIP_TICKS = 1000 / TICKS_PER_SECOND; SYS_setVIntCallback(CB); while(TRUE) { while( CB > next_game_tick ...
by alko
Fri Jan 01, 2016 6:58 pm
Forum: SGDK
Topic: synchronization of game cycles
Replies: 9
Views: 4872

synchronization of game cycles

:wink: I want to normalize FPS. fact is that with the appearance of those or other particles also appearance lags. int dx; int dy; ... while(TRUE) { handleInput(); drawObjects(); drawParticles1(); drawParticles2(); SPR_update(sprites, 80); VDP_waitVSync(); } that is, depending on changes FPS must be...
by alko
Tue Dec 29, 2015 8:20 am
Forum: SGDK
Topic: Theorical question about the planes
Replies: 12
Views: 7219

Re: Theorical question about the planes

let us suppose have a picture img1 (size 32*32) if to do int i; int j; for(i=0;i<10;i++) { for(j=0;j<8;j++) { VDP_drawImageEx(BPLAN, &img1, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, ind), i*4, j*4, FALSE, TRUE); } } then it turns out that every time the image is decompressed from the ROM in the VDP-...
by alko
Mon Dec 28, 2015 12:33 pm
Forum: SGDK
Topic: Theorical question about the planes
Replies: 12
Views: 7219

Re: Theorical question about the planes

how to fast fill a PLANE of the array identical pictures (for example 32*32 or 64*64 each picture) directly from VDP-RAM :?:
by alko
Sun Dec 27, 2015 9:00 am
Forum: SGDK
Topic: Theorical question about the sprites
Replies: 45
Views: 26531

Re: Theorical question about the sprites

Is possible to adjust the priority draw a sprites between themselves?
sprites[2] atop sprites[1]. And vice versa.
by alko
Sat Dec 26, 2015 4:28 pm
Forum: SGDK
Topic: Theorical question about the planes
Replies: 12
Views: 7219

Re: Theorical question about the planes

however, mirroring planes useful in the development of top-down games for generate terrain.

for example:
Image
by alko
Sat Dec 26, 2015 4:05 pm
Forum: SGDK
Topic: Theorical question about the sprites
Replies: 45
Views: 26531

Re: Theorical question about the sprites

how to scroll a sprite layer?
by alko
Fri Dec 18, 2015 7:46 pm
Forum: SGDK
Topic: Theorical question about the planes
Replies: 12
Views: 7219

Re: Theorical question about the planes

if do not use compression then picture is updated faster, but the lag is still there.
by alko
Fri Dec 18, 2015 4:30 pm
Forum: SGDK
Topic: Theorical question about the planes
Replies: 12
Views: 7219

Re: Theorical question about the planes

I do not need a very fast frame rates. at least to update image does not slow down the gameplay, and that is not visible process of updating pictures. main() { .... while(1) { update_game(); fon_anim(); } } static void fon_anim() { fon_anim_count++; if(fon_anim_count==5) { VDP_drawImageEx(BPLAN, &im...
by alko
Fri Dec 18, 2015 12:13 pm
Forum: SGDK
Topic: Theorical question about the planes
Replies: 12
Views: 7219

Theorical question about the planes

how to fast draw compressed images ("-1" in gfx.res) on the planes for real-time animation consisting of 2 or 3 frames ?
by alko
Tue Dec 15, 2015 6:22 pm
Forum: SGDK
Topic: Drawing graphics to different planes
Replies: 11
Views: 6732

Re: Drawing graphics to different planes

much time expended on unpack and loading to vdp-ram.
Maybe somehow create cache in system-ram where unpack the images?
by alko
Tue Dec 15, 2015 9:53 am
Forum: SGDK
Topic: Drawing graphics to different planes
Replies: 11
Views: 6732

Re: Drawing graphics to different planes

danke schön yet i'm trying make an animated background. But obtained only lags, and static background. static void fon_anim() { fon_anim_count++; if(fon_anim_count<10) { VDP_drawImageEx(BPLAN, &fon1, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE); //ind += fon1.tileset->numTile; ...
by alko
Mon Dec 14, 2015 8:47 pm
Forum: SGDK
Topic: Drawing graphics to different planes
Replies: 11
Views: 6732

Re: Drawing graphics to different planes

whether is possible to change priority draw PLANES ?
in order to draw APLAN over sprite-layer.
by alko
Sat Dec 12, 2015 11:35 am
Forum: SGDK
Topic: Mirror a sprite
Replies: 7
Views: 4310

Re: Mirror a sprite

that is, if the image is symmetriс, then rescomp automatically detect it during compression "-1" ?
I understand correctly?
Image
by alko
Fri Dec 11, 2015 8:46 pm
Forum: SGDK
Topic: Mirror a sprite
Replies: 7
Views: 4310

Re: Mirror a sprite

Yes, it could be nice.
it could save the memory through the symmetry of backgrounds.