Let me state first off that this is not a school assignment, its something I thought that would be nice to do and well I ended up with the idea of using arrays to perform the task (if possible).
I've done a cast-based animation with a static int, and bool, which works, however is limited to one line (prove me wrong, I'm still new to this).
This is what I have so far, in terms of the function that animates the 'billboard':
I have two, two-dimensional arrays, and I am using a recursion function (several nested) to change their values.
As you can see I've tried a lot of methods that I have commented out and most just deleted (the current version does something bizzarre). The problem I am having is that its not giving me any error instead it doesn't print the desired results. I've had it do what I wanted (in a sense) diagonally, however printing in a non-chronological order.
I'm trying to imitate a common advertising electronic billboard you see everywhere that shuffles a message (or picture) across the screen or perform some sort of animation.
I'm quite confident its possible to do this in C++ while it may be tedious, I hope someone can help me out here.
Thanks.
I've done a cast-based animation with a static int, and bool, which works, however is limited to one line (prove me wrong, I'm still new to this).
This is what I have so far, in terms of the function that animates the 'billboard':
Code:
void animateBoard() { //for (int x = 0; x < 20; x++) //{ for (int i = 0; i < 20; i++) { for (int j = 0; j < 20; j++) { for (int k = 0; k < 20; k++) { myArray[k][i] = myDisplay[k][19-i]; //myArray[19-k][j-19-i] = '_'; } for (int l = 0; l < 20; l++) { myArray[l][i-j] = myDisplay[l][19-i]; } displayBoard(); Sleep(250); system("cls"); } /* int x, y, i, j; y = 19; for (i = 0; i < 20; i++) { x = 19; for (j = 0; j < 20; j++) { myArray[j][i] = myDisplay[x][y]; x--; } y--; Sleep(250); system("cls"); displayBoard(); //for (x = 0; x <= i; x++) //{ // for (y = 0; y <= j; y++) // { // myArray[y][x] = '_'; // } //Sleep(220); //system("cls"); //displayBoard(); //} } */ } }
As you can see I've tried a lot of methods that I have commented out and most just deleted (the current version does something bizzarre). The problem I am having is that its not giving me any error instead it doesn't print the desired results. I've had it do what I wanted (in a sense) diagonally, however printing in a non-chronological order.
I'm trying to imitate a common advertising electronic billboard you see everywhere that shuffles a message (or picture) across the screen or perform some sort of animation.
I'm quite confident its possible to do this in C++ while it may be tedious, I hope someone can help me out here.
Thanks.
Comment