QB64.org Forum

Active Forums => Programs => Topic started by: SirCrow on August 29, 2019, 10:37:24 pm

Title: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on August 29, 2019, 10:37:24 pm
Here's my best attempt at a journey through the stars.  So far, I've achieved only sideways travel, but I like how it looks.
I took the multi-layer idea from my StarBlast game and multiplied it by about 4.  The appearance of depth is really nice to look at, I think.

Use your mouse (incl. wheel) and the following keys to play around with it:
SPACEBAR, ENTER, G and the ARROWS.  Also, you can change screen resolution with + and -.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: bplus on August 30, 2019, 12:47:12 am
As Johnno would say, Nicely done sir, nicely done!

Title: Re: Space Travel w/ Multi-Layered Stars
Post by: johnno56 on August 30, 2019, 05:35:03 am
Hey! That's what I was going to say!

WARNING: Nerd alert: There are no stars in the "great expanse" between galaxies... So, the stars that you are displaying, would be ours (Milky way - assuming you are going for accuracy - and if so, that is a nice rendition of M31)... Cool
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: OldMoses on August 30, 2019, 08:29:32 am
This is a very cool effect. I may have to try loading backgrounds to my starfield program.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: STxAxTIC on August 30, 2019, 09:05:19 am
I was pleasantly blown away by this humble yet vastly addicting demo, thanks for sharing!
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on September 01, 2019, 05:07:22 am
As Johnno would say, Nicely done sir, nicely done!

Thanks!
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on September 01, 2019, 05:08:05 am
This is a very cool effect. I may have to try loading backgrounds to my starfield program.

Glad you liked it.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on September 01, 2019, 05:11:31 am
I was pleasantly blown away by this humble yet vastly addicting demo, thanks for sharing!

Thanks a lot.  I think I meant this to be a screensaver, but using Ubuntu/Linux, I think it would be far too complicated.
Besides, I'd have to eliminated all controls then, I suppose.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on September 01, 2019, 05:32:59 am
Hey! That's what I was going to say!

WARNING: Nerd alert: There are no stars in the "great expanse" between galaxies... So, the stars that you are displaying, would be ours (Milky way - assuming you are going for accuracy - and if so, that is a nice rendition of M31)... Cool

Indeed, some suspension of disbelief is required, as with most good sci-fi.  I assume that M31 (Messier) is Andromeda.  But which part of it are you calling M31?  One of the varied galaxies that float past?  I just chose some arbitrary colours for the galaxies, which are generated by some code I hope to expand to make better-looking galaxies in the future.  (I think that code is currently commented out in this prog.)  Unfortunately, I still have to use IrfanView to complete my galaxy-making process.

As for the awesome-looking large image, that would be courtesy of NASA, and I'm still trying to figure out its official name.  I call it the K9 Nebula (even if it's just a lot of dust and stuff) because I can see a nice little doggy head in it.  Or dog-like creature.  Lots of jaw-dropping telescope images I could've chosen, but I needed something that would tile relatively seamlessly.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: Qbee on December 12, 2019, 08:57:50 pm
That is really a cool effect, opens new horizons for me.
Thank you for sharing, @SirCrow !
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: OldMoses on December 14, 2019, 08:13:33 pm
Very cool, it gives a nice 3D effect.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on January 20, 2020, 12:20:21 am
That is really a cool effect, opens new horizons for me.
Thank you for sharing, @SirCrow !

Glad you liked it, thanks.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on January 20, 2020, 12:25:23 am
Very cool, it gives a nice 3D effect.

Thanks.  It's good when 2D can look 3D.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: Aurel on January 20, 2020, 09:05:48 am
sorry but i get this
LINE 596 : invalid handle

and what is that ???
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: AndyA on January 20, 2020, 08:43:11 pm
Very nice parallax effect!

Maybe a seamless background is the only thing that could make the effect even better.

Here's your [dark_Tiled] made seamless...
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: Aurel on January 21, 2020, 07:40:26 am
sorry but i get this
LINE 596 : invalid handle

and what is that ???


Hello...anyone know how to fix this ???
and why is there no end if or ENDIF there  ?

thanks
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: bplus on January 21, 2020, 11:52:05 am
sorry but i get this
LINE 596 : invalid handle

and what is that ???


Hello...anyone know how to fix this ???
and why is there no end if or ENDIF there  ?

thanks

Aurel what's your version number and OS system? It works fine for me, version QB64 v1.3 or 1.4 on Windows 10-64 and Output EXE to Source Folder bullet under Run menu.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SMcNeill on January 21, 2020, 12:21:32 pm
Aurel what's your version number and OS system? It works fine for me, version QB64 v1.3 or 1.4 on Windows 10-64 and Output EXE to Source Folder bullet under Run menu.

Aurel doesn't have the Output EXE to Source option turned on.  I think he mainly uses an different IDE, and I don't believe there's an option when compiling from the command line to send the EXE to the source folder.  (But I wouldn't swear to that.  I don't compile from the command line enough to know what our options are anymore with it...)
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: bplus on January 21, 2020, 12:27:54 pm
Aurel doesn't have the Output EXE to Source option turned on.  I think he mainly uses an different IDE, and I don't believe there's an option when compiling from the command line to send the EXE to the source folder.  (But I wouldn't swear to that.  I don't compile from the command line enough to know what our options are anymore with it...)

Ah! That's it, he is surely building an editor for QB64, he did one for SmallBASIC which allows us to use the faster 64 bit version, making it better than the new updated editor (except for help access).

So how does RhoSigma handle the EXE output filing on Notepad++ ? All to one folder?
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: FellippeHeitor on January 21, 2020, 10:44:15 pm
Quote
I don't believe there's an option when compiling from the command line to send the EXE to the source folder.

-o

QB64 COMPILER

USAGE: qb64 [switches] <file>

OPTIONS:
  <file>                  Source file to load
  -v                      Verbose mode (detailed warnings)
  -c                      Compile instead of edit
  -x                      Compile instead of edit and output the result to the
                             console
  -p                      Purge all pre-compiled content first
  -z                      Generate C code without compiling to executable
   -o <output file>        Write output executable to <output file>
  -e                      Enables OPTION _EXPLICIT, making variable declaration
                             mandatory (per-compilation; doesn't affect the
                             source file or global settings)
  -s[:switch=true/false]  View/edit compiler settings
  -l:<line number>        Starts the IDE at the specified line number
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SMcNeill on January 21, 2020, 10:48:43 pm
-o

QB64 COMPILER

USAGE: qb64 [switches] <file>

OPTIONS:
  <file>                  Source file to load
  -v                      Verbose mode (detailed warnings)
  -c                      Compile instead of edit
  -x                      Compile instead of edit and output the result to the
                             console
  -p                      Purge all pre-compiled content first
  -z                      Generate C code without compiling to executable
   -o <output file>        Write output executable to <output file>
  -e                      Enables OPTION _EXPLICIT, making variable declaration
                             mandatory (per-compilation; doesn't affect the
                             source file or global settings)
  -s[:switch=true/false]  View/edit compiler settings
  -l:<line number>        Starts the IDE at the specified line number


So nothing which natively says “to source folder”.  Maybe we should add a -os switch as a shortcut to do that.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: FellippeHeitor on January 21, 2020, 10:55:16 pm
qb64 -s will show settings.

qb64 -s:exewithsource will print TRUE or FALSE depending on the current setting.

qb64 -s:exewithsource=true or qb64 -s:exewithsource=false will set the behavior.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SMcNeill on January 21, 2020, 11:06:29 pm
qb64 -s will show settings.

qb64 -s:exewithsource will print TRUE or FALSE depending on the current setting.

qb64 -s:exewithsource=true or qb64 -s:exewithsource=false will set the behavior.

So saved IDE settings like “Output EXE with Source” even affect command line compilation?  I didn’t realize that at it.  It’s nice to know (unless I misunderstood you?).
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: FellippeHeitor on January 21, 2020, 11:22:58 pm
Yes, command line is affected by those settings as well.

Up until v1.3, using -s to view or alter settings would do the requested operation and quit back to command line. I have just pushed a change to the development build that allows using -s:switch=true/false to change settings and proceed to the IDE in case a file is specified in the command line or to proceed with compilation if -x, -c or -z are passed, so there's that now.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: Aurel on January 22, 2020, 02:27:40 am
Hello guys
Yes Mark, QB64 v1.3  32bit and yes i am building version for qb64 so that is why i am asking for command line
switches.
Still .i am not sure from Felipe answer is implemented that exe can be created inside program/source folder or not
I understand why qb64 create exe in the root folder because it is IDE and easy way to comunicate with exe is ,if is
inside same folder.
I can set in my editor that look into root folder..but then i must little bit more improve my editor config file with
compiler switch because i already added SB too,but that is not important here i would be happy with qb64 separate version as well.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: Aurel on January 22, 2020, 02:30:17 am
I was asking about this Invalid handle...i am not sure what that might be.
Is that mean that handle not exists?
or
Is that mean that handle is wrong type?
in fact is see in this program/line  just few variables
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: bplus on January 22, 2020, 10:58:11 am
Quote
I was asking about this Invalid handle...i am not sure what that might be.
Is that mean that handle not exists?
or
Is that mean that handle is wrong type?
in fact is see in this program/line  just few variables
Hi Aurel,

It usually means your file did not get loaded which usually means you didn't bullet Output the EXE to source folder under the Run menu.
I tried to replicate your handle error my removing that bullet in my IDE before running the bas code and got a big black screen of nothing, no handle errors from compiler, just a crash which is not same result as yours? maybe 32 bit version is different or... are you still using Windows XP?

Quote
I was asking about this Invalid handle...i am not sure what that might be.
Hello guys
Yes Mark, QB64 v1.3  32bit and yes i am building version for qb64 so that is why i am asking for command line
switches.
Still .i am not sure from Felipe answer is implemented that exe can be created inside program/source folder or not
I understand why qb64 create exe in the root folder because it is IDE and easy way to comunicate with exe is ,if is
inside same folder.
I can set in my editor that look into root folder..but then i must little bit more improve my editor config file with
compiler switch because i already added SB too,but that is not important here i would be happy with qb64 separate version as well.

From what I gather from Fellippe, you need to set the bullet in your IDE next to Output EXE to Source Folder under the Run Menu (even if you are not editing with the IDE) because QB64.exe reads the IDE settings.

Title: Re: Space Travel w/ Multi-Layered Stars
Post by: Aurel on January 23, 2020, 10:56:29 am
Quote
because QB64.exe reads the IDE settings

hi Mark...hmm that's bad news
I will see..
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: bplus on January 23, 2020, 02:25:02 pm
This would be a REALLY COOL screensaver!

Oh, but one issue: Where is the Enterprise, or the Defiant?  Star Treking in space!

GREAT JOB!

Now arrived
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on January 26, 2020, 11:55:51 pm
This would be a REALLY COOL screensaver!

Oh, but one issue: Where is the Enterprise, or the Defiant?  Star Treking in space!

GREAT JOB!

Thank you.  If I could make a screensaver of it easily, I'd love to.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on January 27, 2020, 12:25:37 am
Now arrived

Easily the best and most beautiful U.S.S. Enterprise ever designed, the NCC-1701-A.
Years ago, I built a digital model of her.  Came out great, but I made her bottom too big.
Now that I've found how to run SketchUp under Linux, I may have another go at her.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on February 14, 2020, 12:19:21 am
Very nice parallax effect!

Maybe a seamless background is the only thing that could make the effect even better.

Here's your [dark_Tiled] made seamless...

I'll have to try it with your version of the image.  But what do you mean by seamless?  As far as I can see, my original has very faint seams that all but vanish with all the layers of stars, and other things, passing over them.  It looks plenty seamless to me.  Is there a flaw I've missed?
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SMcNeill on February 14, 2020, 12:42:45 am
I don't know how it is with the more modern Windows, but in the old days of XP and lower it was quite easy to do a screensaver.  You would rename the .exe to .scr and place the file in your Windows directory and add it as your screensaver.  Not sure if that is still relevant, but there you go.  Warp speed ahead.  Live Long and Prosper.

https://www.qb64.org/forum/index.php?topic=1018.msg102149#msg102149
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on February 14, 2020, 01:45:24 am
I don't know how it is with the more modern Windows, but in the old days of XP and lower it was quite easy to do a screensaver.  You would rename the .exe to .scr and place the file in your Windows directory and add it as your screensaver.  Not sure if that is still relevant, but there you go.  Warp speed ahead.  Live Long and Prosper.

Did I forget to mention that I'm using Linux/Ubuntu 18.04?  Pretty sure it's much more complicated than you described, darn it.  Full stop, I think.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SMcNeill on February 14, 2020, 01:51:51 am
Did I forget to mention that I'm using Linux/Ubuntu 18.04?  Pretty sure it's much more complicated than you described, darn it.  Full stop, I think.

Try this link: https://www.hecticgeek.com/2012/07/enable-screensavers-ubuntu-linux/
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: AndyA on February 15, 2020, 01:53:53 pm
Quote
I'll have to try it with your version of the image.  But what do you mean by seamless?  As far as I can see, my original has very faint seams that all but vanish with all the layers of stars, and other things, passing over them.  It looks plenty seamless to me.  Is there a flaw I've missed?

I Googled "What is a seamless pattern?"

Top result: A seamless pattern is an image that can be placed side-by-side with copies of itself without any visible seams or interruptions on the content, so you can repeat this image and create a pattern that can go on infinitely to create unique backgrounds, text effects or brand elements.

In other words, images that when tiled, will blend perfectly on all sides of the image.

The image I provided blends perfectly on all four sides of the image when tiled.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on February 16, 2020, 02:42:33 pm
I Googled "What is a seamless pattern?"

Top result: A seamless pattern is an image that can be placed side-by-side with copies of itself without any visible seams or interruptions on the content, so you can repeat this image and create a pattern that can go on infinitely to create unique backgrounds, text effects or brand elements.

In other words, images that when tiled, will blend perfectly on all sides of the image.

The image I provided blends perfectly on all four sides of the image when tiled.

Well, if you see my version of the image exactly the way I do, then you're seeing it as I meant it to be, and I consider it seamless enough.  As long as you don't see a sudden jump or shift in the image, I don't see any problem.  Your version, when it's the same size as mine, has more frequent repetition than I prefer.  If my code were modified to work with larger BG images, then it might work nicely with the interlaced pattern you've created, if that's the word for it.
Anyway, these days, I can just barely concentrate on this programming thing, so I think I'll just leave it as is.
Title: Re: Space Travel w/ Multi-Layered Stars + MUSIC
Post by: SirCrow on March 08, 2020, 10:28:37 pm
Here's my latest version. 

EDIT: I've added the ability to play audio accompaniment while flying thru space, but you may have to supply your own sound files.  And you'd have to change the program code to refer to your own files, unless the filenames are exactly the same.

I've attached a help file below.

===  IS IT OK to upload copyrighted material here?  If not, I'll have to remove the audio files and resend the archive.  ===

EDIT: I changed the code to check the Audio folder for available files, so that the user can place his/her own sound files there; then my IDE closed unexpectedly.  When I reopened it, no auto-saved file was offered, so now I have to redo all that.  In any case, one of the audio files I had included is CREATIVE COMMONS, so I'm leaving that one in, and I don't care what anyone says about that.  Ciao for now.  I'm gonna work on some SketchUp models for a while instead;  that's much easier when I can't concentrate, which is quite often.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: odin on March 08, 2020, 10:43:05 pm
Not okay.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on March 08, 2020, 10:51:05 pm
Not okay.

If this is true, then I'll have to upload w/o the audio and let the user substitute whatever audio files he/she wants.
Bummer.  Can someone please confirm this for me?  I'd like a little more than Not okay, please understand, before I make the effort.  Thanks.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: FellippeHeitor on March 09, 2020, 03:31:38 am
If odin says it, it is true. He's the one.

I wonder why he didn't delete it himself. He probably wanted to give you a chance to choose the righteous path yourself.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: TerryRitchie on March 09, 2020, 01:35:49 pm
I'm no legal expert on this so let's get that out of the way. However, when I was a teacher I was able to use any copyrighted material I chose as long as it was for educational purposes only. I believe this exemption extends beyond the educational community as long as the works (your program in this case) are marked as "for educational use only".

In many of my code listings of programs created for the QB64 class I taught I placed this disclaimer inside. This may work for regular users too, placing "educational use" within the source code and "education use" within the forum post.

Again, I am not 100% sure about this. Someone in the legal profession should be consulted to verify my assumptions.
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: FellippeHeitor on March 09, 2020, 03:58:15 pm
🤷‍♂️

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Space Travel w/ Multi-Layered Stars
Post by: SirCrow on March 29, 2020, 04:03:02 pm
I'm having trouble uploading my updated archive.