QB64 Phoenix Edition
Ball Sub - draws several kind of filled, textured balls (circles) - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Programs (https://staging.qb64phoenix.com/forumdisplay.php?fid=7)
+---- Thread: Ball Sub - draws several kind of filled, textured balls (circles) (/showthread.php?tid=1929)

Pages: 1 2


RE: Ball Sub - draws several kind of filled, textured balls (circles) - Dav - 08-23-2023

Hey @dbox, when I was working on the last update I came across a possible QBJS error, thought I'd mention it.  I narrowed it down to this: It errors out when this is on the same line: 
_Display: If displayStatus%% = 1 Then _AutoDisplay

But it works OK when splitting that up on two lines iistead.  Here's a snippet showing that.  You can comment it out an uncomment the workaround way to see.

- Dav




RE: Ball Sub - draws several kind of filled, textured balls (circles) - mnrvovrfc - 08-23-2023

Might be confounded by the function of the same name?

This might give somebody an epileptic seizure. I ran it for a few seconds, couldn't take it much more. So many patterns! Also using alpha channel. It would have taken me the rest of my life to do anything like this.

This is not a reproach. I expected the program to display a separate ball for each technique, maybe going in a loop until [ESC] is pressed to show the possibilities. Combine this with JDJ's planet-maker. Cool


RE: Ball Sub - draws several kind of filled, textured balls (circles) - Dav - 08-23-2023

I dunno.  Maybe.  Only know that line bugs it out for some reason.  Yeah, I just set it up to loop balls like that only to demo all of them quick.  The SUB should be used differently for other programs.  (And I sincerely hope this doesn't cause anyone to have a seizure!) 

Hey - I remember that planet maker program posted a while back  - that was cool.  You give me an idea to work on, a "Moon' looking ball with craters.

- Dav


RE: Ball Sub - draws several kind of filled, textured balls (circles) - dbox - 08-23-2023

(08-23-2023, 05:44 PM)Dav Wrote: Hey @dbox, when I was working on the last update I came across a possible QBJS error, thought I'd mention it.  I narrowed it down to this: It errors out when this is on the same line: 
_Display: If displayStatus%% = 1 Then _AutoDisplay

But it works OK when splitting that up on two lines instead.
Thanks @Dav, I've seen this issue before but it doesn't look like I ever logged it. 

I have now:  https://github.com/boxgaming/qbjs/issues/79

I'll look at getting that fixed in the next release.


RE: Ball Sub - draws several kind of filled, textured balls (circles) - grymmjack - 08-23-2023

@DAV great balls. This could be a lot of fun making some puzzle type games, etc!

Could you make them a certain color? While maintaining the texture/patterns?

That could be super fun to make puzzles with.


RE: Ball Sub - draws several kind of filled, textured balls (circles) - Dav - 08-23-2023

Thanks, @grymmjack.  Yes, the color can be specified with the r,g,b,a values, for Red/Green/Blue/Alpha.

Usage:  ball (kind, x, y, size, r, g, b, a) 

Example, A gradient ball (0), at x/y location of 200,200, size of 50, Full Red color with no alpha transparency (255,0,0,255).

ball 0, 200, 200, 50, 255, 0, 0, 255

- Dav