silverman
Nombre de messages : 970 Age : 52 Localisation : Picardie Date d'inscription : 18/03/2015
| Sujet: Re: Titrage - génériques Ven 3 Fév 2017 - 11:57 | |
| Je viens de comprendre la cause du ralentissement, c'est l'arrièrre plan animé le responsable(2 grandes images chargées dans 4 sprites). En chargeant une image fixe dans le scene2d, c'est déjà plus véloce et enlever les 'pause' devient trop rapide; voyez: - Code:
-
WIDTH 0, 800 HEIGHT 0, 500 LEFT 0,(screen_x-800)/2 TOP 0,(screen_y-500)/2
LABEL Quitter
DIM x,y,z
DIM h,w w = WIDTH_CLIENT(0) h = HEIGHT_CLIENT(0)
ON_CLOSE 0, Quitter
espace_sideral()
generic_part_1() generic_part_2() generic_part_3() generic_part_4() generic_part_5()
TERMINATE end ' ------------------------------------------------------------------------------ SUB generic_part_1() DIM_LOCAL i FONT_NAME 10,"arial" FONT_SIZE 10,30 FONT_BOLD 10 FONT_COLOR 10,0,160,40 : ' couleur des textes SPRITE_TEXT 1," Une Production " SPRITE_TEXT 2," MARC Limited " SPRITE_POSITION 1, 250,170 SPRITE_POSITION 2, 250,220 FOR i = 1 to 25 deplace() pause 50 NEXT i SPRITE_SHOW 1 SPRITE_SHOW 2 FOR i = 1 to 10 deplace() pause 50 NEXT i FOR i = 0 to -70 STEP -1 SPRITE_BRIGHTNESS 1, i SPRITE_BRIGHTNESS 2, i deplace() pause 50 NEXT i SPRITE_HIDE 1 SPRITE_HIDE 2 END_SUB ' ------------------------------------------------------------------------------ SUB generic_part_2() DIM_LOCAL i FONT_NAME 10,"arial" FONT_SIZE 10,25 FONT_BOLD 10 FONT_COLOR 10,0,200,250 : ' couleur des textes SPRITE_TEXT 1," Il y a quelque temps, naissait " SPRITE_TEXT 2," un langage simple et convivial," SPRITE_TEXT 3," très convivial… " SPRITE_POSITION 1, 150,150 SPRITE_POSITION 2, 150,200 SPRITE_POSITION 3, 150,250 SPRITE_SHOW 1 SPRITE_SHOW 2 SPRITE_SHOW 3 FOR i = 1 to 10 deplace() pause 50 NEXT i FOR i = 0 to -25 STEP -1 SPRITE_BRIGHTNESS 1, i SPRITE_BRIGHTNESS 2, i SPRITE_BRIGHTNESS 3, i deplace() pause 25 NEXT i SPRITE_HIDE 1 SPRITE_HIDE 2 SPRITE_HIDE 3 END_SUB ' ------------------------------------------------------------------------------ SUB generic_part_3() DIM_LOCAL i,j FONT_NAME 10,"arial" FONT_SIZE 10,50 FONT_COLOR 10,240,240,127 : ' couleur des textes FONT_BOLD_off 10 SPRITE_TEXT 1," Le langage " FONT_BOLD_OFF 10 FONT_SIZE 10,60 SPRITE_TEXT 2," PANORAMIC " SPRITE_POSITION 1, 200,140 SPRITE_POSITION 2, 130,240 SPRITE_SHOW 1 SPRITE_SHOW 2 FOR i = 1 to 10 deplace() pause 50 NEXT i FOR i = 0 to 250 step 2 SPRITE_POSITION 1,200+i,140-i deplace() NEXT i FOR i = 0 to -25 STEP -1 SPRITE_BRIGHTNESS 2, i deplace() pause 25 NEXT i SPRITE_HIDE 1 SPRITE_HIDE 2 END_SUB ' ------------------------------------------------------------------------------ SUB generic_part_4() DIM_LOCAL i,j,k FONT_NAME 10,"arial" FONT_SIZE 10,24 FONT_BOLD_OFF 10 FONT_COLOR 10,240,250,50 : ' couleur des textes SPRITE_TEXT 1,"PANORAMIC est un langage simple" SPRITE_TEXT 2,"et convivial utilisant la syntaxe du" SPRITE_TEXT 3,"célèbre langage Basic. Il a été étudié" SPRITE_TEXT 4,"pour être simple d'utilisation." SPRITE_TEXT 5,"Ce logiciel s'appelle PANORAMIC" SPRITE_TEXT 6,"parce qu'il a un très large champ" SPRITE_TEXT 7,"d'activités : objets systèmes, sons" SPRITE_TEXT 8,"musiques, images, films, dessins" SPRITE_TEXT 9,"en 2D, mondes 2D avec gestion de" SPRITE_TEXT 10,"SPRITES, mondes 3D avec objets 3D" SPRITE_TEXT 11,"caméra 3D, lumière 3D, fichiers texte" SPRITE_TEXT 12,"pilotage d'EXCEL, etc, etc." FOR i = 1 to 12 SPRITE_POSITION i, 135,-500+(38*i) SPRITE_SHOW i NEXT i k=1 FOR i = 450 to -500 STEP -1 FOR j = 1 to 12 SPRITE_POSITION j, 135,i+(j*38) ' DISPLAY NEXT j NEXT i FOR i = 1 to 12 SPRITE_HIDE i NEXT i END_SUB ' ------------------------------------------------------------------------------ SUB generic_part_5() DIM_LOCAL i ,j FONT_NAME 10,"arial" FONT_SIZE 10,80 FONT_BOLD 10 FONT_COLOR 10,250,250,250 : ' couleur des textes SPRITE_TEXT 1," F " SPRITE_TEXT 2, " I " SPRITE_TEXT 3, " N " SPRITE_POSITION 1, 770,170 SPRITE_POSITION 2, 350,170 SPRITE_POSITION 3, -100,170 FOR i = 1 to 3 SPRITE_SHOW i NEXT i FOR j = 500 to 0 STEP -2 SPRITE_POSITION 1,270+j,170 SPRITE_POSITION 3,400-j,170 ' DISPLAY deplace() NEXT j
FOR i = 1 to 10 deplace() pause 50 NEXT i FOR i = 0 to -50 STEP -1 SPRITE_BRIGHTNESS 1, i SPRITE_BRIGHTNESS 2, i SPRITE_BRIGHTNESS 3, i deplace() Pause 50 NEXT i SPRITE_HIDE 1 FOR i = 0 to -50 STEP -2 FOR j = 20 to 23
' SPRITE_BRIGHTNESS j, i deplace() ' pause 50 NEXT j NEXT i END_SUB ' ------------------------------------------------------------------------------ SUB Espace_sideral() DIM_LOCAL i% picture 1 FULL_SPACE 1 COLOR 1,0,0,0 2d_target_is 1 2d_pen_color 255,255,255 for i%=1 to 250 2d_point int(rnd(w)),int(rnd(h)) next i% for i%=1 to 25 2d_circle int(rnd(w)),int(rnd(h)),2 next i% ' IMAGE 2 ' 2D_IMAGE_COPY 2,0,0,w,h ' CLS ' COLOR 1,0,0,0 ' 2d_target_is 1 ' 2d_pen_color 255,255,255 for i%=1 to 250 2d_point int(rnd(w)),int(rnd(h)) next i% for i%=1 to 10 2d_circle int(rnd(w)),int(rnd(h)),3 next i% IMAGE 3 2D_IMAGE_COPY 3,0,0,w,h file_save 3,"marc37_image.bmp" ' 2d_target_is 0 delete 1 : delete 3
SCENE2D 10 FULL_SPACE 10 file_load 10,"marc37_image.bmp" file_delete "marc37_image.bmp" SPRITE_CREATE_HIDE FOR i% = 1 to 12 SPRITE i% NEXT i% ' FOR i% = 20 to 23 ' SPRITE i% ' NEXT i% ' SPRITE_IMAGE_LOAD 20,3 ' SPRITE_IMAGE_LOAD 21,3 ' SPRITE_IMAGE_LOAD 22,2 ' SPRITE_IMAGE_LOAD 23,2 ' x=0 ' y=0 ' SPRITE_POSITION 20,x,y-h ' SPRITE_POSITION 21,x,y ' SPRITE_POSITION 22,x,z-h ' SPRITE_POSITION 23,x,z ' FOR i% = 20 to 23 ' SPRITE_SHOW i% ' NEXT i% END_SUB ' ------------------------------------------------------------------------------ SUB deplace() exit_sub SPRITE_POSITION 20,x,y-h SPRITE_POSITION 21,x,y pause 10 SPRITE_POSITION 22,x,z-h SPRITE_POSITION 23,x,z y=y+1 z=z+1 pause 10 SPRITE_POSITION 20,x,y-h SPRITE_POSITION 21,x,y y=y+1 END_SUB ' ------------------------------------------------------------------------------ Quitter: TERMINATE RETURN ' ------------------------------------------------------------------------------ | |
|