Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 326
» Latest member: hafsahomar
» Forum threads: 1,759
» Forum posts: 17,939

Full Statistics

Latest Threads
As technology rapidly evo...
Forum: Utilities
Last Post: Frankvab
Yesterday, 06:09 AM
» Replies: 14
» Views: 44
Everybody's heard about t...
Forum: Utilities
Last Post: Frankvab
Yesterday, 06:07 AM
» Replies: 22
» Views: 1,300
MBA Assignment Help in Du...
Forum: General Discussion
Last Post: hafsahomar
06-11-2025, 07:05 AM
» Replies: 0
» Views: 15
лучшие песни медляки слуш...
Forum: Petr
Last Post: WillieTop
06-08-2025, 02:21 AM
» Replies: 0
» Views: 29
пинк слушать онлайн беспл...
Forum: SMcNeill
Last Post: WillieTop
06-08-2025, 02:20 AM
» Replies: 0
» Views: 24
скачать музыку российскую...
Forum: madscijr
Last Post: WillieTop
06-08-2025, 02:18 AM
» Replies: 0
» Views: 23
нежная музыка mp3 скачать
Forum: Keybone
Last Post: WillieTop
06-08-2025, 02:17 AM
» Replies: 0
» Views: 25
лучшая песня слушать онла...
Forum: bplus
Last Post: WillieTop
06-08-2025, 02:16 AM
» Replies: 0
» Views: 28
пикник слушать онлайн луч...
Forum: Spriggsy
Last Post: WillieTop
06-08-2025, 02:15 AM
» Replies: 0
» Views: 23
какая сейчас популярная м...
Forum: RhoSigma
Last Post: WillieTop
06-08-2025, 02:14 AM
» Replies: 0
» Views: 19

 
  Let's take this input for a spin
Posted by: doppler - 05-07-2022, 02:57 PM - Forum: Programs - No Replies

Code: (Select All)
_Title "Spining Input test"

'
' 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)

Print this item

  Comparison QB64 compiled with gcc optimizations and without
Posted by: Coolman - 05-07-2022, 09:07 AM - Forum: General Discussion - Replies (77)

I have started to test the version of qb64 compiled with the option -Ofast and the original version. resultas :

simple code using pset.

2.3x seconds : program compiled with qb64 -Ofast
3.5x seconds : program compiled with original qb64

Interesting results. Quite an important gain.

Code: (Select All)
x% = 1280: y% = 768
Screen _NewImage(x%, y%, 32)
_Delay 0.2
_ScreenMove _Middle
start = Timer(.001)
For b% = 1 To 100
    For i% = 1 To x%
        For n% = 1 To y%
            PSet (i%, n%), _RGB(Rnd * 255, 0, 0)
        Next n%
    Next i%
Next b%
Print Timer(.001) - start; "seconds"

the _ScreenMove _Middle command is supposed to center the window but if I don't put _Delay 0.2 before, sometimes it doesn't work. strange.

Print this item

Rainbow Spiderbro - an adventure puzzle game!
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 Big Grin

I welcome all feedback, lay it on me Smile



Attached Files
.zip   spiderbro.zip (Size: 71.09 MB / Downloads: 61)
Print this item

  Some Noob (to QB64) Questions
Posted by: TarotRedhand - 05-07-2022, 08:29 AM - Forum: Help Me! - Replies (11)

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.

Thanks in advance.

TR

Print this item

  Ripple - A reaction/word game
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.



Attached Files
.zip   Ripple.zip (Size: 671.86 KB / Downloads: 54)
Print this item

  Alchemy - A word Game
Posted by: PhilOfPerth - 05-07-2022, 04:12 AM - Forum: Programs - Replies (30)

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



Attached Files
.zip   Alchemy.zip (Size: 3.6 KB / Downloads: 53)
Print this item

  A list of forums at or near the Portal
Posted by: PhilOfPerth - 05-07-2022, 01:23 AM - Forum: General Discussion - No Replies

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.

Print this item

  Can I restrict attempted resizing of a screen to an invalid side?
Posted by: hanness - 05-06-2022, 11:19 PM - Forum: General Discussion - Replies (3)

Apologies for so many questions. Unfortunately, there are just some things I cannot seem to figure out on my own :-)

Let's assume a create a screen like this:

 

Code: (Select All)
                oldimage& = handle&
                handle& = _NewImage(Horizontal, Vertical, 256)
                Screen handle&
                _FullScreen _Off
                _FreeImage oldimage&

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?


.bmp   Image1.bmp (Size: 172.96 KB / Downloads: 103)

Print this item

  Slight problem with calculation of number of lines of text that can be displayed
Posted by: hanness - 05-06-2022, 10:06 PM - Forum: General Discussion - Replies (2)

I'm so close to having everything working - just a few tiny odds and ends to figure out....

Let's say I open a Windows a screen with QB64 that is 400 x 400 pixels and I start displaying text on the screen with a font size of 12. My calculations say that I should be able to fit 33 lines of text on this screen (33 x 12 pixels = 396 pixels). However, in actuality, I can only fit 32 lines.

Is there something like an invisible "buffer" of a few pixels that cannot be used?

When I use a screen capture utility to capture a copy of my window, I can see that the area inside of the physical screen borders is precisely 400 pixels so I can't quite make sense of what I'm running into.

Print this item

  check out my site
Posted by: animegame - 05-06-2022, 06:41 PM - Forum: Programs - Replies (1)

my site check it out a few games there

Print this item