Author Topic: Steve's Xmas Game 2021  (Read 3223 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Steve's Xmas Game 2021
« on: November 26, 2021, 07:12:02 am »
Since Thanksgiving is now officially over, I guess it's time to prepare for our yearly Christmas Collection! 

Now, I was busy as heck during Halloween doing stuff around the farm here (and to be honest, things are STILL hectic around here with the Xmas tree side of things going on full swing), but I wanted to try and do a *little* better in my attempts at creating something this time around than what I managed to hobble together that time.  /blush!

So, here's the first look at something which I tossed together in about an hour this morning, making heavy use of already existing libraries and such that I already have...

Code: QB64: [Select]
  1. PRINT "Download and extract the attachment to the post where you copied this code from!"
  2. PRINT "You'll find the Xmas.bas file there, along with all its helper routines all in one easy 7z package."
  3.  

Now, at this point, this is only about an hour's work or so, so all it really is, is a quick little splash screen, a main menu, and a little routine so folks can enter their user name for the game.  (So it can track progress and store high scores later.)  It's got a little sound and a few images which help set the Xmas mood for the user, but it's not really doing too much of anything at this point in time...

BUT, I figured it might be something that other folks would be interested in taking a look at (or even using for their own stuff with some minor alterations), as it's basically now at the point where the actual game would be added and played with it...  Use your own fonts, images, and sounds...  Make your own pretty little screens...  Let the program run and give you an instant intro style interface to have a quick start to making your game!  :P

As for the game I'm thinking of inserting into this, I'm hoping to have time to add several little games to the project.  I've got multiple images I tossed into the package for use, so I was thinking I could toss those into the program and use them to create playing cards.  Then I have access to easy things like Poker, 21, War, Match Up...  I found me a nice little slot machine image which I can use to create a slot machine (Santa Slots!), for folks who might like that type of thing.

I'm feeling much more ambitious with this little project than I was with the one for Halloween, and things have came together nicely and fairly quick up to this point so far, which is a good sign.  I just hope LIFE stays calm enough around here so I can follow through and expand upon this as I go between now and Christmas.  ;D

v 0.4: https://1drv.ms/u/s!AknUrv8RXVYMm_QQ3W8KOf27i39tTA?e=jphyRd
« Last Edit: December 01, 2021, 01:19:59 am by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Xmas Game Intro
« Reply #1 on: November 26, 2021, 12:57:02 pm »
My chin fell. You set your goal really high. It looks beautiful.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Xmas Game Intro
« Reply #2 on: November 26, 2021, 01:25:54 pm »
My chin fell. You set your goal really high. It looks beautiful.

Many thanks, Petr.  It's nice to hear it all compiled and ran as advertised on somebody else's machine.  Some of my libraries (like the SaveImage one) are used and tested by tons of folks.  For whatever reason, it seems nobody has even spared a second glance at my keyboard and virtual keyboard libraries.  All it takes is a moment to plug them in, and after that you're golden as the actual code to use them is only a few lines to configure them to your needs and then they handle all the real work for you.  Whenever I work on something like this, I'm always a little worried that somebody, somewhere, will pipe up and chime in with, "It doesn't work on my machine," and then I'll end up spending more time debugging what I've already written in the past, than I do working on the new stuff.  It's a relief to hear it at least worked as advertised for one other person out there in the world besides just me.  ;D
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Xmas Game Intro
« Reply #3 on: November 26, 2021, 02:17:42 pm »
Updated to add a confirmation to the user name screen, so you can verify you like your chosen name.
Updated to give the 7z file a version number, so folks can keep things separate and untangled with future updates. (0.1 currently)
Updated so the background music should now play in a loop. (And it's set up for me to insert more music options easily so it can shuffle between a Xmas playlist for folks so you aren't stuck with a single endless song now.)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Xmas Game Intro
« Reply #4 on: November 27, 2021, 05:52:36 am »
Hi Steve. I try your new version again and there is some bug. Somewhere around line 162 (I rummaged in it and looked for it, so I'm writing somewhere around, I'm not writing the exact location) you have the command User$ = "". That's probably why the end of the program always tells me my name is Grinch.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Xmas Game Intro
« Reply #5 on: November 27, 2021, 09:43:32 pm »
Hi Steve. I try your new version again and there is some bug. Somewhere around line 162 (I rummaged in it and looked for it, so I'm writing somewhere around, I'm not writing the exact location) you have the command User$ = "". That's probably why the end of the program always tells me my name is Grinch.

Version 0.2 is up, but it's now too large for the QB64 size limit, so you'll have to grab it from my OneDrive link.

We now have New Game linking us to a game section screen, and about half of our first "game" -- Christmas Color It!  Currently, you can choose your picture to color and...

Do nothing.

That's the end of development so far.  With the Xmas tree frenzy going on, I'm only able to pop about an hour's effort into the project everyday, so development is slow.  BUT, the framework is all there now so I can just tie anything I'd like into the revolving game list, so if anyone wants to write a game to add into it, they can feel free to.  Folks say they want to work on a "shared project", they can here!!   Just put your game into a single module so I can call it with SUB YourGame and make it a 1280x720 32-bit resolution.

At this point, all ColorIt needs is:
A new screen to display the chosen image and a color mixer.
A saveimage button to save your work to disk.
A printimage button tp print your work (or blank coloring page) to paper.

Simple enough and after that I'll move on to add another game idea into our rotation of choices.  ;D
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Steve's Xmas Game 2021
« Reply #6 on: November 28, 2021, 03:03:00 pm »
v0.3 is now out, and our coloring game is now finished!

  [ You are not allowed to view this attachment ]  

  [ You are not allowed to view this attachment ]  
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Steve's Xmas Game 2021
« Reply #7 on: November 28, 2021, 07:51:27 pm »
Hey Steve, this code looks so interesting, but I can't run it.  I'm not seeing the falcon library in the download, getting error on line #32 because of it.  Is it on the forum somewhere?  (Just looking at your screenshot I can already tell your ColorIt is better than mine, which was limited to 16 colors and no loading saving).

Edit: Nevermind - I just read the other thread about falcon.  I'll try running it now!

Edit#2:  Hmm...I'm still not finding falcon.h anywhere. I'll wait for your reply here...

- Dav
« Last Edit: November 28, 2021, 07:57:20 pm by Dav »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Steve's Xmas Game 2021
« Reply #8 on: November 28, 2021, 08:18:00 pm »
@Dav Falcon.h is now attached to the bottom of the original post.  I missed it with the archive as it's in my QB64 folder and not the Xmas folder with everything else due to its internal includes path. 

I'm really curious if this will work, as is, for you, or if I need to change the DECLARE LIBRARY to become DYNAMIC as was the case in the flickering screen position code I posted.  (And, to be honest, I don't know which style I used here, off the top of my head.)

If it's a 32-bit vs 64-bit thing, I may end up needing to use an $IF check to keep it compatible for all users.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Steve's Xmas Game 2021
« Reply #9 on: November 28, 2021, 08:28:34 pm »
Thanks for the falcon.h.  Nope, not compiling for me under Win7 32-bit. Looks like it's looking for another library.  Here's my error log.

- Dav

Quote
In file included from ..\\temp\\regsf.txt:8,
                 from qbx.cpp:1131:
C:/qb64gl20/Xmas/falcon.h:1:10: fatal error: D:/Repo/qb64/internal/c/parts/video/font/ttf/src/freetypeamalgam.h: No such file or directory
 #include "D:/Repo/qb64/internal/c/parts/video/font/ttf/src/freetypeamalgam.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Steve's Xmas Game 2021
« Reply #10 on: November 28, 2021, 08:56:43 pm »
Sorry.  That one was my fault completely.  The falcon.h I shared with you had a hardcoded path to my network drive.  There's no way it's going to work for anybody else out there!  /blush

Try the new falcon.h attached to the bottom of the first post and place it in the QB64 folder with QB64.exe.  It should fix that problem for you, for good.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Steve's Xmas Game 2021
« Reply #11 on: November 28, 2021, 10:10:58 pm »
Still failing to compile. I'm on another laptop now, but grabbed the latest falcon.h.  Here's the error log now.  (Still under Win 7 32-bit).

I checked, and on my system the freetypeamalgam.h does exists there, the path is correct.

- Dav

Quote
In file included from ..\\temp\\regsf.txt:8,
                 from qbx.cpp:1131:
C:/QB64GL20/Xmas/falcon.h:1:10: fatal error: internal/c/parts/video/font/ttf/src/freetypeamalgam.h: No such file or directory
 #include "internal/c/parts/video/font/ttf/src/freetypeamalgam.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

FellippeHeitor

  • Guest
Re: Steve's Xmas Game 2021
« Reply #12 on: November 28, 2021, 10:17:33 pm »
falcon.h has to sit with qb64.exe

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Steve's Xmas Game 2021
« Reply #13 on: November 28, 2021, 10:21:22 pm »
falcon.h has to sit with qb64.exe

That was it!  Working now.  Thanks.  Trying it out now....

- Dav

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Steve's Xmas Game 2021
« Reply #14 on: November 28, 2021, 10:34:37 pm »
falcon.h has to sit with qb64.exe

Easiest solution for future updates is probably for me to just manually insert that #include into falcon.h, and then it won't matter if it's in the QB64 folder or a subfolder.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!