Author Topic: Only know String manipulation  (Read 2599 times)

0 Members and 1 Guest are viewing this topic.

Offline Jaze

  • Newbie
  • Posts: 86
    • View Profile
Only know String manipulation
« on: March 20, 2021, 12:19:15 pm »
I recently posted a game based solely on manipulating strings. I don't know anything beyond that. Can anyone recommend a book or net starting point to go beyond this? If you need to know more of my skills to recommend said starting point, check out my post "I wanted to do something with strings... so I did".

FellippeHeitor

  • Guest
Re: Only know String manipulation
« Reply #1 on: March 20, 2021, 12:34:36 pm »
Highly recommend Terry Ritchie's awesome tutorial: www.qb64sourcecode.com

Offline 191Brian

  • Newbie
  • Posts: 91
    • View Profile
    • My Itch page
Re: Only know String manipulation
« Reply #2 on: March 20, 2021, 12:41:55 pm »
If you are focused on QB64 I can recommend Terry Ritchie's online tutorial http://www.qb64sourcecode.com/ it is excellent gives a good grounding in all aspects of programming with plenty of help on the graphics side. Its titled for game programming but can be applied any programming requirement.
Brian ...

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Only know String manipulation
« Reply #3 on: March 20, 2021, 01:10:38 pm »
Terry Ritchie's
Task 7 Gets you started in Graphics. Learn to draw or doodle with lines, boxes (fancy line command), circles, points (pset) then later you can insert images in place of boxes or circles and draw things on side for advanced graphics.

You should get a circle fill routine because QB64 doesn't have one but you could draw a bunch of circles in loop getting smaller or bigger to fill a circle for quick fix. Or make a SUB that does that you can copy/paste into your early graphics practice programs. Do you know how to make a SUB? = Task 8

And later a triangle fill routine would be very handy.

But first things first, how to setup a graphics screen!

Use the modern tool:
Code: QB64: [Select]
  1. Screen _NewImage(YourCustomScreenWidth, YourCustomScreenHeight,32)
I like 1024 Width and 672 Height for fastest graphics (1024 or less, something Terry discovered) and 42 lines for Locate and Print commands until you get use to _PrintString (Xpixel, Ypixel), Text$ (which allows printing anywhere with x, y being top, left pixel start of text$). Sure to fit anyone else screen, my laptop has a limit of under 750 pixels saving room for title bar.

The 32 gives you full access to Millions of colors and transparencies see _RGB32(red, green, blue, alpha) for setting colors for lines circles and printing.

The old way was SCREEN N, with N being a number from 0 to 13 or so... blah old!
This old way you have certain sized screen with certain palettes restrictions, fine for old days but new way is better!
« Last Edit: March 20, 2021, 01:28:27 pm by bplus »

Offline Jaze

  • Newbie
  • Posts: 86
    • View Profile
Re: Only know String manipulation
« Reply #4 on: March 20, 2021, 04:43:24 pm »
Thank you. I'll check out that tutorial. I know the syntax for QB64 so I think that would be a good language to start with. Hopefully it will pan out that way. And yes, I know how to make a sub and also a function. The thing I hated about C++ and java was having to write a constructor. I don't remember much from either of those languages. Maybe after the tutorial and a few programs under my belt I can convert one to C. I'm pretty sure I'd have to go line by line with the rewrite but having a QB64 program to start with should make it easier. Thanks again to all.