An old coin-op game that has a similar looking ship moving in the same way. That "where have I played this before?" feeling bugged me. As a proud old arcade regular, I had to figure it out.
I knew it began with a G!
Quote:I just renamed all the files to lower case for any other Linux user. Hey, I wonder if a command like that exists in Windows?
Not such a simple way, unless Win11 added features to RENAME. There are many free bulk file renaming utilities, and many file managers such as Free Commander can do bulk renaming with case changes.
Here is a way to change uppercase to lowercase (but not lower-to-upper) from the Windows command line, without additional tools:
Code: (Select All)
for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")
if typed directly into the command prompt, or
Code: (Select All)
for /f "Tokens=*" %%f in ('dir /l/b/a-d') do (rename "%%f" "%%f")
if used in a batch script.
It can also be done in PowersHell:
Code: (Select All)
dir MYDIR -r | % { if ($_.Name -cne $_.Name.ToLower()) { ren $_.FullName $_.Name.ToLower() } }
(replace MYDIR with the name of the directory that contains the offending files, or leave it out to operate on the current directory. This method will recurse into subdirectories as well.)
Cool ship you've got there, Terry!
Yes, Gyruss! I completely forgot about that game.
I used to be the DOS batch script king back in the day. Thank you for the scripts, I'm so behind the times now.
I can't take credit for the ship. I found it on the Internet probably 10 years ago. I included the original image below. I modified the image for the game to get rid of the lighting effect in the original.
New to QB64pe? Visit the QB64 tutorial to get started. QB64 Tutorial
@TerryRitchie, I downloaded and tried running your demo, but it just sits there on my Mac. The ship briefly spins to a stop at 11 o'clock and won't budge no matter what I do with the mouse. I can fire a bullet every eight seconds or so. Very odd. What's a guy to do?
(10-04-2024, 05:48 PM)NakedApe Wrote: @TerryRitchie, I downloaded and tried running your demo, but it just sits there on my Mac. The ship briefly spins to a stop at 11 o'clock and won't budge no matter what I do with the mouse. I can fire a bullet every eight seconds or so. Very odd. What's a guy to do?
Does the basic spinner code at this post work for you?
10-04-2024, 08:34 PM (This post was last modified: 10-04-2024, 08:37 PM by TerryRitchie.)
(10-04-2024, 06:52 PM)NakedApe Wrote: Nope, it just sits there with the little circle in the middle.
The code uses _MOUSEMOVE. I know this command has caused issues with Macs in the past but I thought those were behind us. Have you upgraded to the latest version of QB64pe?
Try moving this line:
_MOUSEMOVE CENTERX, CENTERY
to just under the _DISPLAY statement in the loop to see if things change.
New to QB64pe? Visit the QB64 tutorial to get started. QB64 Tutorial
10-04-2024, 09:13 PM (This post was last modified: 10-04-2024, 09:14 PM by NakedApe.)
Ahh, of course, I should've noticed the _MouseMove in Spinner.bas. _MouseMove doesn't really work well on MacOS. There's a GLUT issue that's pretty tough to resolve according to the devs. Right now the command causes a .25 second delay every time it's called. That would explain nothing moving onscreen since it's in the loop. If I disable that line and run the program _FullScreen (so the pointer stays fully onscreen), it works just fine.
(10-04-2024, 10:04 PM)NakedApe Wrote: Also Terry I was checking out your library and noticed a Vec2Deg function that was longer than the one I use. Is this simpler version as useful?
No IFs to process. Just one simple line of math to keep your angle between 0 and 360. If you need decimal precision (44.587 degrees instead of 45 degrees, for example), this wouldn't work. But if you want something speedy and *close enough* is close enough, it might serve you better in many use cases.
(10-04-2024, 10:04 PM)NakedApe Wrote: Also Terry I was checking out your library and noticed a Vec2Deg function that was longer than the one I use. Is this simpler version as useful?
radian = _Atan2(Vx, Vy) '
degrees = _R2D(radian) ' If degrees < 0Then degrees = 360 + degrees ' Vec2Deg = degrees ' End Function
Yes, yours and Steve's routines are much better. Thank you for pointing that out and sharing the code.
That goes for everyone, if you notice that any of my libraries can be enhanced/improved upon by all means let me know. Many of the small libraries I post with code here make up the larger game library I'm working on. The better the routines the better the library will be.
New to QB64pe? Visit the QB64 tutorial to get started. QB64 Tutorial