Author Topic: SpaceShooter1  (Read 5160 times)

0 Members and 1 Guest are viewing this topic.

Offline Qbee

  • Newbie
  • Posts: 27
    • View Profile
SpaceShooter1
« on: December 10, 2019, 12:02:40 am »
Hello,

a few days ago I found to QB64 by a post of @MrFreyer. I was astonished what a Basic-Program could do. So I tried QB64 and liked it at once.

As an experimental coding project to learn QB64 I made a first Space Shooter, inspired by the video tutorial on youtube.

Now I am at a point where I can say "it works" - not really finished, and with a lot of possibilities for improvements and extensions.

I find it really hard to find acceptable sounds with adequate licenses. Although there are no sounds in space, what would a Space Shooter be without sound?

Another hard thing for me is to find out how mouse can be integrated with the used screen. That seems to be a little bit more complicated than expected, so mouse is not integrated in SpaceShooter1.

There are still many unanswered questions in spite of the very good wiki, but still confident that answers will soon be found.

In hope that my "first-steps-project" will help other newcomers I added the project as a zip-file.



* SpaceShooter1.zip (Filesize: 1.39 MB, Downloads: 359)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: SpaceShooter1
« Reply #1 on: December 10, 2019, 12:15:32 pm »
Hi Qbee,

Great graphics and key action, nice explosions!

Don't know what you want mouse for, thought it was a rail shooter game until I found that up and down buttons work too!

This works
Code: QB64: [Select]
  1. SUB CheckMouse
  2.     Shooter.x = _MOUSEX
  3.     Shooter.y = _MOUSEY
  4.  

and uncomment Checkmouse in main. Of couse you might want to center image over mouse x, y and hide the mouse too.

Welcome to forum!
« Last Edit: December 10, 2019, 12:19:21 pm by bplus »

Offline Qbee

  • Newbie
  • Posts: 27
    • View Profile
Re: SpaceShooter1
« Reply #2 on: December 10, 2019, 12:54:58 pm »
Hello bplus,

thanks a lot!

That is great step forward for me using the mouse in the/a QB64-game.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: SpaceShooter1
« Reply #3 on: December 10, 2019, 01:39:14 pm »
Awesome game you got there so far! I like how you used real picture files for stuff, that's something I rarely do. If you want, check out my games and programs I've made using QB64 on my website. One game I made is called Tech Invaders 2 which is a somewhat Space Invaders or Galaga style of a game. Feel free to use some code in any of my programs. I use math code to make the invaders fly around in different arches and swoops, etc. My website is here: http://www.kensprograms.com/ Tech Invaders 2 is number 19 on the list.
« Last Edit: December 10, 2019, 01:41:10 pm by SierraKen »

Offline Qbee

  • Newbie
  • Posts: 27
    • View Profile
Re: SpaceShooter1
« Reply #4 on: December 10, 2019, 01:55:05 pm »
Hello SierraKen,

thank you. I will visit your site, study codes and will learn a lot more.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SpaceShooter1
« Reply #5 on: December 11, 2019, 07:07:52 pm »
Well this one looks interesting. Are all the components needed? I'm curious as to why CSS files, an html file, and other web browser related materials are included.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: SpaceShooter1
« Reply #6 on: December 11, 2019, 07:15:12 pm »
Well this one looks interesting. Are all the components needed? I'm curious as to why CSS files, an html file, and other web browser related materials are included.

Pete

What zip file are you looking at? I only have image and sound files from Qbee.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: SpaceShooter1
« Reply #7 on: December 11, 2019, 10:20:22 pm »
The ones in: SpaceShooter1\pics\explosion1\Gifs, Cliparts, Bilder _ 123gif.de DIE Gif & Bilder Suchmaschine_files\

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: SpaceShooter1
« Reply #8 on: December 11, 2019, 11:16:15 pm »
The ones in: SpaceShooter1\pics\explosion1\Gifs, Cliparts, Bilder _ 123gif.de DIE Gif & Bilder Suchmaschine_files\

Pete

Holy crap! didn't notice that. Seems to work fine with folder deleted.

Offline Qbee

  • Newbie
  • Posts: 27
    • View Profile
Re: SpaceShooter1
« Reply #9 on: December 12, 2019, 12:18:26 am »
My mistake, forgot to delete that.
It is for me to have the license information if ever needed :)

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: SpaceShooter1
« Reply #10 on: December 12, 2019, 10:49:15 am »
Cool!

Next step is to add a feedback to player that ships have been hit by user with a sound and/or a flame or a ligthing of the ship that get the missile.
In fact while you're shooting  until a ship doesn't explode it seems that you are nothing with your bullets!
Programming isn't difficult, only it's  consuming time and coffee

Offline Qbee

  • Newbie
  • Posts: 27
    • View Profile
Re: SpaceShooter1
« Reply #11 on: December 12, 2019, 01:26:01 pm »
Thank you, @TempodiBasic.

Yes, that was the point I was working on. But I couldn't find sounds that I liked at once and that have a license that allows sharing even in a commercial way (websites that have ads are seen as commercial so an adequate license is needed. "for personnel use" isn't enough if the sounds shall be included).

In Qwerkey's project I saw some website names as possible sources for sounds. I will browse them on occasion and maybe find some more sounds to implement.


Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: SpaceShooter1
« Reply #12 on: December 13, 2019, 09:58:14 am »
Programming isn't difficult, only it's  consuming time and coffee