Author Topic: UPDATED Storm Demos  (Read 818 times)

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2104
    • View Profile
UPDATED Storm Demos
« on: September 29, 2023, 10:34:53 AM »
Hello Friends,

I have updated the attached demos that I initially released yesterday.

These updated demos all require the latest version of BCX 8.0.6 and any Windows compiler

https://bcxbasiccoders.com/smf/index.php?topic=948.0


Each demo is independent of the others. 

Compile them as Gui apps, 32-bit or 64-bit, and run.

Each can be stretched, windowed, or full screen.  Enjoy!

They all have been updated to the latest version of the Quick Pixels library. 
The Quick Pixels library has been updated to use dynamic memory allocation that
should support any screen resolution, even 4K automatically.

If you run these on high definition screens (4K), I'd like to hear about how it looks.

Thank you
~MrBcx~

Robert

  • Hero Member
  • *****
  • Posts: 1206
    • View Profile
Re: UPDATED Storm Demos
« Reply #1 on: March 07, 2024, 11:41:10 AM »

If you run these on high definition screens (4K), I'd like to hear about how it looks.

Thank you
~MrBcx~

Monitor 4K 55 inch HDMI T.V.
Ryzen 9 5950X CPU
AMD Radeon RX 6500 XT Graphics card

When they're not moving, nice. See attached screengrab image of a portion of the screen with the demo running at full size.

But at full screen, moving, the phong balls are jittery, blurry.

Maybe some bitcoin mining code to directly address the GPU would help.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2104
    • View Profile
Re: UPDATED Storm Demos
« Reply #2 on: March 07, 2024, 01:16:21 PM »
Thanks Robert.

The jittery that you mention might be the GDI bitblit struggling to keep up with moving memory.

Sadly, GPU shader languages require more mental horsepower than I've been able to corral.

C'est la vie ...


jbk

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Re: UPDATED Storm Demos
« Reply #3 on: March 07, 2024, 03:36:23 PM »
MrBcx
how do change the background color?
on my PC the balls move jittery but if I change TimerID = SetTimer(Form1, ID_TIMER, 50, NULL) from 50 to 30 then the balls move smoothly though quite a bit faster, but the black background makes it hard to distinguish the contour of the balls thereby making them look fuzzy

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2104
    • View Profile
Re: UPDATED Storm Demos
« Reply #4 on: March 07, 2024, 04:41:04 PM »
MrBcx
how do change the background color?
on my PC the balls move jittery but if I change TimerID = SetTimer(Form1, ID_TIMER, 50, NULL) from 50 to 30 then the balls move smoothly though quite a bit faster, but the black background makes it hard to distinguish the contour of the balls thereby making them look fuzzy

Robert's screenshot shows what the marbles should look like.

One way to change the background from black to gray, is to use the BCX_FLOODFILL command:

SUB Drawit
    BCX_BUFFER_START(MAXX, MAXY)
    BCX_FLOODFILL(0, 1, 1, RGB(128, 128, 128), RGB(128, 128, 128), 0, BCX_BUFFER)
    FOR INT i = 1 TO MAX_PARTICLES
        Marbles.X = Marbles.X + Marbles.XVelocity
        Marbles.Y = Marbles.Y + Marbles.YVelocity
        IF Marbles.X < 0 OR Marbles.X > MAXX THEN Marbles.XVelocity = -Marbles.XVelocity
        IF Marbles.Y < 0 OR Marbles.Y > MAXY THEN Marbles.YVelocity = -Marbles.YVelocity
        BCX_BLIT_SPRITE(Marbles.hBmp, Marbles.X, Marbles.Y, RGB(0, 0, 0), BCX_BUFFER)
    NEXT
    BCX_BUFFER_STOP(Form1)
END SUB
« Last Edit: March 07, 2024, 04:43:53 PM by MrBcx »

jbk

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Re: UPDATED Storm Demos
« Reply #5 on: March 07, 2024, 05:21:43 PM »
the BCX_FLOODFILL did help some but the balls are still jittery even at SetTimer 30 and a bit fuzzy, the jitters are shorter at SetTimer 30 but they are still there

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 2104
    • View Profile
Re: UPDATED Storm Demos
« Reply #6 on: March 07, 2024, 06:52:28 PM »
the BCX_FLOODFILL did help some but the balls are still jittery even at SetTimer 30 and a bit fuzzy, the jitters are shorter at SetTimer 30 but they are still there

Just a hunch but maybe reduce the number of balls from 100 to 50 and see if that helps.

MACRO  MAX_PARTICLES =  100