Page 1 of 3

Tutorial videos by LCL

PostPosted: Thu Jun 07, 2012 8:25 pm
by lcl
Hello all!

I have now started making the tutorials.
I will update all the video tutorials to this topic and non-video (xD)
tutorials will be published as independent topics.

Tutorial 1 - Timers
Image
Click the picture to see the video

Tutorial 2 - Bitmap Tutorial Part I
Image
Click the picture to see the video

Tutorial 3 - Bitmap Tutorial Part II
Image
Click the picture to see the video

Tutorial 4 - Showing text and numbers (using sprintf() function)
Image
Click the picture to see the video

More tutorials will come as I get them done.
Tell me if these tutorials are helpful and tell me what I need to do better for the tutorials to come.

I hope these are helpful! :)

Re: Tutorial videos by LCL

PostPosted: Fri Jun 08, 2012 12:44 am
by SuperSonic
+1 for the bmp tutorial. I'm gonna watch it right now! :P

EDIT* Oh no! It's a cliff hanger! You have to make part 2 RIGHT NOW :shock:

Just kidding. Take your time :wink:

Re: Tutorial videos by LCL

PostPosted: Fri Jun 08, 2012 2:51 am
by Hblade
Cool! :D

Re: Tutorial videos by LCL

PostPosted: Fri Jun 08, 2012 10:35 am
by lcl
SuperSonic wrote:+1 for the bmp tutorial. I'm gonna watch it right now! :P

EDIT* Oh no! It's a cliff hanger! You have to make part 2 RIGHT NOW :shock:

Just kidding. Take your time :wink:

Yeah sorry about that, it was quite late here when I got the first part finished so I was too tired to make the another one. And I don't have time to work on the videos this weekend so you will have to wait a few days.. :/

But thanks for the point! :lol:

Re: Tutorial videos by LCL

PostPosted: Fri Jun 08, 2012 1:02 pm
by SuperSonic
lcl wrote:Yeah sorry about that, it was quite late here when I got the first part finished so I was too tired to make the another one. And I don't have time to work on the videos this weekend so you will have to wait a few days.. :/
Noooooo :cry:

lcl wrote:But thanks for the point! :lol:
Haha, no problem :wink:

Re: Tutorial videos by LCL

PostPosted: Sat Jun 09, 2012 12:17 am
by Jagmaster
#define Awesome
void watch_tutorial()
{
bmp_tutorial = Awesome;
if(bmp_tutorial == Awesome)
{
lcl.points++;
Jagmaster.happy=true.
}
}

Kinda redundant with the if statement, but it gets the point across. :wink:
Keep 'em coming!

Re: Tutorial videos by LCL

PostPosted: Sun Jun 10, 2012 7:04 am
by lcl
Thanks Jagmaster! :)

@SuperSonic: I might have some good news for you, my sunday turned out to be a day with lots of free time so I'm pretty sure I can finish the BMP tutorial already today! :--)

I will probably make some other tutorials today too. Videos and/or written tutorials.
I think an essential thing will be the written version of the BMP tutorial. :D

Re: Tutorial videos by LCL

PostPosted: Sun Jun 10, 2012 11:05 pm
by lcl
Sorry, I can't get the tutorial done today.. I recorded the video but my microphone kept making strange noise and it was difficult to understand what I said because of that. After struggling with it I found out that the charger of my laptop was causing the noise.. :P

And now I'm too tired to make the tutorial anymore. I'm sorry but you will have to wait a little more.. :oops:

Re: Tutorial videos by LCL

PostPosted: Mon Jun 11, 2012 9:41 pm
by SuperSonic
lcl wrote:And now I'm too tired to make the tutorial anymore. I'm sorry but you will have to wait a little more.. :oops:
No problem. But it's good that you found what was making the noise :P

Re: Tutorial videos by LCL

PostPosted: Wed Jun 13, 2012 12:08 am
by lcl
Bitmap tutorial has now been finished! :D

It seems that youtube messed up the sound on the part I of the bitmap tutorial, the sound is many seconds ahead the video.. :/
And I am sorry about that noise under my voice, it is most likely caused by my computers audio card, it may not be all that good. :P

Re: Tutorial videos by LCL

PostPosted: Wed Jun 13, 2012 1:07 am
by SuperSonic
No problem. This is GREAT! :P

+1 :wink:

Re: Tutorial videos by LCL

PostPosted: Wed Jun 13, 2012 11:05 am
by lcl
Thanks, glad you like it :)
I hope more people will watch the videos and tell their opinions about them so I can develop the way I do the videos. :)

Re: Tutorial videos by LCL

PostPosted: Wed Jun 13, 2012 12:29 pm
by SuperSonic
Ok, I have this wierd problem. I used your code but I changed it just a bit. Here's what I have:
Code: Select all
void ViewBMP(char *FP, int X, int Y)
{
    int header[64], i, j, WIDTH, HEIGHT;
    unsigned char R, G, B;
 
    FILE *BMP = fopen(FP, "r+b");
 
    for(i = 0; i < 64; i++)
    {
        header[i] = fgetc(BMP);
    }
 
    WIDTH  = header[18]+header[19]*256;
    HEIGHT = header[22]+header[23]*256;
 
    fseek(BMP, header[10], SEEK_SET);
 
    for(j = HEIGHT-1; j <= 0; j--)
    {
        for(i = 0; i < WIDTH; i++)
        {
            B = fgetc(BMP);
            G = fgetc(BMP);
            R = fgetc(BMP);
 
            setpen(R, G, B, 0, 1);
            putpixel(i + X, j + Y);
        }
        fseek(BMP, WIDTH%4, SEEK_CUR);
    }
    fclose(BMP);
}
As you can see, I pretty much just added the ability to view the image with X and Y. But this is wierd, I have a bitmap called "bitmap.bmp" and I have a canvas and on the canvas's create event, I put this:
Code: Select all
ViewBMP("bitmap.bmp", 32, 32);
//This makes the bitmap get displayed 32 pixels right, and 32 pixels down from the top left corner of the canvas
For some reason, when I start the game, nothing happens. I even waited for a while but still nothing happened. It's only a 32x32 bitmap. I don't think it would take a long time to draw. Also, the canvas takes up my full screen so it's not too small. Do you know what's wrong? :|

Re: Tutorial videos by LCL

PostPosted: Wed Jun 13, 2012 2:01 pm
by lcl
Have you tried the code with out the X and Y thing?

Re: Tutorial videos by LCL

PostPosted: Thu Jun 14, 2012 12:39 am
by SuperSonic
Yes, I have. Would you mind trying the code to see if it works for you? I'll give you a point just for trying :P