Author Topic: Samples Gallery  (Read 43897 times)

0 Members and 1 Guest are viewing this topic.

Offline TerryRitchie

  • Seasoned Forum Regular
  • Posts: 495
  • Semper Fidelis
    • View Profile
Re: Samples Gallery
« Reply #45 on: March 01, 2020, 10:18:44 pm »
Update: Nope QBzerk is running around mazes 1980's Arcade game style. Opens with Asimov's 3 Laws for robots. I think I heard a clip from Pink Floyd.

Read those laws again ;-)  The robots rule in this game.
In order to understand recursion, one must first understand recursion.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Samples Gallery
« Reply #46 on: March 01, 2020, 10:21:24 pm »
Ah, that makes more sense for this game :) You know I might have missed that the first time too,  deja vu again!

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Samples Gallery
« Reply #47 on: March 01, 2020, 11:35:05 pm »
bplus, saw your recent post.

It was supposed to be two ZIP files, appended to the original post.

Okay, weird how they fit in Programs...

(yall're turning me into clippy)
« Last Edit: March 01, 2020, 11:38:49 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Samples Gallery
« Reply #48 on: March 01, 2020, 11:39:43 pm »
bplus, saw your recent post.

It was supposed to be two ZIP files, appended to the original post.

Okay, weird how they fit in Programs...

(yall're turning me into clippy)

Sorry, that is what I tried for but https://www.qb64.org/forum/index.php?topic=2273.msg115066#msg115066

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Samples Gallery
« Reply #49 on: March 01, 2020, 11:41:50 pm »
Oh man yeah I'm getting tired, missing some of the updates. Thanks again m8.
You're not done when it works, you're done when it's right.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: Samples Gallery
« Reply #50 on: March 02, 2020, 04:49:17 am »
@RhoSigma and @SMcNeill, do you guys want to point me at anything of yours?

EDIT:
Just put on hold for a while, just found another quirk in it, let you know when ready...


EDIT2:
So finally here's the correct routine, there was a mistake in the negative value barrier check.
Unfortunately I can't correct it in the mentioned post below, as that thread is already locked...

Code: QB64: [Select]
  1. '---------------------------------------------------------------------
  2. 'Function:  Convert any given dec/hex/oct number into a binary string.
  3. '           Can handle positive and negative values and works in that
  4. '           similar to the QB64 built-in HEX$ and OCT$ functions.
  5. '
  6. 'Synopsis:  binary$ = BIN$ (value&&)
  7. '
  8. 'Result:    binary$ --> The binary representation string of the given
  9. '                       number without leading zeros for positive values
  10. '                       and either 8/16/32 or 64 chars for negatives,
  11. '                       depending on the input size.
  12. '
  13. 'Inputs:    value&& --> The pos./neg. number to convert, may also be
  14. '                       given as &H or &O prefixed value.
  15. '
  16. 'Notes:     You may also pass in floating point values, as long as its
  17. '           represented value fits into the _INTEGER64 (&&) input, hence
  18. '           approx. -9.223372036854776E+18 to 9.223372036854776E+18.
  19. '           Different from HEX$ and OCT$, BIN$ won't throw an overflow
  20. '           error, if this range is exceeded, but the result is probably
  21. '           wrong in such a case.
  22. '---------------------------------------------------------------------
  23. FUNCTION BIN$ (value&&)
  24. '--- option _explicit requirements ---
  25. DIM temp~&&, charPos%, highPos%
  26. '--- init ---
  27. temp~&& = value&&
  28. BIN$ = STRING$(64, "0"): charPos% = 64: highPos% = 64
  29. '--- convert ---
  30.     IF (temp~&& AND 1) THEN MID$(BIN$, charPos%, 1) = "1": highPos% = charPos%
  31.     charPos% = charPos% - 1: temp~&& = temp~&& \ 2
  32. LOOP UNTIL temp~&& = 0
  33. '--- adjust negative size ---
  34. IF value&& < 0 THEN
  35.     IF -value&& < &H0080000000~&& THEN highPos% = 33
  36.     IF -value&& < &H0000008000~&& THEN highPos% = 49
  37.     IF -value&& < &H0000000080~&& THEN highPos% = 57
  38. '--- set result ---
  39. BIN$ = MID$(BIN$, highPos%)
  40.  
  41.  

NOTE: The function here is obsolete and buggy, use for reference only!!
The only thing I think of, regarding the &B enhancements in v1.4, would be to replace the old, slow, and non-negativ numbers able BIN$ in the ToolBox board with this one: https://www.qb64.org/forum/index.php?topic=1933.msg112096#msg112096
« Last Edit: March 02, 2020, 08:16:32 am by RhoSigma »
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Samples Gallery
« Reply #51 on: March 02, 2020, 05:37:56 am »
@Qwerkey
It runs fine on my machine. Sky is looking good. Can you share a screenshot of that? Have anyone else found this issue?
Ok. It is fine to *not* to my "Moving into the matrix rain" program.
Oh! There's a games section too..
@Qwerkey @bplus Please add my game Hunter's Revenge https://www.qb64.org/forum/index.php?topic=345.msg2322#msg2322
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Samples Gallery
« Reply #53 on: March 02, 2020, 10:40:06 am »
Quote
The only thing I think of, regarding the &B enhancements in v1.4, would be to replace the old, slow, and non-negativ numbers able BIN$ in the ToolBox board with this one: https://www.qb64.org/forum/index.php?topic=1933.msg112096#msg112096

Hi Rho,

Makes sense to update toolbox BIN$ with complement to &B enhancements in QB64 v1.4 by same author.

I think we want to replace BIN$ in Toolbox with the one found in "A few pushes to Development Build" Reply #35, last Edit Dec 17, 2019"
https://www.qb64.org/forum/index.php?topic=1933.msg112096#msg112096

So that is what I will try.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: Samples Gallery
« Reply #54 on: March 02, 2020, 10:59:46 am »
I think we want to replace BIN$ in Toolbox with the one found in "A few pushes to Development Build" Reply #35, last Edit Dec 17, 2019"
https://www.qb64.org/forum/index.php?topic=1933.msg112096#msg112096

So that is what I will try.

NO - NO - NO
I wrote I still found another bug in it, please take the corrected function from here instead: https://www.qb64.org/forum/index.php?topic=2233.msg115086#msg115086
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Samples Gallery
« Reply #55 on: March 02, 2020, 11:31:23 am »
NO - NO - NO
I wrote I still found another bug in it, please take the corrected function from here instead: https://www.qb64.org/forum/index.php?topic=2233.msg115086#msg115086

Roger that but can you guess why I got confused?

IMO you should have not made that note but I bet you were trying to be careful :)

I have it changed, how is it now?
« Last Edit: March 02, 2020, 11:44:49 am by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Samples Gallery
« Reply #56 on: March 02, 2020, 12:03:35 pm »
Roger that but can you guess why I got confused?

IMO you should have not made that note but I bet you were trying to be careful :)

I have it changed, how is it now?

Oops, needed to update the URL too, OK now what?

@STxAxTIC had to use the whole length in URL to point exactly to RhoSigma's reply, I got a demo and screenshot myself.

@RhoSigma does the output from demo look OK? (neg numbers are a bit of surprise for me.)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Samples Gallery
« Reply #57 on: March 02, 2020, 12:14:22 pm »
Quote
@Qwerkey @bplus Please add my game Hunter's Revenge https://www.qb64.org/forum/index.php?topic=345.msg2322#msg2322

@Qwerkey @STxAxTIC  what do you say to every member (over a certain level of contribution to this forum) getting 1 game of their choosing, be it theirs or someone else? This sort of falls in with _vince idea too. The game can be replaced as they progress and mature.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: Samples Gallery
« Reply #58 on: March 02, 2020, 12:32:39 pm »
Roger that but can you guess why I got confused?

IMO you should have not made that note but I bet you were trying to be careful :)

I have it changed, how is it now?

Well sorry b+,
yes it looks correct now, so other people can use it without issues.

Just noticed the mistake a few minutes after my first post. Wish there would be a delay before a post is actually shown in the forum, and that one could completly revoke the post within the delay time, or at least tick it to be postponed until the author finally releases it.

Also the locking of threads comes contra productive here, as I can't change the codebox in the "Development" thread to contain the corrected version. Hence everybody who's searching the forum for BIN$ and stumbles over the buggy version first instead of the now correct version in the ToolBox, will probably use the buggy function, at least until it bites his ass.

In the future I'll restrict myself to only posting codeboxes/attachements in the "Programs" board, where no locking is active and I'm able to correct things when needed.


Oh, just see another reply, so here is the answer for that one.

The output looks as intended by me, here an example to show pos./neg. number behavior at the _BYTE barrier:
Code: QB64: [Select]
  1. '  128 =         10000000 (8 unsigned data bits)
  2. '  127 =          1111111 (7 unsigned data bits)
  3. ' -127 =         10000001 (  normal sign + 7 data bits)
  4. ' -128 = 1111111110000000 (extended sign + 7 data bits)
note the sign extension for -128, so it can be distinguished from +128, it's similar at the INTEGER/LONG barriers.

However, if you have better sugestions it should be easy enough to adapt the function.
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Samples Gallery
« Reply #59 on: March 02, 2020, 12:33:48 pm »
@bplus: When doing the Samples Gallery I am aiming to include at least 1 superior program from all high contributors.  It seems only fair.