Thread: How i make a film cast list ?

  1. #1
    Registered User
    Join Date
    Feb 2012
    Posts
    3

    How i make a film cast list ?

    Hi everybody

    i am new member this borad and at c programming.

    i want to make a scrolling marquee (like a film cast list) from bottom to up. how i make this? this may be simple code.

    note: excuse me for my bad english.

  2. #2
    Registered User javaeyes's Avatar
    Join Date
    Feb 2012
    Posts
    153
    You probably don't want to do this in a programming language. It's pretty simple to do with flash. Look up tweening.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    If you want to do it in C, post back. It's probably not as easy as Flash's (tweening?), but it's not difficult either.

  4. #4
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    > but it's not difficult either.
    Wat? Yes it is. You basically have three options (if I'm not missing something):
    - Setting up an entire GUI library and learning how to use it, and then finding out how to integrate custom animations
    - Doing printf() alchemy with a lot of "\b" and sleep(), for a jittery textual rendering at best
    - Exporting the (generated) animation as some external format (animated gif, .mov, .avi, etc), by using a library and/or learning how the files are created

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Credit lists on films, are text based - no GUI is needed.

    I don't recall the display being jittery, but a lot of that depends on your hardware, and settings on your software. I have seen MANY credits on films, that were jittery however - especially the low budget films.

    I'm curious what this is for, because a type of video equipment has text display (including credit list generators), built into them. I can't imagine a videographer wouldn't have such a basic piece of equipment as that.

  6. #6
    Registered User javaeyes's Avatar
    Join Date
    Feb 2012
    Posts
    153
    Sure if you want a generic font family and low budget jittery text and hours of pointless work, by all mean write it in c. If you want a professional smooth animation finished in under an hour, use flash.

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    This was the kind of thing I was referring to. It's text based, and it doesn't scroll smoothly.

    Might be adequate for a school project, however.

    Code:
    #include <stdio.h>
    #include <string.h>
    #include <time.h>
    
    
    int main(void) {
       int i,c,sizes[44]={0},lmargin[44]={0};
       char *credits[]={"bride","Joanna Worthington","groom","Robert Sullivan","matron of honor",
       "Sue McIntyre","best man","John Smith","father of the bride","William Fox","mother of the bride",
       "Sharon Anderson","bride's ex","Tom Sanchez","maid of honor #1","Christine Li","maid of honor #2",
       "Selena Delgado","maid of honor #3","Alice Winegartner","grooms men #1","Jacque Glione",
       "grooms men #2","Bob Hardy","grooms men #3","Sven Johansson","minister","Steven Gomes",
       "videographer","Brice Carrolton","property manager","Cheryl Dafoe","director", "Richard Wu",
       "producer","Summit Entertainment","Mr. Wu's assistant","Dominique Sephardo","costume designer",
       "Denise Williams","Hair","Best Cuts","Catering","Food Best by Government Test"};
    
       //get the sizes
       for(i=0;i<44;i+=2){
          sizes[i] = strlen(credits[i]);
          //printf("sizes[i]: %d\n",sizes[i]);
          lmargin[i]=40-sizes[i];
       }
       for(i=0;i<10;i++)
          printf("\n\n\n\n"); 
       
       printf("                                    CAST\n\n");   
       for(i=0;i<43;i+=2) {
          for(c=0;c<lmargin[i];c++)
             putchar(' ');
          printf("%s  %s\n",credits[i],credits[i+1]);
          _sleep(1);
       }
    
       printf("\n");
       return 0;
    }
    Last edited by Adak; 02-19-2012 at 01:04 PM.

  8. #8
    Registered User
    Join Date
    Feb 2012
    Posts
    3
    thank u adak it was exactly I want but, when i want to compile this, it was closes immediately. then, i set the "_sleep(1);" >> "_sleep(1000);" ,,, it's run seamlessly.


    well, how we eliminate the this list above up?

    so, it shouldn't be done when the last line out from bottom.
    it should be done while the last line above up.
    how i do this?

    sorry my english is bad



    Quote Originally Posted by Adak View Post
    This was the kind of thing I was referring to. It's text based, and it doesn't scroll smoothly.

    Might be adequate for a school project, however.

    Code:
    #include <stdio.h>
    #include <string.h>
    #include <time.h>
    
    
    int main(void) {
       int i,c,sizes[44]={0},lmargin[44]={0};
       char *credits[]={"bride","Joanna Worthington","groom","Robert Sullivan","matron of honor",
       "Sue McIntyre","best man","John Smith","father of the bride","William Fox","mother of the bride",
       "Sharon Anderson","bride's ex","Tom Sanchez","maid of honor #1","Christine Li","maid of honor #2",
       "Selena Delgado","maid of honor #3","Alice Winegartner","grooms men #1","Jacque Glione",
       "grooms men #2","Bob Hardy","grooms men #3","Sven Johansson","minister","Steven Gomes",
       "videographer","Brice Carrolton","property manager","Cheryl Dafoe","director", "Richard Wu",
       "producer","Summit Entertainment","Mr. Wu's assistant","Dominique Sephardo","costume designer",
       "Denise Williams","Hair","Best Cuts","Catering","Food Best by Government Test"};
    
       //get the sizes
       for(i=0;i<44;i+=2){
          sizes[i] = strlen(credits[i]);
          //printf("sizes[i]: %d\n",sizes[i]);
          lmargin[i]=40-sizes[i];
       }
       for(i=0;i<10;i++)
          printf("\n\n\n\n"); 
       
       printf("                                    CAST\n\n");   
       for(i=0;i<43;i+=2) {
          for(c=0;c<lmargin[i];c++)
             putchar(' ');
          printf("%s  %s\n",credits[i],credits[i+1]);
          _sleep(1);
       }
    
       printf("\n");
       return 0;
    }

  9. #9
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Hollywood's best sequel! Even more breathtaking!!

    Code:
    #include <stdio.h>
    #include <time.h>
    
    #define MAX 120
    #define MAXRows 43
    
    int main(void) {
       int i;
       char *credits[]={"bride","Joanna Worthington","groom","Robert Sullivan","matron of honor",
       "Sue McIntyre","best man","John Smith","father of the bride","William Fox","mother of the bride",
       "Sharon Anderson","bride's ex","Tom Sanchez","maid of honor #1","Christine Li","maid of honor #2",
       "Selena Delgado","maid of honor #3","Alice Winegartner","grooms men #1","Jacque Glione",
       "grooms men #2","Bob Hardy","grooms men #3","Sven Johansson","minister","Steven Gomes",
       "videographer","Brice Carrolton","property manager","Cheryl Dafoe","director", "Richard Wu",
       "producer","Dujour Entertainment","Mr. Wu's assistant","Dominique Sephardo","costume designer",
       "Denise Williams","Hair","Best Cuts","Catering","Food Best by Government Test","*"};
    
       for(i=0;i<10;i++)
          printf("\n\n\n\n"); 
    
       printf("                                    CAST\n\n");   
       i=0;
       while(credits[i]!= "*") {
          printf("%40s  %s\n",credits[i],credits[i+1]);
          _sleep(1);
          i+=2;
       }
       for(i=0;i<MAXRows;i++) {
          putchar('\n');
          _sleep(1);
       }
       printf("\n");
       return 0;
    }
    Well, simpler anyway. XD

  10. #10
    Registered User
    Join Date
    Feb 2012
    Posts
    3
    you are amazing adak ! thank you much.

  11. #11
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Code:
    while (credits[i] != "*")
    vv

    Code:
    #include <string.h>
    /* ... */
    while (strcmp(credits[i], "*"))
    :P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Animated Gif to a new level - short film
    By blueCheese in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-22-2004, 09:02 PM
  2. Irony for gibson film
    By Thantos in forum A Brief History of Cprogramming.com
    Replies: 22
    Last Post: 03-04-2004, 07:54 AM
  3. Funny little film/song.
    By adrianxw in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 10-22-2003, 10:24 PM
  4. Watching a dvd film.
    By adrianxw in forum Tech Board
    Replies: 5
    Last Post: 03-11-2003, 02:25 AM
  5. Funniest Film Moments
    By minesweeper in forum A Brief History of Cprogramming.com
    Replies: 25
    Last Post: 04-13-2002, 07:30 PM