QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: TerryRitchie on April 19, 2020, 01:20:56 pm

Title: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 01:20:56 pm
I've been working on updating the QB64 tutorials at https://www.qb64sourcecode.com for the past 3 weeks.

I should be finished by no later than the end of May. I have 10 lessons done so far. I modernized the pages a bit by using Windows 10 screen shots and the look of today's QB64 IDE.

If you get a chance look over what I have and let me know if you see any glaring issues that need corrected.

Thanks, Terry.
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 19, 2020, 01:24:20 pm
This just happened two hours ago:

  [ This attachment cannot be displayed inline in 'Print Page' view ]  

Glad to hear you're at it again, Terry!
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 19, 2020, 01:25:31 pm
Oops, currently getting "page not found" for most links.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 01:27:38 pm
Uh oh, working on my end.

I recently added certificate to the site

try

https://www.qb64sourcecode.com/
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 19, 2020, 01:28:49 pm
Ah, that did it. You'll want some .htaccess trickery to force https on people.
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 19, 2020, 01:31:31 pm
You may also want to link directly to https://github.com/QB64Team/qb64/releases/latest (https://github.com/QB64Team/qb64/releases/latest)

That way the link will always point to the latest version.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 01:35:13 pm
Ah, that did it. You'll want some .htaccess trickery to force https on people.

Not a web coder in the slightest :-)  I'll look into the forced https.

Yes, I agree, I'll update the link to download QB64 so the latest is always available.
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 19, 2020, 01:42:14 pm
Me less, but Google is at our side. We use this to force it for Forum access:

Code: [Select]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
# POST AND PM INLINE ATTACHMENTS BEGINS
RewriteEngine on
RewriteRule attachment_(\d+)\.(\d+)_(\d+)\.pdf index.php?action=dlattach;topic=$1.$2;attach=$3
# POST AND PM INLINE ATTACHMENTS ENDS

This is in a file named .htaccess in the /forum subfolder. We don't keep it in the root (which is why qb64.org can be accessed via regular http) because we need to download using QB64 itself, which doesn't do HTTPS. Wiki doesn't have it either.

There some code up there to change how attachments work, but that's specific to the forum software. The first two lines should work for you if you place the file on your public_html folder.
Title: Re: QB64SOURCECODE.COM
Post by: CBTJD on April 19, 2020, 01:42:30 pm
The website and tutorials look amazing!

Unfortunately, I could not find the link for the Forward as described.
Quote
Before you start this course click here and please take a few minutes to read the forward.
Kudos for all the obvious effort! Looking forward to seeing your progress through May.
:@)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 01:48:31 pm
Some of the links still don't work. I'm actually working on the forward right now.

Also, all source code will be included with the asset file download as instructed in Task 1. All of the source code you see in the tutorials are actually PNG images so I could get all the color coding of the IDE.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 01:48:50 pm
Me less, but Google is at our side. We use this to force it for Forum access:

Code: [Select]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
# POST AND PM INLINE ATTACHMENTS BEGINS
RewriteEngine on
RewriteRule attachment_(\d+)\.(\d+)_(\d+)\.pdf index.php?action=dlattach;topic=$1.$2;attach=$3
# POST AND PM INLINE ATTACHMENTS ENDS

This is in a file named .htaccess in the /forum subfolder. We don't keep it in the root (which is why qb64.org can be accessed via regular http) because we need to download using QB64 itself, which doesn't do HTTPS. Wiki doesn't have it either.

There some code up there to change how attachments work, but that's specific to the forum software. The first two lines should work for you if you place the file on your public_html folder.

Thank you :-)
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 19, 2020, 01:55:22 pm
Well you got the .htaccess file worked out, I see. Your site NOW loads for...

http://qb64sourcecode.com/

https://qb64sourcecode.com/

http://www.qb64sourcecode.com/

https://www.qb64sourcecode.com/

Nice going!


Now about this for the First Program section...

"By default QB64 opens a pure text window (known as SCREEN 0) and runs programs in text mode. Figure 2 above shows the output of your program in an 80 character wide by 25 line high text screen. So what did your line of code actually do?"

Please modify that to include...

By default, QB64 opens a pure text window, known as SCREEN 0... (THE ONLY PROGRAMMING SCREEN YOU WILL EVER NEED!) and runs programs in text mode. Figure 2 above shows the output of your program in an 80 character wide by 25 line high text screen. So what did your line of code actually do?

Pete :D

PS: I wanted to find a link to something that you might find helpful, but it looks like the developer may have taken down his site. It is to a web-crawler, which was designed purposely to detect broken links and the page they are linked form. It's called Xenu Link Sleuth. I've used it for probably close to 20 years.

CNet still shows a download link for it. I figured with your anti-virus mad skills, it might be worth a look. If it's still up,and hasn't been tampered with, it would allow you to quickly detect any broken page links. Of course you could also search fro like products.

https://download.cnet.com/Xenu-s-Link-Sleuth/3000-10248_4-10020826.html

Pete

Title: Re: QB64SOURCECODE.COM
Post by: CBTJD on April 19, 2020, 02:37:28 pm
Some of the links still don't work. I'm actually working on the forward right now.
I cannot stress enough the incredible value of sites like yours - and I'm not just blowing smoke up your kilt!

Seriously, from my extensive research on the BASIC language industry, one of the key factors was community fan site contributions. For most versions of BASIC out there, they simply don't exist! On average, the best examples had one - ONE fan site! I can easily count four off the top of my head for QB64, and I haven't even started looking because, quite frankly, I don't have to! By that I mean, also unlike many versions of BASIC, the QB64 community has a strong and active forum, an engaged and responsive developer, a well-maintained instructional wiki, actively supported secondary application development projects, an extensive YouTube video tutorial library, and even numerous printed books! (thanks to the legacy compatibility with QBasic and QuickBASIC). So your site is not only a welcome resource, but a vital one in an industry that just doesn't seem to get it.

The best example to illustrate my point is XOJO (formerly RealBASIC). They have a guy who's sole job is to promote the language with video tutorials, forum contributions, and answering emails. They call him a "product evangelist". But outside of his efforts there are only three outside web sites; one is just a blog, another is a library of very old stuff based on RealBASIC that no longer exists but they still charge for their outdated materials(!), and the third is a tutorial site with only one tutorial! And this is for a version of BASIC that costs hundreds of dollars! Never mind the fact that XOJO isn't actually BASIC either. It's more of an OOP Rapid Application Development platform that just happens to include a very badly molested command set that has a passing resemblance to BASIC.

Contrast that with the Python community, which has extensive resources. (In fact, that inspires me to research the comparison between Python and QB64.) I loathe Python. It's not a bad language. It's just a lazy, drop-in, replacement for where BASIC SHOULD be today! I could write volumes about how BASIC went from THE language to "lingua non grata" due almost entirely to Microsoft's incompetence, but that's for another time. The educational community needed something to teach kids programming, and the closest thing to BASIC was Python - just because it was there.

So essentially, thank you! I look forward to watching your progress throughout the coming weeks.

:@)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 08:33:13 pm
So essentially, thank you! I look forward to watching your progress throughout the coming weeks.
:@)

Thank you :-)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 08:39:35 pm
Well you got the .htaccess file worked out, I see. Your site NOW loads for...

http://qb64sourcecode.com/

https://qb64sourcecode.com/

http://www.qb64sourcecode.com/

https://www.qb64sourcecode.com/

Nice going!

Thanks for verifying that Pete but I can't take credit for it. I sent an email to GoDaddy asking the best way to go about implementing what Fellippe suggested and they took care of it for me.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 19, 2020, 10:00:13 pm
All of the links in what I have uploaded now work (tasks 1 through 10). The link to the forward now works and I added links to the QB64 site areas of interest on the bottom of the home page.

It's been taking me anywhere from 1 to 4 days to get each task completed so if you check once a week you'll probably see a few more tasks added. I will also get the asset files download working tonight and as I add more tasks the asset file will get updated with the new content. I'll post an announcement and date on the home page when the asset file needs to be downloaded to get the latest content.

By the way, it was an email from qbkiller101 about a month ago that led me to update the tutorial. He enjoyed doing the "Your Turn" sections of the tutorials and was hoping I would add the ones that were not there. Awesome that someone his age wants to learn programming.
Title: Re: QB64SOURCECODE.COM
Post by: Dimster on April 20, 2020, 09:35:24 am
Thank you very much for this site Terry. I know you are still working on the site, would have any plans for a section on QB64 and mouse control? I haven't gone through the site completely, maybe there is something on working the mouse in there already.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 20, 2020, 09:46:06 am
Task 9: Gathering Input. I cover all aspects of mouse input with example code. The asset file can now be downloaded as well which contains the .BAS files of all code seen in the tasks. Go to Task 1 to download the asset file.
Title: Re: QB64SOURCECODE.COM
Post by: Dimster on April 20, 2020, 02:17:16 pm
ah yes - thanks again.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 21, 2020, 02:21:51 am
Task 11 has been added and the asset file updated.
Title: Re: QB64SOURCECODE.COM
Post by: bplus on April 21, 2020, 11:16:54 am
Really great work, glad you are working to complete the lessons, thumbs up!
Title: Re: QB64SOURCECODE.COM
Post by: Dimster on April 21, 2020, 02:44:46 pm
Hi Terry - again, sorry if I have missed this but is there a section/paragraph on Sound or String Math? Would you have any plans to add a Search feature? I think it's the color, common sense or just the layout of your Source Code site that has me. Not to mention, when you are not strong in coding, the "ah ha" moments it provides.
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 21, 2020, 02:57:49 pm
Did I hear someone mention string math? Hey Terry, if you want to add that at some point, and if you don't have a routine of your own, you are welcome to look into using mine.

Pete
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 21, 2020, 05:49:53 pm
Yep, a sound and math section are coming too. I figure there will be 25 sections when completed. The first math tutorial which I happen to working on right now will be the basic commands and their usage.

I'm designing the tutorials to be beginner oriented for the first half. The second half will be advanced topics building on what was learned in the first half. When I get to the advanced topics I'm sure I'll be asking for help and code examples, especially for the higher math, physics, and 3D related topics.

@Dimster Do you mean a section on search engines or a search engine for the site?

@Dimster @Pete String math?

This is what I have laid out for now

Task 1 - Install and setup QB64
Task 2 - Introducing the IDE
Task 3 - Your first program
Task 4 - Introducing variables
Task 5 - Conditions and branching
Task 6 - Looping
Task 7 - Graphics
Task 8 - Subroutines and functions
Task 9 - Gathering input
Task 10 - Variable arrays
Task 11 - String manipulation
Task 12 - Math functions
Task 13 - File input and output
Task 14 - Music and sound effects (end of beginner course)
Task 15 - Game design concepts
Task 16 - Advanced graphics
Task 17 - Sprites and sprite sheets
Task 18 - Collision detection and avoidance
Task 19 - Physics and timing
Task 20 - 3D and OpenGL
Task 21 - Recursion                         (end of advanced course)
Task 22 - Beginner build: Hangman (start of build series)
Task 23 - Intermediate build: Pong
Task 24 - Advanced build: Missile command
Task 25 - Expert build: Pac-Man
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 21, 2020, 05:50:13 pm
Really great work, glad you are working to complete the lessons, thumbs up!

Thanks :-)
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 21, 2020, 05:58:47 pm
String math as is using string variables instead of numeric variables to get around base 2 computer math errors.

From the thread: https://www.qb64.org/forum/index.php?topic=1093.30 or https://www.tapatalk.com/groups/qbasic/working-on-some-ideas-for-base-10-math-operations--t39442.html

Pete
Title: Re: QB64SOURCECODE.COM
Post by: OldMoses on April 21, 2020, 07:15:45 pm
I'm really looking forward to tasks 18 & 19. I've been bumping into those sorts of thorny issues lately.
Title: Re: QB64SOURCECODE.COM
Post by: Dimster on April 22, 2020, 12:03:06 pm
Terry - Search the site is what I meant - aka Wiki on Steroids
        - Pete's String Math. Finding some useful uses as it's more forgiving if I didn't DIM the variable correctly or math routine takes the result into Sc Note. Also a little handier with _PrintString
           then covering numeric to string and _Printstring. But I'm unsure of how to get the most out of it.

Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 22, 2020, 06:44:05 pm
Hi Terry
your work is wonderful!
I like the new style of your site!
I like your long project to bring until game building in the last chapters.

If you agree I must stress that the information about _PRESERVE option of REDIM seems to me uncomplete!  (chapter 10)
For now it seems to me that it works only on monodimensional arrays, both of simple type of data both of UDT. In the future it peharps can be extended to multidimensionale arrays.

here a demonstration
Code: QB64: [Select]
  1. ' monodimensional single element array
  2. REDIM a(1 TO 10) AS INTEGER
  3. PRINT " Initialize array a(1 to 10)"
  4. FOR b = 1 TO 10 STEP 1
  5.     a(b) = b * 11
  6.  
  7. PRINT "Showing array a(1 to 10)"
  8. FOR b = 1 TO 10 STEP 1
  9.     PRINT a(b); " ";
  10. PRINT "REDIM array a(1 to 15)"
  11. PRINT "Re showing array a(1 to 15)"
  12. FOR b = 1 TO UBOUND(a) STEP 1
  13.     PRINT a(b); " ";
  14.  
  15. TYPE poli
  16.     a AS INTEGER
  17.     b AS STRING * 3
  18.     c AS DOUBLE
  19. REDIM z(1 TO 10) AS poli
  20. PRINT "initialize array z(1 to 10) of UDT"
  21. FOR b = 1 TO 10 STEP 1
  22.     z(b).a = b
  23.     z(b).b = STR$(b)
  24.     z(b).c = b / 20
  25. PRINT "showing z array..."
  26. FOR b = 1 TO 10 STEP 1
  27.     PRINT z(b).a; " "; z(b).b; " "; z(b).c; "---"
  28. PRINT "REDIM z(1 to 15) of UDT"
  29. REDIM _PRESERVE z(1 TO 15) AS poli
  30. PRINT "Re showing z(1 to 15) of UDT"
  31. FOR b = 1 TO UBOUND(z) STEP 1
  32.     LOCATE 8 + b, 40: PRINT z(b).a; " "; z(b).b; " "; z(b).c; "---"
  33. PRINT " now we create a polidimensional array of integer"
  34. REDIM z1(1 TO 10, 1 TO 10, 1 TO 10) AS INTEGER
  35. PRINT "initialize array z1(1 to 10, 1 to 10, 1 to 10) of integer"
  36. FOR b = 1 TO 10 STEP 1
  37.     FOR c = 1 TO 10 STEP 1
  38.         FOR d = 1 TO 10 STEP 1
  39.             z1(b, c, d) = b
  40.             z1(b, c, d) = b * 10
  41.             z1(b, c, d) = b * 20
  42. NEXT d, c, b ' in multiple next the order is inverse to the entry
  43.  
  44. PRINT "showing z1 array..."
  45. FOR b = 1 TO 10 STEP 1
  46.     FOR c = 1 TO 10 STEP 1
  47.         FOR d = 1 TO 10 STEP 1
  48.  
  49.             PRINT z1(b, c, d); " "; z1(b, c, d); " "; z1(b, c, d); "/";
  50. NEXT d, c, b
  51. PRINT "REDIM z1(1 to 15) of UDT"
  52. REDIM _PRESERVE z1(1 TO 15, 1 TO 15, 1 TO 15) AS INTEGER
  53. PRINT "Re showing z1(1 to 15,1 to 15 , 1 to 15) integer"
  54. FOR b = 1 TO UBOUND(z1) STEP 1
  55.     FOR c = 1 TO UBOUND(z1)
  56.         FOR d = 1 TO UBOUND(z1)
  57.             PRINT z1(b, c, d); " "; z1(b, c, d); " "; z1(b, c, d); "/";
  58. NEXT d, c, b
  59.  

Sorry for my pedantry but if you teach with passion and love to transmit knowledge , as I can see, this feedback can be useful.
Thanks to read
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 22, 2020, 07:05:36 pm
Again a feedback but first a good music to hear
https://www.youtube.com/watch?v=QkF3oxziUI4&list=RDEM0rsUWBCDujUhieAggSXK-g&index=4 (https://www.youtube.com/watch?v=QkF3oxziUI4&list=RDEM0rsUWBCDujUhieAggSXK-g&index=4)
please read this only if you have so many patience otherwise go further

about the tip of null string  found by INSTR (chapter 11)  in an any string
Code: QB64: [Select]
  1. '-------------------------------
  2. ' Variable Declaration Section -
  3. '-------------------------------
  4.  
  5. DIM Answer$
  6.  
  7. '--------------------------
  8. ' Main Program Begins Here-
  9. '--------------------------
  10. Again:
  11. PRINT "Press only Enter key to see the tip"
  12. INPUT "Do you play again ?(Y/N)", Answer$
  13. PRINT INSTR("Y", UCASE$(Answer$))
  14. IF INSTR("Y", UCASE$(Answer$)) GOTO Again ELSE PRINT "Goodbye"

Thanks to read
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 22, 2020, 11:46:24 pm
I'm almost finished with Task #12 - just creating a "Your Turn" program.

I updated Tasks 3 - 11 to include a "Contents" section at the top for easy navigation throughout the pages. The remainder of the tasks will have this as well.

@TempodiBasic REDIM _PRESERVE works with one dimensional arrays. I'll add a note in the task that it will not with mutli-dimensional arrays. Also, not sure what you mean by "about the tip of null string found by INSTR (chapter 11) in any string".
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 22, 2020, 11:57:58 pm
Terry - Search the site is what I meant - aka Wiki on Steroids
        - Pete's String Math. Finding some useful uses as it's more forgiving if I didn't DIM the variable correctly or math routine takes the result into Sc Note. Also a little handier with _PrintString
           then covering numeric to string and _Printstring. But I'm unsure of how to get the most out of it.

Well I can barely code basic HTML so a search feature may be a ways off. I did however add a contents section to the top of each page that will help in jumping to specific sections of each task. I'll probably create a jump page with all the commands that are covered in the tutorial so you'll be able to jump to a task and straight to that section. That would be something I work on after I've finished the tasks. The farther I get into these things the longer and more complicated they get. My goal is to have them finished by the end of May at the latest.
Title: Re: QB64SOURCECODE.COM
Post by: luke on April 23, 2020, 03:52:35 am
As for searching, you might find Google's Custom Search useful: https://cse.google.com/cse/all
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 23, 2020, 10:01:16 am
Thanks Luke, I'll look into that.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 23, 2020, 12:24:34 pm
Task 12 has been added. The "Your Turn" section for it has nothing yet however. Having a mental block trying to think of a simple program for someone to write for this task. It'll come to me in a few days I'm sure. On to Task 13.
Title: Re: QB64SOURCECODE.COM
Post by: bplus on April 23, 2020, 03:23:18 pm
Task 12 has been added. The "Your Turn" section for it has nothing yet however. Having a mental block trying to think of a simple program for someone to write for this task. It'll come to me in a few days I'm sure. On to Task 13.

An analog clock, a calculator, a simple Eval Function (without parenthesis), drawing regular n-gon polygons, ordering pizza creating pizza numbers determined whether to add one of 8 topping becomes a binary number and could be translated to base 10 number, ie onions, mushrooms, pepperoni, sausage:  yes to onions and sausage is 1001 a number 9 pizza or yes to mushrooms and pepperoni is a 0110 = a number 6 pizza, onions and pepperoni 1010 = number 10...

Maybe not just one program? maybe the snippets part that employs math function. Oh also Metric conversion programs.

Wait... nothing about number bases? Binary, Octal, Hexadecimal? That would go well with bit math.
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 23, 2020, 06:35:54 pm
Hi Terry
about
Quote
Also, not sure what you mean by "about the tip of null string found by INSTR (chapter 11) in any string".
nothing else that INSTR returns 1 if you seach a nullstring  like this s$="" in any kind of string...
this becomes important when you use INSTR to evaluate a keyboard input INKEY$ returns "" if no key is pressed, INPUT and INPUT$(1) return "" if we press only Enter key without nothing typed before Enter. and this code wants stress this idea
Code: QB64: [Select]
  1.     '-------------------------------
  2.     ' Variable Declaration Section -
  3.     '-------------------------------
  4.      
  5.     DIM Answer$
  6.      
  7.     '--------------------------
  8.     ' Main Program Begins Here-
  9.     '--------------------------
  10.     Again:
  11.     PRINT "Press only Enter key to see the tip"
  12.     INPUT "Do you play again ?(Y/N)", Answer$
  13.     PRINT INSTR("Y", UCASE$(Answer$))
  14.     IF INSTR("Y", UCASE$(Answer$)) GOTO Again ELSE PRINT "Goodbye"
If you think that this kind of information can be useful to explain how INSTR works you can add to your work.

Thanks to read
Title: Re: QB64SOURCECODE.COM
Post by: bplus on April 23, 2020, 07:13:42 pm
TempodiBasic talking about this?
Code: QB64: [Select]
  1. print instr("abcd", "")  'outputs 1
  2.  
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 24, 2020, 12:55:30 pm
just right Bplus!
It is a feature of INSTR that has wasted my time so many times because it makes an hole in the control of flow when related to a string of input.
Thanks to let be clearer my comunication!
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 24, 2020, 01:50:55 pm
TempodiBasic talking about this?
Code: QB64: [Select]
  1. print instr("abcd", "")  'outputs 1
  2.  

Well, I'm not sure if this is a bug or not. Technically a null string "" is contained in every string. I will add this oddity to the INSTR section in the tutorial though to let others know this situation exists. Thanks for bringing it to my attention TempodiBasic.
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 24, 2020, 02:29:03 pm
Not a bug.
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 24, 2020, 02:41:45 pm
I posted about that, what, maybe on the .Net site? I had an instance in a data reading program where I mistakenly had a null entry. When it went through my instr() routine, yep, I get this weird unexpected error, so I looked at the code, tested it out, and sure enough, discovered that INSTR() treats nothing as something. Since that experience, I often code...

Code: QB64: [Select]
  1. LINE INPUT #1, a$
  2. IF INSTR("Pete", a$) AND a$ <> "" THEN
  3. PRINT "We Found Pete!"
  4.  

Note: You cannot rely on using IF LEN(a$), because of how AND treats two numbers. A return of 1 AND 1 would be true, but a return of 1 AND 2 would be false. For instance, this would NOT work...

Code: QB64: [Select]
  1. a$ = "Pete"
  2. IF INSTR("Pete", a$) AND LEN(a$) THEN
  3.     PRINT "We Found Pete with LEN() added!"
  4.     PRINT "We didn't find Pete with LEN() added!"

Pete

PS And as Fell mentioned, it's not a bug. It was this way in QB45, too.
Title: Re: QB64SOURCECODE.COM
Post by: SMcNeill on April 24, 2020, 02:42:53 pm
Well, I'm not sure if this is a bug or not. Technically a null string "" is contained in every string. I will add this oddity to the INSTR section in the tutorial though to let others know this situation exists. Thanks for bringing it to my attention TempodiBasic.

Think of it like this:

a$ = ""
b$ = "abcd"
c$ = a$ + b$
PRINT INSTR(c$, a$)

Now, you just put a$ to the front of c$.  It's in there, honest!  So why would you print 0 as the result and say it's not there??
Title: Re: QB64SOURCECODE.COM
Post by: SMcNeill on April 24, 2020, 02:45:57 pm
IF INSTR("Pete", a$) AND LEN(a$) THEN

The above is binary math, not logical conditions.  Change it to the following:

IF INSTR("Pete", a$) <> 0 AND LEN(a$) <> 0 THEN
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 24, 2020, 02:55:47 pm
Also, since neither is ever gonna return a negative, it's enough to:

Code: QB64: [Select]
  1. IF INSTR("Pete", a$) > 0 AND LEN(a$) > 0 THEN
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 24, 2020, 02:58:30 pm
Hey, we're doing all of Terry's work for him. Where's that homework policy hiding? :D

Pete
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on April 24, 2020, 03:06:42 pm
🤣
Title: Re: QB64SOURCECODE.COM
Post by: STxAxTIC on April 24, 2020, 03:46:46 pm
Who wants to predict:

Instr("", "")

?

Zero or one?
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 24, 2020, 04:04:52 pm
Nothing from nothing leaves nothing
You gotta have something
If you want to use QB
Nothing from nothing leaves nothing
You gotta have something
To make INSTR work for me
Title: Re: QB64SOURCECODE.COM
Post by: bplus on April 24, 2020, 04:36:21 pm
Another interesting feature:
Code: QB64: [Select]
  1. FOR i = 0 TO 5
  2.     PRINT i, INSTR(i, "abcd", "")
  3.  
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 24, 2020, 07:17:11 pm
Hi friends

I like your participation about INSTR qb's keyword
but I don't want to waste this thread of Terry so I have opened another thread to talk about this INSTR
https://www.qb64.org/forum/index.php?topic=2503.0 (https://www.qb64.org/forum/index.php?topic=2503.0)
Title: Re: QB64SOURCECODE.COM
Post by: granzeier on April 25, 2020, 11:20:32 am
Nothing from nothing leaves nothing
You gotta have something
If you want to use QB
Nothing from nothing leaves nothing
You gotta have something
To make INSTR work for me
I had completely forgotten that Billy Preston song. :)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 25, 2020, 11:44:14 am
I'm still plugging away on Task 13. I updated all the tasks with numerous spelling and typo error corrections I found. I use an old program called Kompozer to help create the pages. I just found a spell check feature buried deep in the options that can be turned on.
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 25, 2020, 12:20:36 pm
I've tried that one, but I like it's kissing cousin, Nvu, better: http://www.nvu.com/ Note, the link there is for a download at MajorGeeks.com, which I consider a trusted site.

I had no idea you were coding all this by hand. I've always used HTML editors. I don't need to, I know how to code in CSS/HTML, but it's just too monotonous and time consuming to do so by hand, plus, you don't have to memorize colors, especially color blends, etc. These days, hell, I write QB64 apps to build webpages using html templates. That worked great for all my golf coaching programs.

Anyway, glad you found an editor. It will make your life a lot easier, once you play around with it enough to get comfortable with quickly and easily using all the bells and whistles.

Pete
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 26, 2020, 07:22:44 pm
Hi Pete
it seems that you are suggesting an older program (nvu) vs that Terry's using for now (Kompozer)
or at least it appears from the link that you have posted

Quote
KOMPOZER - NVU 1.0, released in June 2005, is the last official release that you will find at most download sites, however, it isn't the newest or best version of the Nvu software. An unofficial bugfix/update called "KompoZer" is available here. KompoZer is not a cure-all for all the bugs in NVU 1.0, but it does fix some of the major annoyances. If you use NVU 1.0 and it works for you, stick with it. But if you run into problems, give KompoZer a try and see if it helps.

Do you like kidding!
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 26, 2020, 09:18:06 pm
I have both. Nvu is older, but it's also better. Go figure.

Pete
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 26, 2020, 09:57:16 pm
I posted this before but it disappeared.

Task 13 is finished and posted.
Added INSTR weirdness to Task 11.
Updated Task 2 concerinng run time EXE.

Working on Task 14.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 28, 2020, 12:18:03 pm
Task 14 posted. Working on Task 15.
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on April 28, 2020, 07:51:58 pm
Hey Terry
it sounds good! Not like a simple BEEP!
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on April 28, 2020, 09:42:24 pm
I have both. Nvu is older, but it's also better. Go figure.

Pete

@Pete, why do you find Nvu better? From what I read Kompozer fixed many of the bugs that were present in Nvu. I've not tried Nvu but if there is some compelling reason to use it over Kompozer I'm all ears.
Title: Re: QB64SOURCECODE.COM
Post by: Pete on April 28, 2020, 10:57:04 pm
Too long ago for me to remember if there were any improvements, I don't think there were, but Kompozer was the buggy one! The worst I get with Nvu is if you overtax it, maybe too many windows open, or some improper coding, it crashes. I just ctrl + s and save my work regularly, and I don't give a Clippy if it shuts down on me.

Try it, you'll like it!

Pete
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 03, 2020, 03:13:38 pm
Task 15 has been completed and uploaded. I decided to make task 15 deal with nothing but image manipulation. The previous version of the tutorial included way too many subjects in the advanced graphics task. I decided to break them out to make it easier to digest.

Only three Storm Troopers were harmed in the making of this task!

On to task 16!
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 08, 2020, 10:25:48 am
Task 16 has been completed and uploaded.

On to task 17!
Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on May 08, 2020, 10:40:23 am
BTW, _RGB32 gained new functionality since v1.3 (maybe 1.2, can't recall precisely now):


No need for _RGBA32, although it remains untouched for retrocompatibiity, of course.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 08, 2020, 10:58:22 am
I need to start reviewing in detail each command in the Wiki as I write about it. I had no idea _RGB32 gained the ability to work with alpha values. Yes, no need for _RGBA32 any longer.

I'll go back through that section and add these changes.

Edit: I just updated Task 16 with the _RGB32 additional information.
Title: Re: QB64SOURCECODE.COM
Post by: qbkiller101 on May 10, 2020, 05:19:47 am
Hi
You know I have downloaded your whole website till task 16 and am working on rearranging it and adding styles with CSS and javascript. (My main thing is web nerdinessI'm even learning SQL) And when you finish all tasks I'll send you the modified version so you can either replace it with yours or add it as another option in a /new sort of dir or something
had to send you a ton of e-mails so you start making it again (lol)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 10, 2020, 10:33:29 am
Hi
You know I have downloaded your whole website till task 16 and am working on rearranging it and adding styles with CSS and javascript. (My main thing is web nerdinessI'm even learning SQL) And when you finish all tasks I'll send you the modified version so you can either replace it with yours or add it as another option in a /new sort of dir or something
had to send you a ton of e-mails so you start making it again (lol)

Awesome! I know what CSS is and how it works, even took a one semester course on it back in 2010 using Dreamweaver. I can't remember squat about it. I would love to have the site dynamically resize for portable devices. Thank you for taking this on. I look forward to seeing the final result. I'm almost finished with Task 17 - Collision Detection. By my estimate I *should* be finished with all tasks by the end of this month.
Title: Re: QB64SOURCECODE.COM
Post by: qbkiller101 on May 10, 2020, 11:18:03 am
Ooh
I'm waiting in particular for collision detection
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 12, 2020, 03:02:27 am
Task 17 - Collision Detection has been uploaded.

On to Task 18 !
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on May 12, 2020, 07:35:53 pm
WOW Terry
I like your quick production of educational materials!
I must read slowly your 17 chapter for miss no particular information.

Title: Re: QB64SOURCECODE.COM
Post by: FellippeHeitor on May 12, 2020, 09:33:57 pm
Chapter 17: very comprehensive. Thanks, Terry!
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 14, 2020, 12:23:28 am
Chapter 17: very comprehensive. Thanks, Terry!

Thank you. They are fun to make. :)

Task 18 has been uploaded.

On to task 19!
Title: Re: QB64SOURCECODE.COM
Post by: TempodiBasic on May 14, 2020, 05:20:18 pm
Yes !
Collision detection: great discussion about different way to get the collision between sprites.
Sprite Sheet : an increasing walking through the animation's methods in a 2D world.

I'm a follower ! :-)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 14, 2020, 07:17:38 pm
Yes !
Collision detection: great discussion about different way to get the collision between sprites.
Sprite Sheet : an increasing walking through the animation's methods in a 2D world.

I'm a follower ! :-)

I'm glad you like them. I'm working on Task 19: Motion, Vectors, and Angles right now. This one may take a few days though. My maths are lacking and I need to brush up.

Title: Re: QB64SOURCECODE.COM
Post by: Dav on May 14, 2020, 07:26:08 pm
Nice updates!  Such a great resource you have put together.  Thank you!

 - Dav
Title: Re: QB64SOURCECODE.COM
Post by: codeguy on May 14, 2020, 09:06:26 pm
I thought It was nicely explained and constructed in the few sections I read. Feel free to steal my recursive code merger. And sorting library if you want to do a blurb about sorting so people can know it isn't all magic. I have explained their workings in the comments.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 14, 2020, 09:51:07 pm
Sorting, yes, that would make a good topic. Thanks for the idea :-)  And yes, I will steal your code as it's some of the best work I've seen over the past 10 years on QB64.org/net
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 18, 2020, 09:55:52 pm
Task 19: Motion Vectors, Angles & Rotation has been uploaded.

Beware of Zombies!

On to task 20!
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 26, 2020, 11:35:55 am
Task 20: Particle Effects has been added.

I plan to do one more general information task relating to parallaxing and layers and then move into game build demonstrations. I was hoping to have the site completed by the end of this month but it looks like the end of June is now the target goal. This is taking much longer than I anticipated.

On to task 21!
Title: Re: QB64SOURCECODE.COM
Post by: STxAxTIC on May 26, 2020, 12:32:18 pm
Hey Terry,

Always been a fan! I'm on the road right now too so I can't be as verbose as usual. Just wanted to raise a few things.

This is all about your page on vectors and motion. First off, nice job compensating for the fact the the default coordinate system violates the right hand rule and defines trig upside down.

My bone is with the word "vector" as used. It's introduced as a way to keep track of direction, which is only mostly true. Bear with me...

Starting at the top, the position in the XY plane is itself a vector. It doesn't need motion to be taking place. When you modify a position vector to make something move, you are adding a displacement vector. A displacement vector is defined like

\vec{displacement} = (speed) * (timestep) * cos(ang) * \hat{x} + (speed) * (timestep) * sin(ang) * \hat{y}

Where \hat{z} is a vector of maginude 1 whose only job is to point.

In this notation, the velocity vector divides out the time step:

\vec{velocity} = \vec{displacement} / (timestep)

And next, note that the velocity vector is the product of a speed scalar and a unit vector denoting pure direction:

\vev{velocity} = (speed) * \hat{vel}

... Where \hat{vel} contains just the trig terms and the x and y unit vectors. This is the proper object that denotes direction.

Anyway sorry for sloppy notes. Cell phone blues...

Try this link too

http://barnes.x10host.com/writing/Vectors%20and%20Trigonometry/Vectors%20and%20Trigonometry.pdf

Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 26, 2020, 01:03:40 pm
Hey Terry,

Always been a fan! I'm on the road right now too so I can't be as verbose as usual. Just wanted to raise a few things.

This is all about your page on vectors and motion. First off, nice job compensating for the fact the the default coordinate system violates the right hand rule and defines trig upside down.

My bone is with the word "vector" as used. It's introduced as a way to keep track of direction, which is only mostly true. Bear with me...

Starting at the top, the position in the XY plane is itself a vector. It doesn't need motion to be taking place. When you modify a position vector to make something move, you are adding a displacement vector. A displacement vector is defined like

\vec{displacement} = (speed) * (timestep) * cos(ang) * \hat{x} + (speed) * (timestep) * sin(ang) * \hat{y}

Where \hat{z} is a vector of maginude 1 whose only job is to point.

In this notation, the velocity vector divides out the time step:

\vec{velocity} = \vec{displacement} / (timestep)

And next, note that the velocity vector is the product of a speed scalar and a unit vector denoting pure direction:

\vev{velocity} = (speed) * \hat{vel}

... Where \hat{vel} contains just the trig terms and the x and y unit vectors. This is the proper object that denotes direction.

Anyway sorry for sloppy notes. Cell phone blues...

Try this link too

http://barnes.x10host.com/writing/Vectors%20and%20Trigonometry/Vectors%20and%20Trigonometry.pdf

Yes, when I was writing that task I knew I was most likely getting terminology wrong as I have had zero formal training in mathematics and computer programming. If you wouldn't mind and find yourself with some free time at some point would you be willing to help me correct the terminology? The rewording of key sentences would be of great help. I won't be able to get back this task and correct it for a weeks while I finish up the remaining tutorial. I'll have time then to research the link you sent me and attempt to understand the concepts you laid out for me here. Like I've stated before I envy you math wizards with your knowledge of all things numbered.

Thank you also for helping to improve the tutorial. I welcome all comments especially those that help to improve it.
Title: Re: QB64SOURCECODE.COM
Post by: bplus on May 26, 2020, 01:38:53 pm
The term in question is Component. Check it out on internet, the x component and the y component of a vector.

Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 26, 2020, 01:41:51 pm
The term in question is Component. Check it out on internet, the x component and the y component of a vector.

Yes, I remember those from Geometry class now. Thank you for pointing that out.
Title: Re: QB64SOURCECODE.COM
Post by: Virtusoroca on May 26, 2020, 01:56:26 pm
Hi @TerryRitchie. I was follwing your tutorial even before join the community. Very broad and helpful. Thanks for the effort. A humble suggestion: maybe some comments could be added in tasks 16 (transparency) and 17 (collision) regarding games based on text characters. It sounds simple but there are some tricky aspects to it, specially in edge-sensitive collision detection between complex (non-rectangular) character sets. I had a hard time figuring that out and ended up hard coding the calculations. @Ashish help me to abstract it further (I didnt posted that yet). Tutoriais on these topics would be great I think. Im willing to help but not sure if Im up to the task.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on May 26, 2020, 03:23:23 pm
Hi @TerryRitchie. I was follwing your tutorial even before join the community. Very broad and helpful. Thanks for the effort. A humble suggestion: maybe some comments could be added in tasks 16 (transparency) and 17 (collision) regarding games based on text characters. It sounds simple but there are some tricky aspects to it, specially in edge-sensitive collision detection between complex (non-rectangular) character sets. I had a hard time figuring that out and ended up hard coding the calculations. @Ashish help me to abstract it further (I didnt posted that yet). Tutoriais on these topics would be great I think. Im willing to help but not sure if Im up to the task.

I'm interested in seeing some code on what you describe. I would think with characters you're either in another character's spot or not. What I mean is that the letter A for instance isn't going to slide into the position on the screen where a letter I resides. The letter A would simply occupy that position by moving from text position to text position.
Title: Re: QB64SOURCECODE.COM
Post by: Virtusoroca on May 26, 2020, 04:04:10 pm
The simplest way is as you described. Its two independent characters that cant ocuppy the same space. If the space is the same, then collision. Done.

But imagine first that you have layers. Some characters you can walk through, other you cant. It will require arrays. Maybe you want the forefront character to inherit the background color from below  or have its spaces ignored for "transparency" effect. And then imagine youre dealing with a non rectacular set of characters that may have its own collision structure, independently of its design layer. For the collision you will need to do a "player structure layer" calculation against a "terrain structure layer", for each ajdecent array position, dependent on player size, shape, direction and speed.

Thats what I did in my engine, in a clumsy way I believe. For example, you can make the player with up to 3x3 characters (for now), but that is blocked at its corners only, passing through blocks that fit into it (moving over those characters that dont block it, with transparency effect). Its customizable shape will fit perfectly in the terrain structure, like tetris. None of this requiere any particulary dificult function, but the whole construct has its own complexity, different from a pixel/graphics approach.

For the code mess i manage to pull off trying this, take a look at my ASCII Terrain Engine, MovePlayer function (I mean, Sub). Ashish helped me with that mess and in the next version this segment will much more clear and compact.
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on June 01, 2020, 04:17:41 pm
Task 21: Layers and Parallax has been added.
Title: Re: QB64SOURCECODE.COM
Post by: lawsonm1 on June 02, 2020, 07:39:39 am
This looks great. I agree about a section on sorting. All I know about is bubble sorting; cheap, easy, and quick. I'm trying to think of a way I can have my sons take the course/tutorial and give them a 'Certificate of Completion' at the end. I taught a computer class at a home school co-op a couple of years ago, and I used QB64. The BASIC section wasn't much, but they had to calculate making a flange based on weight and size requirements. Thanks, Mike
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on June 02, 2020, 09:24:32 am
Thank you. I'm glad people are finding it useful. One of my goals for the tutorial is to come up with a set of lesson plans that cover a 9-week and 18-week course based on the tutorial. I was a high school computer science teacher and at one time used QB64 to teach introductory programming. I've gotten emails over the years that other teachers, mostly overseas, were using my tutorial in their classroom.

The sorting topic will be covered in an advanced programming task once I get the beginner course finished.
Title: Re: QB64SOURCECODE.COM
Post by: lawsonm1 on June 02, 2020, 11:08:02 am
Sounds like a great plan. Question though; I have a few old BASIC programming books, some are soft copy and others hard copy. I am in the process of 'pulling' the various sort programs from them and putting them into QB64. If you are interested I will post them for any use you all may find. Some are a bit more challenging though. As in I have now idea how to convert PET BASIC from 1982 into normal BASIC, let alone QB64. So it may take me some time. Mike
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on June 02, 2020, 11:53:21 am
CodeGuy has done work on many sorting algorithms over the years and I have his library of them. I would be more than happy to get more though. Thank you for taking the time to help with the tutorial :-)
Title: Re: QB64SOURCECODE.COM
Post by: SMcNeill on June 02, 2020, 12:03:17 pm
There's all sorts of sorts over at my forums, archived: https://qb64.freeforums.net/thread/97/huge-sort-routine


SUB CountSortedReps (Array() AS DOUBLE, start&, finish&)
SUB FlashSort (Array() AS DOUBLE, start AS LONG, finish AS LONG, order&)
SUB InsertionSort (Array() AS DOUBLE, start&, finish&, order&)
SUB ShellSort (Array() AS DOUBLE, start&, finish&, order&)
SUB ShellSortBidirectional (Array() AS DOUBLE, start&, finish&, order&)
SUB QuickSortRecursive (Array() AS DOUBLE, start&, finish&, order&)
SUB QuickSortIterative (Array() AS DOUBLE, Start&, Finish&, order&)
SUB QuickSortDualPivot (Array() AS DOUBLE, start&, finish&, order&)
SUB mergeSort (Array() AS DOUBLE, start&, finish&, order&)
SUB bubblesort (Array() AS DOUBLE, start&, finish&, order&)
SUB CocktailSort (Array() AS DOUBLE, start&, finish&, order&)
SUB InsertionSortBinary (Array() AS DOUBLE, start&, finish&, order&)
SUB BucketSort (Array() AS DOUBLE, start&, finish&, order&)
SUB InsertionSortx (Array() AS DOUBLE, start&, finish&, order&)
SUB HeapSort (Array() AS DOUBLE, Start&, Finish&, order&)
SUB IntroSort (Array() AS DOUBLE, start&, finish&, order&)
SUB QuickSortIJ (Array() AS DOUBLE, start&, finish&, i&, j&, order&)
SUB flashSORTType (Array() AS FlashRec, start AS LONG, finish AS LONG, order&)
SUB primeGapSort2 (Array() AS DOUBLE, start&, finish&, order&)
SUB CombSort (Array() AS DOUBLE, start&, finish&, order&)
SUB SelectionSort (array() AS DOUBLE, start&, finish&, order&)
SUB cycleSort (array() AS DOUBLE, start&, finish&, order&)
SUB shellSortMetzler (array() AS DOUBLE, start&, finish&, order&)
SUB PrimeGapSort (array() AS DOUBLE, start&, finish&, order&)
SUB PostSort (array() AS DOUBLE, start&, finish&, order&)
SUB HashListSort (array() AS DOUBLE, start AS LONG, Finish AS LONG, order&)
SUB RadixSort (a() AS DOUBLE, start&, finish&, order&)
SUB BatcherOddEvenMergeSort (Array() AS DOUBLE, Start&, Finish&)
SUB SinglePassShellSort (array() AS DOUBLE, start&, finish&, order&)
SUB BitonicSort (a() AS DOUBLE, lo&, n&, dir&)
SUB SnakeSort (Array() AS DOUBLE, start&, finish&, order&)
SUB JoinSort (Array() AS DOUBLE, start&, finish&, order&)
SUB QSortRecursiveSimplified (array() AS DOUBLE, start&, finish&)
SUB SmoothSort (TypedArray() AS DataElement)
SUB QuickSortIterativeMedianOf3 (Array() AS DOUBLE, Start&, Finish&, order&)

And you can find my handy dandy MemSort here: https://www.qb64.org/forum/index.php?topic=1601.msg114392

Title: Re: QB64SOURCECODE.COM
Post by: qbkiller101 on June 02, 2020, 12:03:39 pm
Sup Terry,
:)
I'm nearly finished making a webpage that I'll send you on mail on which users can upload projects they've made using your tutorials and all their projects (or at least their G-Drive links as I'm not so good) will be shown
:)
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on June 02, 2020, 12:27:18 pm
There's all sorts of sorts over at my forums, archived: https://qb64.freeforums.net/thread/97/huge-sort-routine


SUB CountSortedReps (Array() AS DOUBLE, start&, finish&)
SUB FlashSort (Array() AS DOUBLE, start AS LONG, finish AS LONG, order&)
SUB InsertionSort (Array() AS DOUBLE, start&, finish&, order&)
SUB ShellSort (Array() AS DOUBLE, start&, finish&, order&)
SUB ShellSortBidirectional (Array() AS DOUBLE, start&, finish&, order&)
SUB QuickSortRecursive (Array() AS DOUBLE, start&, finish&, order&)
SUB QuickSortIterative (Array() AS DOUBLE, Start&, Finish&, order&)
SUB QuickSortDualPivot (Array() AS DOUBLE, start&, finish&, order&)
SUB mergeSort (Array() AS DOUBLE, start&, finish&, order&)
SUB bubblesort (Array() AS DOUBLE, start&, finish&, order&)
SUB CocktailSort (Array() AS DOUBLE, start&, finish&, order&)
SUB InsertionSortBinary (Array() AS DOUBLE, start&, finish&, order&)
SUB BucketSort (Array() AS DOUBLE, start&, finish&, order&)
SUB InsertionSortx (Array() AS DOUBLE, start&, finish&, order&)
SUB HeapSort (Array() AS DOUBLE, Start&, Finish&, order&)
SUB IntroSort (Array() AS DOUBLE, start&, finish&, order&)
SUB QuickSortIJ (Array() AS DOUBLE, start&, finish&, i&, j&, order&)
SUB flashSORTType (Array() AS FlashRec, start AS LONG, finish AS LONG, order&)
SUB primeGapSort2 (Array() AS DOUBLE, start&, finish&, order&)
SUB CombSort (Array() AS DOUBLE, start&, finish&, order&)
SUB SelectionSort (array() AS DOUBLE, start&, finish&, order&)
SUB cycleSort (array() AS DOUBLE, start&, finish&, order&)
SUB shellSortMetzler (array() AS DOUBLE, start&, finish&, order&)
SUB PrimeGapSort (array() AS DOUBLE, start&, finish&, order&)
SUB PostSort (array() AS DOUBLE, start&, finish&, order&)
SUB HashListSort (array() AS DOUBLE, start AS LONG, Finish AS LONG, order&)
SUB RadixSort (a() AS DOUBLE, start&, finish&, order&)
SUB BatcherOddEvenMergeSort (Array() AS DOUBLE, Start&, Finish&)
SUB SinglePassShellSort (array() AS DOUBLE, start&, finish&, order&)
SUB BitonicSort (a() AS DOUBLE, lo&, n&, dir&)
SUB SnakeSort (Array() AS DOUBLE, start&, finish&, order&)
SUB JoinSort (Array() AS DOUBLE, start&, finish&, order&)
SUB QSortRecursiveSimplified (array() AS DOUBLE, start&, finish&)
SUB SmoothSort (TypedArray() AS DataElement)
SUB QuickSortIterativeMedianOf3 (Array() AS DOUBLE, Start&, Finish&, order&)

And you can find my handy dandy MemSort here: https://www.qb64.org/forum/index.php?topic=1601.msg114392

Wow! Thanks!
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on June 02, 2020, 12:27:44 pm
Sup Terry,
:)
I'm nearly finished making a webpage that I'll send you on mail on which users can upload projects they've made using your tutorials and all their projects (or at least their G-Drive links as I'm not so good) will be shown
:)

Looking forward to see what you have. Thank you :-)
Title: Re: QB64SOURCECODE.COM
Post by: lawsonm1 on June 03, 2020, 10:05:07 am
Once Terry has completed the Basic and Advanced Tutorials, how about a Certificate of Completion from "The QB64 Institute of Advanced Computer Sciences"? That would be a very coveted and sought after certificate. Mike
Title: Re: QB64SOURCECODE.COM
Post by: qbkiller101 on June 04, 2020, 01:45:20 am
Awesome! I know what CSS is and how it works, even took a one semester course on it back in 2010 using Dreamweaver. I can't remember squat about it. I would love to have the site dynamically resize for portable devices. Thank you for taking this on. I look forward to seeing the final result. I'm almost finished with Task 17 - Collision Detection. By my estimate I *should* be finished with all tasks by the end of this month.
@TerryRitchie Finally! After near a month of learning SQL and PHP just for making that page i have finished yesterday
But to give it to you I need a few favors, none of which allow me access to anything which you dont want me to access. As u told me in a mail

So by this ill have access to a database which is totally safe :) and access to uploads folder and that's it
no harm done
Title: Re: QB64SOURCECODE.COM
Post by: TerryRitchie on June 04, 2020, 03:45:22 am
@TerryRitchie Finally! After near a month of learning SQL and PHP just for making that page i have finished yesterday
But to give it to you I need a few favors, none of which allow me access to anything which you dont want me to access. As u told me in a mail

  • 1: in your qb64sourcecode.com's main directory (which contains index) create a folder called "upload"
  • 2: Create an ftp account (https://www.godaddy.com/help/add-ftp-users-to-my-linux-hosting-account-16044 (https://www.godaddy.com/help/add-ftp-users-to-my-linux-hosting-account-16044)) and set the quota toat least 50 MB and restrict it to the uploads directory (so i will only be able to upload files to qb64sourcecode.com/uploads) and mail me the details (ftp username password port and thats it no access to anything but uploads)
  • 3: Create a MySQL Database (https://zemez.io/wordpress/support/knowledge-base/creating-mysql-database-godaddy/ (https://zemez.io/wordpress/support/knowledge-base/creating-mysql-database-godaddy/)) and name it anything you like and a pwd and mail details including db name pwd and db username and thats it
So by this ill have access to a database which is totally safe :) and access to uploads folder and that's it
no harm done

Awesome :-)  Give me a few days (or a week) to get this set up though. I'm in the process of doing a home improvement project and have to have it completed by Tuesday when they haul the dumpster away.
Title: Re: QB64SOURCECODE.COM
Post by: qbkiller101 on June 04, 2020, 03:53:28 am
@TerryRitchie  btw it takes 5 mins I already have it all set up and btw no need for the 1st 2 steps i'll just mail you the files to upload (about 640 kb) just make a database 2 or 3 mins i already have one but it only has a capacity of 30 MB but if you think not so much data will be uploaded as 30 mb is nearly  10 million user uploads
So just tell me here if you want to use your database or mine (I don't have a problem as I don't use) so I can send ou accordingly now or after few days