Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Steve's Christmas Assortment
#1
For folks who want to see how much QB64 has evolved and grown over the last year, I present my little Christmas Program that I was working on and stalled out on last year.


.7z   Xmas v0.5.7z (Size: 173.32 MB / Downloads: 109)

Download from the attachment above.

(IF the forum download is too slow, which seems to be a problem for some of our Linux folks, you can also try to get it directly from my OneDrive: https://1drv.ms/u/s!AknUrv8RXVYMm_Uh2wya...A?e=XIKRX8 It may work better for you.  Wink )



Last year, I ran into an issue that I simply couldn't work around at all -- it was taking FOREVER and EVER to load my list of holiday music into QB64.  No matter how sneakily I tried to sort out a workaround to get past the issue, it still introduced unacceptable levels of lag into the program and made user responses delay by several seconds.  Either that, or else I just introduced a nice 10 minute pause at program startup, so that all the sounds could be loaded at first, before actually playing around with the program.

NEITHER of which were actual workable solutions for the program!!

So... come along this year, QB64-PE gets a complete overhaul of the audio system.  What took 10 minutes to load, we now load in perhaps 3 seconds!  I can once again resume work on my Christmas Project one more time!! 



If anyone wants to see the difference in performance for themselves, just download the file above and extract it.  It's in its own little XMas folder, so it's easy to clean up and remove the clutter from your drive after extracting, if anyone's worried about something like that. Wink

Compile and run... At the very start, you'll see a series of numbers that pop up and count down the screen -- that's the program loading our music files for us, for the first time.  Regardless of if it's incredibly slow or fast for you, once it's finished (or you terminate the process), go into the QB64-PE IDE and navigate to "Options >> Compiler Options" and then toggle the option at the bottom of the list:  "use old audio backend".

Compile and run a second time.

The difference here should be as plain as night and day.  THAT'S how much QB64-PE has changed under the hood in the last year!!

And if that doesn't put you in a Merry Christmas spirit, then BAH HUMBUG TO YOU, MISTER PETE!  Errr...  MISTER SCROOGE!!
Reply
#2
wow, nice work, Steve. So, I guess at this point, you're only spiting yourself if you choose to run anything but the latest version of PE  Tongue
Reply
#3
(12-08-2022, 12:22 PM)vince Wrote: wow, nice work, Steve. So, I guess at this point, you're only spiting yourself if you choose to run anything but the latest version of PE  Tongue

Now I just got to familarize myself with the program and go back and work on it once more.  My basic concept here was to make a modular little "Master Program", where I could create various games and puzzles and such, and then let the user select through them until they found the one they wanted to interact with.   Last year, I was working on the coloring book.  This year, once I get it all up and going again, I'd like to add in something different with it.  A new game/puzzle to the collection every year, so this will end up being one of those projects that are never ending...  Well, at least not until I finally get to my final ending as well.  Tongue
Reply
#4
The bigger question for me, is it because I am in China and they don't believe in Christmas music or is our server just that slow   Big Grin  Big Grin  Big Grin


[Image: image.png]

Can't wait to hear the tunes and see your improvement in action!
Reply
#5
It's the China Christmas Conspiracy!  Gotta be!
Reply
#6
Do you have, "All I want for Christmas is my two front teeth" on your play list? It's a great song for 5 year olds, and for folks approaching my age, too!

Pete
Reply
#7
Thank you for this one Steve. My wife loved it with all the old music. Puts you in the mood for the holidays.
Reply
#8
(12-08-2022, 12:16 PM)SMcNeill Wrote: And if that doesn't put you in a Merry Christmas spirit, then BAH HUMBUG TO YOU, MISTER PETE!  Errr...  MISTER SCROOGE!!
It will have to be to mnrvovrfc also because I hate Christmas. Seriously. I get white coal. Sorry to black-snow on the party.

Otherwise... umm... thank you for this! Thank you also for providing the EXE file to run it with Wine. When the main program window came up it started "dancing" around impressively. The window minimized for a moment then restored fixed the problem. This "dancing" happened to me also while trying Pete's example of the text word-wrap able to cope with window resizing. I'm just reporting on this.

So this program plays the songs in the same order everytime it's run? LOL I wanted to get to the "Cheo" Feliciano song without just dumping the MP3 file into Audacious.

Wyy the preference for Sinatra? Maybe should have played that song identified so much with New York Yankees (lucky stiffs, oh well their problem paying only two guys 76 million USD per year). Maybe it's not allowed for copyright reasons but why not "Grandma Got Run Over By a Reindeer" ROFLMAO some DJ played it five times in a row and got fired for it.
Reply
#9
If you look at the source, you'll see we always start with Frank and then randomize the rest.  I just thought his song captured the "Spirit of Christmas" in an exemplary way, so it's our starting track.  After that, anything goes!  Wink

As for that odd screen flicker/dance you see sometimes, that's the program trying to resize itself with rounding going on.  We adjust the size to _WIDTH \ _FONTWIDTH, and somehow that integer rounding starts to argue with itself over what the answer is.  Swapping to INT(_WIDTH \ _FONTWIDTH) might correct that issue as it doesn't round in the same manner.  I was going to play around with that as a possible solution earlier, and just forgot about it.  Many thanks for the reminder!  Smile
Reply
#10
I haven't been able to fully download this for some reason.  Every time the archive is corrupt.  Tried with a couple browsers.  Guess I'm on Santa's naughty list this year.

- Dav

Find my programs here in Dav's QB64 Corner
Reply




Users browsing this thread: 1 Guest(s)