'
' spin$ Just spins. It can be anything you like
' special graphics like growing periods. Even the entire character set.
' If character set suggest very high limit number, see below
'
spin$ = "|/-\" ' spin pattern.
cr$ = Chr$(13) ' end of input
esc$ = Chr$(27) ' end of program life as we know it
Print "Hit <esc> key or <enter> will exit program someway"
Print
'
' the following print statement can be anywhere on the screen EXCEPT
' at a position where input would flow over right edge of execution box.
' Why ? Because I am lazy and didn't want to handle exception at this time.
'
Print "input spin test ? ";
Do ' outer do
spin = 0 ' got to start somwhere
Do ' inner do
_Limit 10 ' limit the spin rate Higher faster, lower slower
x$ = InKey$ ' scan a key
If x$ = esc$ Then System ' Emergency exit "use the escape clause of contract"
If x$ = cr$ Then BackOff1: Print " ": End ' the normal way to end input, this would be a goto
If x$ <> "" Then Exit Do ' got a hit exit inner do
BackOff1 'locate on top of the spin
Print Mid$(spin$, spin Mod (Len(spin$)) + 1, 1); 'Print your selected spin character from spin$
spin = spin + 1 ' just a running count
Loop
BackOff1 ' Over write spin character with x$
Print x$; ' At this point you can build input from x$ (re: t$=t$+x$)
Locate CsrLin, Pos(0) + 1
Loop ' Return to outer do
End ' Abnormal end, never suppose to get here
Sub BackOff1
Locate CsrLin, Pos(0) - 1
End Sub
@pete As I named the sub I was thinking of you. re: truck mud flaps, not all have a naked lady sitting on the beach for a pattern.
Take as you like anything of this code. Free to use or abuse. Just test code and needs to be tweaked to your flavor. (add all the salt and pepper you desire)
Posted by: crumpets - 05-07-2022, 08:39 AM - Forum: Programs
- No Replies
Earlier this year I finished making a game with QB64 I'm calling Spiderbro. It is a retro inspired adventure puzzle game where you play as a purple spider trying to outsmart its shadowy adversary. Source, binaries and all other data in the zip file attached. If the engine for the game interests you at all, I put info about it on itch.io. I got two other games currently in development with this engine and maybe a new engine in development too, so if you like Spiderbro, there's much more to come and it'll all be much bigger and better
I am in the process of trying to convert my old QB 4.5 code to QB64 and have a number of questions I hope can be answered. I will try to keep this thread focused by limiting the number of my questions in a post. If you decide to answer could you please include code snippets as I find that to be the easiest way to learn. Anyway here is my first question.
I have a number of small graphics programs that work fine in QB64 but I would like them to utilise more of my 1080 monitors screen. By utilise I mean that I would like to have access to the individual pixels and not just stretch them to fit using _FULLSCREEN. Preferably I would like the graphics to display in a window with the close button like they currently do in the various SCREEN modes. Is this possible? Not a criticism but TBH I am a little surprised that SCREEN hasn't been expanded to include HD 720, HD 1080 or 4K.
Posted by: PhilOfPerth - 05-07-2022, 05:22 AM - Forum: Programs
- No Replies
This game is for one or two players, who try to find words in a constantly-changing grid of letters. Comments & suggestions welcome. It includes a complete dictionary.
Another small program that I'd like some advice on... I've called it Alchemy, and it's a game in which you try to transform a word into another related word, one letter at a time. It differs from the usual word-swap games in that you can lengthen or shorten the word as you play. I'd welcome any comments or suggestions on it
I, for one, have trouble re-locating threads I've visited or subscribed to, and I reckon it would be useful to have a list of the major forums (fora?) at the Portal - after all, a portal is supposed to be the main entry-point to a location.
I allow the user to resize the screen, but I want to restrict them from making the windows smaller than 400 x 400. That part I can do. I simply check the width and height after resizing the screen and if either width or height is less than 400 I change it to 400.
My concern is that while the user is dragging a corner of the screen to resize it, they can drag it to a point where it causes my program to crash while they are still dragging the corner but before I can check it and resize it. See the screenshot below for an example.
Put another way, I can check the size of the screen AFTER they have resized it, but I can't prevent them from dragging the corners to a ridiculously small size that causes a crash. Is there any way to prevent this?