Author Topic: Tutorial  (Read 4671 times)

0 Members and 1 Guest are viewing this topic.

Offline Jaze

  • Newbie
  • Posts: 86
    • View Profile
Tutorial
« on: April 07, 2021, 07:43:05 pm »
I've done the tutorial (http://www.qb64sourcecode.com/) until finishing Task 6. Apart from one blatantly obvious error I didn't learn anything new. I wondered if the error was a typo. Looking closer at identical errors it seems deliberate. I am hoping for Task 7 onward there are no more errors.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #1 on: April 07, 2021, 08:33:33 pm »
Quote
I wondered if the error was a typo. Looking closer at identical errors it seems deliberate.

So what error are you talking about?

« Last Edit: April 07, 2021, 08:35:50 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #2 on: April 07, 2021, 09:58:29 pm »
I have to say, Task 7 is when things just start to get interesting.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Tutorial
« Reply #3 on: April 08, 2021, 09:37:06 am »
Hi Jaze
you've got my curiosity because I had followed that tutorial some years ago (when it has another structured aspect but the content I think in th 99% is the same and 1% is for adapting to the Opengl Version of QB64, while the first time it has been built for QB64 SDL version) and also with the perspective to get magical secrets about game programming. So sure someone can have some reflections when the teacher lead you to repeat the foundation of programming (IDE, typing rules, basic syntax of QB45/QB64 with exercises and solutions).  Sure going on you can get the essence of BASIC programming in relation with game programming: IEO = Input (keyboard, mouse, joystick) /Elaboration (math math math and again math) / Output (graphic, images, sound, music).

about
Quote
I wondered if the error was a typo. Looking closer at identical errors it seems deliberate.
an error is when syntax is wrong or the logical flow of instructions gives a result different from that expected.  You talk about a typo that is deliberate... so you let think me about code examples. A more specific feedback can be useful for errata corrige of a text.

About ability of the author to game programming see these his works:
https://www.qb64.org/forum/index.php?topic=2523.0
https://www.qb64.org/forum/index.php?topic=2304.0
https://www.qb64.org/forum/index.php?topic=2298.0
https://www.qb64.org/forum/index.php?topic=2297.0
https://www.qb64.org/forum/index.php?topic=2264.0

Welcome to this community
Programming isn't difficult, only it's  consuming time and coffee

Offline Jaze

  • Newbie
  • Posts: 86
    • View Profile
Re: Tutorial
« Reply #4 on: May 02, 2021, 04:06:03 pm »
I don't recall what task had the error but it was written as TRUE when the correct code was clearly FALSE or vice versa. Anyway, I tried task 7 but that's where it starts getting over my head. I can do patterns of lines and such but putting an image like the pawn in the chess game is beyond me. I'd have to show a graphic by creating it one pixel at a time. Oh well. I can still pick a goal and code my way to it. I enjoy figuring out how to get something done such as writing an algorithm for returning the number of minutes apart two day/time entries are.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #5 on: May 02, 2021, 04:26:09 pm »
Yeah I discovered something recently from that tutorial. You can't copy/paste code from it (that I could see).

So it is kind of hard to post here what the thing is you are talking about there. So need lots of description to figure out what you are talking about. Task 7 exercise 3... the part about Keyword.... or 1/3 way down in code... something like that? or take a screen shot and circle area in question?
« Last Edit: May 02, 2021, 04:29:19 pm by bplus »

FellippeHeitor

  • Guest
Re: Tutorial
« Reply #6 on: May 02, 2021, 06:40:31 pm »
Terry has made all code available in a zip in the home page of the tutorial site.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #7 on: May 02, 2021, 07:45:42 pm »
Terry has made all code available in a zip in the home page of the tutorial site.

Got it, thanks!

Offline fistfullofnails

  • Newbie
  • Posts: 12
    • View Profile
Re: Tutorial
« Reply #8 on: May 08, 2021, 08:55:06 pm »
I have a very difficult time coding, but I’ve made it to task 11, and I remember a few errors.  I feel like it’s a test to see if you are actually staying on your toes or just copying and pasting code, or just typing it in without trying to think about it. 

I very much like it for the most part, until there’s a program like the calendar with the scrolling led display.  I feel a lot of it went unexplained and well over my head. 

When you mentioned something about a chess piece being displayed, it really threw me off.  I definitely do not recall encountering anything like that.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #9 on: May 08, 2021, 09:19:51 pm »
Quote
until there’s a program like the calendar with the scrolling led display

Wow where is that!?

Update: Task #11 Nice Led Screen, that's something alright!
« Last Edit: May 08, 2021, 09:33:13 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #10 on: May 08, 2021, 10:08:57 pm »
@fistfullofnails

To demystify that LED screen some, run the code commenting out the the Led.mask line

'_PutImage , LED.Mask '

Then you just see large text scrolling across the screen.

How to make text that large? _PutImage will expand or shrink an image of text to fit any rectangle on screen you tell it.

So do you know how to scroll normal text message from one side of screen to other? or just scroll a label?

Do that, take a picture of it on a side draw area setup with _NEWIMAGE and blow up the little 8x16 characters onto a much larger screen area with _PUTIMAGE.

Then lay a mask over that looks like a grill or a grate or a grid, something full of holes. Terry's code gives option of round holes or square. That's what lets the yellow from the letters show through the holes and make the LED effect.
« Last Edit: May 08, 2021, 10:11:20 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #11 on: May 09, 2021, 12:03:29 am »
I have the LED screen building laid out in the 3 steps here:
https://www.qb64.org/forum/index.php?topic=3884.msg132232#msg132232

Offline fistfullofnails

  • Newbie
  • Posts: 12
    • View Profile
Re: Tutorial
« Reply #12 on: May 20, 2021, 02:43:54 am »
I have the LED screen building laid out in the 3 steps here:
https://www.qb64.org/forum/index.php?topic=3884.msg132232#msg132232

Holy smokes bplus.  Those tips explained a lot.  Thanks

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Tutorial
« Reply #13 on: May 20, 2021, 12:32:27 pm »
Holy smokes bplus.  Those tips explained a lot.  Thanks

Yes I had fun with that too, so thanks back to you, I have a nice thing now for that effect, we all do! ;-))

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Re: Tutorial
« Reply #14 on: May 21, 2021, 03:23:35 am »
Doing scrolling text with _PUTIMAGE is fast, elegant, and versatile, but it's too easy and I suspect
more can be learned by doing it with only the commands available in QB4.5.  Access the font table(s) in your graphics card (CGA or VGA font), or load them from data statements or a file, then plot them as only the rightmost column (not the entire letter), scroll, plot again, etc.  Making the scrolling fast and smooth is then a true challenge!  Also, at least double the size of those fonts, on the fly.
It works better if you plug it in.