Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Richard Frost

Pages: [1] 2 3 ... 22
1
QB64 Discussion / Re: Small graphics programming challenge
« on: April 14, 2022, 11:14:57 am »
Attachment fixed.  Sorry for posting the message twice.  Mornings......

2
QB64 Discussion / Small graphics programming challenge
« on: April 14, 2022, 10:31:33 am »
' Small programming challenge contained at:
'

' It's a boring hour and a half of some guy creating CSS code for a simple animation to:
' 1) Have 8 icons/pictures rotating in a circle, while pulsing
' 2) when one selected, stop all rotation, the pulsing of the selected item, and
'    identify the selected item
' Use any 8 pix you've got handy, or the flags I've attached here.
Code: QB64: [Select]
  1. Data albania,britain,canada,eu,us,japan,israel,china
  2. Screen _NewImage(800, 600, 32)
  3. For i = 1 To 8
  4.     Read name$(i)
  5.     pix(i) = _LoadImage("f_" + name$(i) + ".png")
  6. td = 1 '                                         throb direction
  7.         mx = _MouseX
  8.         my = _MouseY
  9.         mb = _MouseButton(1)
  10.     Wend
  11.     Cls
  12.     hl = 0 '                                     highlight
  13.     For i = 1 To 8
  14.         r = _D2R(i * 45 + aa) '                  angle in radians
  15.         x = 400 + 200 * Cos(r)
  16.         y = 300 + 200 * Sin(r)
  17.         tt = th '                                temporary throb = current
  18.         If mb And (Abs(x - mx) < 30) And (Abs(y - my) < 30) Then ' selected
  19.             tt = 0 '                             temporary throb off
  20.             hl = 1 '                             highlight on
  21.             _PrintString (x - 26, y - 50), name$(i)
  22.         End If
  23.         _PutImage (x - 30 + tt, y - 30 + tt)-(x + 30 - tt, y + 30 - tt), pix(i), 0
  24.     Next i
  25.     _Display '                                   optional, eliminates flickering
  26.     aa = (aa - (hl = 0)) Mod 360 '               angle advance
  27.     th = th + td '                               throb
  28.     If Abs(th) = 3 Then td = -td '               throb direction
  29.  

3
QB64 Discussion / Re: Particle System
« on: April 10, 2022, 10:21:14 pm »
There are two "particle systems" in my old Moon Lander you could
study - the volcano and fireworks. 

The volcano demonstrates my theory that the Earth is made of cheese.
Why else would lava be orange?

4
Programs / Re: Benchmark_01
« on: April 10, 2022, 10:10:00 pm »
4.07s on my ancient machine.

5
Programs / Re: Garland of pearls
« on: March 22, 2022, 04:03:28 am »
Very interesting!

Strange that you do something so difficult yet manage to plot the instructions off the screen.

I added this after the SCREEN is declared:
_ScreenMove (_DesktopWidth - _Width) \ 2, 20

6
QB64 Discussion / Re: Command line to create EXE's ?
« on: March 12, 2022, 10:32:59 pm »
qb64 -x sourcefile

The .bas extension is not required.

If you want to compile more than one file, use the above template in a batch file.

7
Programs / Re: Evolving RI (Robot Intelligence) for a room vacuum
« on: March 01, 2022, 06:22:44 pm »
Another way it could be more like chess would be to replace the yellow square with
a Queen, one  brandishing a broom.

It drops more spies (*) than a C-130.

Will the next version quantum tunnel to isolated rooms?

8
Programs / Re: Bump N Go Car Toy
« on: March 01, 2022, 06:17:04 pm »
Is that vehicle insured?

9
QB64 Discussion / Re: problem with the mouse
« on: February 16, 2022, 06:49:27 am »
You're not taking the title bar into account.   I've simplified your code a little - press ANY key.
Why the x correction of 4 is required to keep the mouse stationary I don't understand.

Code: QB64: [Select]
  1. Screen _NewImage(800, 600, 32)
  2.     i$ = InKey$
  3.     Locate 10, 10: Print Using "##### "; _MouseX; _MouseY
  4. Loop Until i$ = Chr$(27)
  5.  

10
Don't use _LIMIT or _DELAY for loops.  Use milk.

11
Programs / Re: New 10x10 puzzle version (1.6)
« on: February 12, 2022, 03:26:07 pm »
Very nice, but my fireplace doesn't like the wood.

12
QB64 Discussion / Re: Welcome and Presentation?
« on: February 07, 2022, 04:01:47 pm »
Welcome to nerd heaven.

QB64 is QB4.5 with a rocket attached, and more bells & whistles. The biggest addition, I find, is the
ease with which QB64 handles images, an image being any area of the screen or loaded picture.  A great
way to learn is to study code downloaded from the Forums here.  Some of it is even documented.  Here's
an example of fun with images:

Code: QB64: [Select]
  1. Screen _NewImage(768, 324, 32)
  2. p& = _LoadImage("nixie1.jpg") '                  picture is 750*600
  3.     For i = 0 To 5
  4.         nn = Val(Mid$(Time$, Val(Mid$("124578", i + 1, 1)), 1))
  5.         _PutImage (i * 128, 0)-Step(128, 326), p&, 0, ((nn Mod 5) * 150, Int(nn / 5) * 300)-Step(150, 300)
  6.     Next i
  7.  

13
QB64 Discussion / Re: A New Beginning
« on: January 14, 2022, 05:32:17 pm »
CEO function:
- Ensure that the organization has mission objectives that are completely unrealistic and/or evil.
- Represent the organization by having logo tattooed on forehead.
- Constantly task staff with creating or watching slideshows.

14
Programs / Re: Clock (next one from hunderd...)
« on: January 01, 2022, 02:35:43 am »
Mighty cute.  Is it waterproof?

15
QB64 Discussion / Re: simple array question (I forgot)
« on: December 26, 2021, 11:12:25 pm »
Must be millions of alternates for "name".

Bob, Yosemite_Sam, Geek, FishBait, FrogLegs, Kermit, CheeseNose, etc.

Creative labels are also fun, like GetLostYaHoser for an exit label.


Pages: [1] 2 3 ... 22