New Qbasic Christmas Game: Santa's Delivery Rush

Announce and discuss the progress of your various programming-related projects...programs, games, websites, tutorials, libraries...anything!

Moderators: Pete, Mods

Post Reply
Erik
Veteran
Posts: 72
Joined: Wed Jun 20, 2007 12:31 pm
Location: LI, NY
Contact:

New Qbasic Christmas Game: Santa's Delivery Rush

Post by Erik »

Hi All,

2023-01-06 Edit: Game finished! Fixed blending animation a bit from 12/24 release. New latest download is SDR101.ZIP


A few years ago, I made Santa's Christmas Rescue. Which was a challenge I made for myself to create a Christmas themed game from December 1st to Christmas Day. This year, I decided to try doing the same again but went for a bit more ambitious game.

In this game, you're again playing as Santa in a mad dash to deliver all the presents on Christmas Eve before time runs out. Each level has a set number of presents you must take from the sleigh to the Christmas tree while avoiding late night "snoopers" trying to catch you in the act (Don't forget to go back to the sleigh once all the presents are delivered!)

Santa has a few tricks of his sleeve to avoid the snoopers. He can "blend" in with the background. This causes him to be invincible to snoopers at the cost of his Christmas Spirit and movement speed. He can also run at the cost of Christmas Spirit. If a snooper hits you, you will automatically use some of your Christmas Spirit to put them back to bed. If you have a present, they will take that as well and stay asleep for the rest of the level. If not, they will be back up looking around shortly! Be sure not to lose all your presents to snoopers or it's game over!

There are also a few items you can pick up in the game to help you (or hurt you!). Some of these include a timer that gives you more time, a helpful elf that will deliver a present for you, a sleep item that puts all the snoopers to bed for a bit, and more.

I wasn't able to complete the whole game in the amount of time, but I was able to put together a playable demo of the game. The demo includes three levels to play as well as the tools I created to build the levels and assets.

Please read the readme.txt in the zip file for more information as well as the instructions in the game for controls and story.

To run the game, open XMAS2021.BAS in QB 4.5 and run. Make sure that all the files in the zip are extracted to the same folder and you're running the game from that folder.

I wrote this game on my 486 and also tested in DOSBox so it should hopefully run just about anywhere. Please let me know if you have any issues or encounter any bugs. I'll be sure to fix them for the full game release.

Screen shots:

Title screen:
Image

Game play:
Image

Thanks!
-Erik

Edit 2021-12-29: Updated demo download link with latest version with some bug fixes (probably introduced some new ones as well :) )
Edit 2021-01-07: Updated demo download link with latest version with a bunch of bug fixes as well as better controls.

Edit 2022-12-24: Game is finished! Added final release download SDRUSHV1.ZIP to post.
Edit 2023-01-06: Updated finished game with fixed blending 'animation'. Latest download is SDR101.ZIP
Attachments
SDR101.ZIP
(344.67 KiB) Downloaded 285 times
SDRUSHV1.ZIP
(343.28 KiB) Downloaded 286 times
sdr_demo_20220107.zip
(44.63 KiB) Downloaded 449 times
Last edited by Erik on Fri Jan 06, 2023 1:15 pm, edited 7 times in total.
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by Pete »

This is awesome! Thanks so much for sharing, and happy belated Christmas!
Erik
Veteran
Posts: 72
Joined: Wed Jun 20, 2007 12:31 pm
Location: LI, NY
Contact:

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by Erik »

Thanks Pete! Happy Belated Christmas to you too!
Erik
Veteran
Posts: 72
Joined: Wed Jun 20, 2007 12:31 pm
Location: LI, NY
Contact:

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by Erik »

Merry Christmas Everyone!

I finally got around to finishing this game! The game has 25 levels + bonus levels with three difficulty settings. It also comes with a level editor, sprite editor, and an option to load user created levels.

To run the game, extract the SDRUSHV1.ZIP contents to a new directory and then in either DOSBox or DOS, run SDRUSH.EXE. If you're using DOSBox, you might have to up the default CPU cycles a little bit with CTRL+F12.

The download zip is attached to the first post in this thread.

Thanks!
User avatar
bongomeno
Veteran
Posts: 266
Joined: Wed Dec 10, 2008 9:08 am
Location: Arizona
Contact:

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by bongomeno »

I made it to level 3 so far. It's a very nice game!
I like the graphics and that you added a lot of levels.
Erik
Veteran
Posts: 72
Joined: Wed Jun 20, 2007 12:31 pm
Location: LI, NY
Contact:

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by Erik »

Thanks!! Glad you like it.

If it helps, one strategy I like to use is to sacrifice some of the presents to the enemies so there's less to deliver (though it hurts your score bonus at the end of the level). It especially helps on some later levels where there might be some tighter time limits.

Edit: I just realized I left my test high score data in the original upload. I re-uploaded the game with them cleared out. To reset the highscore data manually, you can just delete the "HIGHSCOR.HDX" file. The game will generate a new one when you go to the high score option off the main menu.
buddpaul
Coder
Posts: 22
Joined: Thu Nov 23, 2006 5:21 pm
Location: Texas(US)

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by buddpaul »

Absolutely must download and play this soon! :D :shock: :D :D
Typing away somewhere.........
MikeHawk
Veteran
Posts: 61
Joined: Sun Jul 08, 2018 11:23 am

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by MikeHawk »

Some jumps are deceptive, others are really tricky to pull off: there's one in particular in a bonus round in which I expected the spring to bring me over the ledge to the left, but it didn't (I had to jump from the block directly below) and my first game over was on level 14 because I didn't realize I had to run to go back to the sledge and kept falling in the lava (that one is entirely on me.) I just ended a second run on level 24 where I lost 7 lives to time-outs (the timing is way too tight) and got a game over just before delivering my last gift thanks to an unexpected penguin gang-bang. I'm a bit salty.
sdrush_014.png
sdrush_014.png (2.56 KiB) Viewed 11683 times
sdrush_032.png
sdrush_032.png (3.14 KiB) Viewed 11683 times
sdrush_038.png
sdrush_038.png (1.01 KiB) Viewed 11683 times
As a side note: the tempo for the "level completed" jingle is not always the same. I don't know if it was by design or if another sound changed the tempo and it was carried over by accident. I also noticed some objects are not always rendered as sprites when they overlap. I'm not sure why. I don't think it's necessary right now, but if you ever need some extra speed to draw sprites, you could try:
  • Move DEF SEG to the y% loop, no need to reset it for every pixel.
  • Modify the segment address for each row rather than using a LONG in the POKE statement. In short: increasing the DEF SEG value by 1 is equal to increasing the POKE offset by 16. It means that you can easily reach the whole screen using only INTEGERs if you multiply y% by 20 (20 is 320 -screen width in pixels- divided by 16 -size of a paragraph-) and add the result to &hA000. This removes the LONG multiplication from the pixel loop.
  • You can test variables against 0 by just throwing them at IF and let it figure it out. If the pixel array only contains values above or equal to 0, just go "IF variable THEN" and the test will only pass if the variable is not null.
It should look like this and it seems to be 10x faster than PSET and 5x faster than the current code:

Code: Select all

FOR y% = 1 TO MAXSPRITEHEIGHT
  DEF SEG = &HA000 + (y% + yOffset%) * 20
  FOR x% = 1 TO MAXSPRITEWIDTH
    IF SpriteMap(SpriteId%, x%, y%) THEN   
      POKE (x% + xOffset%), SpriteMap(SpriteId%, x%, y%)
    END IF
  NEXT x%
NEXT y%
DEF SEG
I swear one of these days I'll complete level 24 with the utmost prejudice.
MikeHawk
Veteran
Posts: 61
Joined: Sun Jul 08, 2018 11:23 am

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by MikeHawk »

sdrush_055.png
sdrush_055.png (1.16 KiB) Viewed 11660 times
I really think the actors' collision box should be thinner and maybe a little shorter too.
Erik
Veteran
Posts: 72
Joined: Wed Jun 20, 2007 12:31 pm
Location: LI, NY
Contact:

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by Erik »

Thanks Mike for the review! Really glad to hear your were able to make it through the full game and hopefully somewhat enjoyed it.

The level finished jingle isn't purposely a different tempo. It's the same code executed each time, it's just using the QB built in "background" playing. I'm guessing that's not entirely reliable. (MB flag on the PLAY command)

The spite drawing issue is due to the weirdness and hacky-ness I handled that code. The way that was all done was pretty nasty so there's no surprise there's issues there. This carries over to the tight and weird jumping and collision detection with enemies. I have a Halloween game I started working on back in Oct (early out of date screen shot & info: https://nediscapp.com/discussion.cgi?di ... icle=41027) that handles things a bit different that's much better at it. Your 'DEF SEG' recommendations in the sprite draw loop are immensely helpful for both games. Thank you for that!!

The tight squeeze on time in level 24 was due to me thinking the game was too easy. I guess when you're the main person testing it, you don't realize that you know all the 'tips and tricks' and what becomes hard to you is very hard to others.

Thanks again for playing it. I'll have to post my high score as well.
Hopefully at some point I'll have time to create a 1.02 that has the jump fixes, sprite fixes, DEF SEG draw fix, and level time adjustment fixes. Not sure when that will be though. :)

Thanks again!
MikeHawk
Veteran
Posts: 61
Joined: Sun Jul 08, 2018 11:23 am

Re: New Qbasic Christmas Game: Santa's Delivery Rush

Post by MikeHawk »

I wish I could learn how to sound more supportive when I type because I'm really happy to see new games being programmed in QuickBASIC; especially ones that are actually complete and worth playing like yours (I got a fairly large collection of programs and a good chunk of them, while charming, are utterly unplayable or pointless.)

By the way I found the tempo issue in PlaySfx():

Code: Select all

CASE SPRINGSFX
  PLAY "O3 T180 L64 MB CD-DE-EFG-G"
Should reset the tempo to 120 when it's done:

Code: Select all

CASE SPRINGSFX
  PLAY "O3 T180 L64 MB CD-DE-EFG-G T120"
Otherwise it carries over to other PLAY statements until the program ends... and now that I check it out, all the sound effects are indeed sped up after jumping on a spring. Turn the invisibility cloak on and off before stepping on the spring in level 5, then toggle the cloak again. Funny I had to hear the jingle to realize something was up.

I'm looking forward to the Halloween game, I'm a sucker for mazes and mansions! Cheer.
Post Reply