is there a way to move shapes by x and y in Allegro 4.2? -


i'm newbie allegro may simple question.

i'm wondering if there way move allegro shapes x,y without filling circle made black circle , making new circle.

currently have while loop moves circle moving filling current 1 black circle , making new 1 x , y little different i'd know if there way move allegro shapes x,y because seems make game slow.

here current while way:

int x=100; int y = 100; int tempx,tempy;   while(1) { tempx=x; tempy=y;     circlefill ( screen, tempx, tempy, 20, makecol( 0,0, 0));     circlefill ( screen, x, y, 20, makecol( 0, 0, 255)) x+=10; y+=10; } 

thanks

you need use buffer.

after set graphics mode, create bitmap screen_w,screen_h big. on every frame, clear bitmap, draw blue circle @ x, y, draw buffer screen.

i suggest take @ many examples come allegro or read tutorials, because there many elementary important things need learn.

also, highly recommend using allegro 5 since actively developed , has api far more suitable modern hardware.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -