Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nonograms (Hanjie)
#1
Though I've programmed since being a young kid, I haven't dabbled in BASIC for decades (since Apple II and then BBC Micro) but thought I'd try my hand at a Nonograms game. I was going to target the BBC Micro but ultimately decided to give QB64pe a spin and I'm so glad I did. Such a fun few days deep diving into the nuances and differences that have expanded upon the BASIC that I remember from my youth.

Hopefully some of you might have some fun with this.

   
   

Disclaimer: My BASIC-fu is rusty, my QB64pe knowledge is puny and I take no responsibility for the sanity of anyone digging through the source!

Here's the repository - https://github.com/rokcoder-qb64/nonograms 

I've also attached the source BAS file and assets in a ZIP file (but the GitHub code has been updated so that's the best place to grab it from)

.zip   nonograms.zip (Size: 3.08 MB / Downloads: 46)
RokCoder - dabbling in QB64pe for fun
Reply
#2
Welcome to our insanity, Rok.  Smile

The screenshots look amazing.  I'm certain you'll get up to speed with the new keywords in no time, and if you need any help with anything at all, feel free to speak up and ask.  We have a bunch of friendly folks here who thrive on showing off their own knowledge and helping others, but we can't help if we don't know what someone might need help with!  Smile
Reply
#3
That is an interesting screenshot of a game / puzzle, luv those kind of apps. I will check er out.

Welcome to the forum!
b = b + ...
Reply
#4
Well dang the screen is too big for my laptop. Code looks well organized and put together by veteran coder.
I see old fashioned way of CALLing Subs ( ).

Normal esc, top right X, and Alt+F4 would not quit opening screen because I couldn't even see let alone get to click "Play Game" as shown in screen shot.
b = b + ...
Reply
#5
Thumbs Up 
(01-08-2023, 10:48 PM)RokCoder Wrote: stuff

Welcome to the forums.
Reply
#6
As Steve so eloquently suggested, welcome to the asylum. Smile

If game programming in QB64 is your thing I wrote a tutorial to help people get started. Since you're already familiar with BASIC you can probably skip ahead to later tutorials.

https://www.qb64tutorial.com/

Happy coding! Big Grin
Reply
#7
(01-08-2023, 10:59 PM)SMcNeill Wrote: Welcome to our insanity, Rok.  Smile

The screenshots look amazing.  I'm certain you'll get up to speed with the new keywords in no time, and if you need any help with anything at all, feel free to speak up and ask.  We have a bunch of friendly folks here who thrive on showing off their own knowledge and helping others, but we can't help if we don't know what someone might need help with!  Smile

Thanks for the welcome. Seems like a nice spot on the web full of lovely people. I was only having a quick dabble with something BASICesque for old time's sake but think I'm likely to stay for a while longer as it was so much fun. A refreshing break from the normality of C#/C++ programming (with a huge dash of Scratch on the side cos I teach it to kids and, y' know, it's crazy fun - actually, one of the Scratch projects is a BBC Micro emulator so is of some vague relevance here)

(01-09-2023, 02:50 AM)bplus Wrote: Well dang the screen is too big for my laptop. Code looks well organized and put together by veteran coder.
I see old fashioned way of CALLing Subs ( ).

Normal esc, top right X, and Alt+F4 would not quit opening screen because I couldn't even see let alone get to click "Play Game" as shown in screen shot.

Ouch! Not sure what I can do about that as the space is required for the larger puzzles. Is there a way to add OS scrollbars to app windows in QB64pe? Other than that I could make the front end into a smaller window and fire up into appropriate sized windows depending on the puzzle size. But scrollbars would be easier Smile

(01-09-2023, 02:58 AM)mnrvovrfc Wrote:
(01-08-2023, 10:48 PM)RokCoder Wrote: stuff

Welcome to the forums.

"Stuff" is definitely a fair synopsis of my post  Big Grin Thanks for the welcome!

(01-09-2023, 04:24 AM)TerryRitchie Wrote: As Steve so eloquently suggested, welcome to the asylum. Smile

If game programming in QB64 is your thing I wrote a tutorial to help people get started. Since you're already familiar with BASIC you can probably skip ahead to later tutorials.

https://www.qb64tutorial.com/

Happy coding! Big Grin

It was your website that pushed me towards QB64pe in the first place! Awesome website by the way. Initially I was going to make this project for an unmodified BBC Micro but my personal challenge was to make it in BASIC and I would have had to dive straight into 6502 for any performance chance whatsoever. So I then veered to BBC BASIC for Windows but thought that might be a little niche and I did want at least a few people to play the game. So I moved to QB64 and stumbled upon your website shortly afterwards. Sounds like a longwinded process but all the above was in the space of less than a week. QB64pe is just too much fun!

Your site was really helpful for reference throughout - the only thing I couldn't seem to get going was $EXEICON. I have the .ico file in place but I couldn't for the life of me get an $EXEICON line to stop being a big red error!

Edit: I just played your excellent Pacman implementation and had to comment the $EXEICON line out for that to compile, too. Is it just me? Have I borked my QB64pe installation somehow?
RokCoder - dabbling in QB64pe for fun
Reply
#8
(01-09-2023, 09:42 AM)RokCoder Wrote:
Quote:Well dang the screen is too big for my laptop. Code looks well organized and put together by veteran coder.
I see old fashioned way of CALLing Subs ( ).

Normal esc, top right X, and Alt+F4 would not quit opening screen because I couldn't even see let alone get to click "Play Game" as shown in screen shot.

Ouch! Not sure what I can do about that as the space is required for the larger puzzles. Is there a way to add OS scrollbars to app windows in QB64pe? Other than that I could make the front end into a smaller window and fire up into appropriate sized windows depending on the puzzle size. But scrollbars would be easier Smile

Easiest solution for this type of problem is often to just add $RESIZE to your code, as illustrated below:

Code: (Select All)
Screen _NewImage(160, 140, 32)
$Resize:Stretch

Do
    Cls
    Print "Hello World"
    _Limit 30
    _Display
Loop Until _KeyDown(27)

Grab an edge of the program screen and drag to resize and watch what happens.  Wink
Reply
#9
(01-09-2023, 11:47 AM)SMcNeill Wrote: Easiest solution for this type of problem is often to just add $RESIZE to your code...

Awesome - thanks. I've added that and updated the zip file in the original post.
RokCoder - dabbling in QB64pe for fun
Reply
#10
(01-09-2023, 09:42 AM)RokCoder Wrote: Your site was really helpful for reference throughout - the only thing I couldn't seem to get going was $EXEICON. I have the .ico file in place but I couldn't for the life of me get an $EXEICON line to stop being a big red error!

Edit: I just played your excellent Pacman implementation and had to comment the $EXEICON line out for that to compile, too. Is it just me? Have I borked my QB64pe installation somehow?

Make sure you place the QB64 directory into a major directory where you always have write permissions, without worrying about User Account Control or "Run As Administrator" thing. You could put it as direct child of the home user directory: "C:\Users\(yourname)\QB64PE". For good measure add the version-release-control numbers, something like "QB64PE341" in case you need to install another release later.

There is still this tendency to install to "Program Files", thanks to the zillions of installers. In Windows Vista and later, this practice began being frowned upon by the company that built the operating system, that's why UAC and other antics were created.

If you have been cool with these instructions about placing the QB64PE directory, then make sure the icon is in the same directory as the QB64PE.EXE executable so the compiler could find it and relate it to the utility to create an object file out of it.

I know a procedure to include an icon into an EXE file even before "$EXEICON" was conceived but it worked best for 32-bit WindowsXP and I don't know if it could be used at this point. I have to dig into my backups. :/
Reply




Users browsing this thread: 1 Guest(s)