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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 318
» Latest member: coletteleger
» Forum threads: 1,745
» Forum posts: 17,906

Full Statistics

Latest Threads
astuce pour survivre fina...
Forum: Utilities
Last Post: coletteleger
05-14-2025, 04:47 AM
» Replies: 0
» Views: 9
trouver permis de conduir...
Forum: Utilities
Last Post: nicolasrene
05-05-2025, 05:24 AM
» Replies: 0
» Views: 15
LIGHTBAR Menu
Forum: Programs
Last Post: nicolasrene
05-05-2025, 05:08 AM
» Replies: 15
» Views: 945
Learning Pallet Rack Safe...
Forum: Utilities
Last Post: Sandrapew
04-03-2025, 09:36 AM
» Replies: 0
» Views: 39
Choosing New Versus or Pr...
Forum: Utilities
Last Post: Sandrapew
03-18-2025, 01:11 AM
» Replies: 0
» Views: 33
The QB64 IDE shell
Forum: Utilities
Last Post: JasonPag
09-16-2024, 05:37 PM
» Replies: 9
» Views: 1,059
Importance regarding Ches...
Forum: Utilities
Last Post: JasonPag
09-01-2024, 06:34 PM
» Replies: 0
» Views: 71
Chess and Analysis and En...
Forum: Utilities
Last Post: JasonPag
08-28-2024, 02:37 PM
» Replies: 0
» Views: 68
DAY 009:_PutImage
Forum: Keyword of the Day!
Last Post: grymmjack
09-02-2023, 02:57 PM
» Replies: 54
» Views: 3,439
Fall Banner Contest?
Forum: Site Suggestions
Last Post: grymmjack
08-31-2023, 11:50 PM
» Replies: 36
» Views: 2,169

 
  looking for a simple sprite/tile sheet editor with animation tools
Posted by: madscijr - 07-12-2023, 05:16 PM - Forum: Help Me! - Replies (11)

Hey peeps! 

I'm looking for a sprite/tileset editor with drawing functions similar to Paint or even Paint.net, but also includes tools to help with animation, mockup layouts, etc. 

I'm thinking a single-screen, point-and-click all-in-one tool, that displays the whole tileset, an editing pane, an area to draw a few test tiles for a mockup, a palette color strip, an area to define + test animations, and an area for tools and other info. 

As you edit a tile, if you have drawn a mockup, the changes to the tile would be reflected in the mockup as you edit. 

I'll include a very hastily thrown together mockup to communicate the kind of thing I'm envisioning. 

I'm wondering if anything like this already exists, I wouldn't want to reinvent the wheel unnecessarily. 

Any info appreciated!

[Image: sprite-editor-mockup.png]

Print this item

  Program for editing PDF files
Posted by: Kernelpanic - 07-11-2023, 08:41 PM - Forum: General Discussion - Replies (9)

Something from daily practice. If one need a program to edit PDF files, I recommend this one (free): PDF24 Toolbox

Print this item

  Improved my small Gradient Ball drawing SUB
Posted by: Dav - 07-11-2023, 03:38 AM - Forum: Programs - Replies (22)

I use a small gradient ball SUB in various programs.  It had a flaw however - large balls with dark color values would have think back edges.  Made a new version to fix that.  Just thought I'd share it here.  If you have one too, please share it - I'd love to see what other people are using.  And if you see a way to improve mine please post it.  Thanks!

- Dav

Code: (Select All)

'================
'GRADIENTBALL.BAS
'================
'Simple SUB that draw gradient balls.
'Coded by Dav, JULY/2023


dh = _DESKTOPHEIGHT * .85
SCREEN _NEWIMAGE(dh, dh, 32)

DO
    ball RND * dh, RND * dh, RND * 500 + 25, RND * 255, RND * 255, RND * 255
    _LIMIT 5
LOOP

SUB ball (x, y, size, r, g, b)
    'This SUB draws a gradient ball with given color.

    'see current display status
    displayStatus%% = _AUTODISPLAY

    'turn off screen updates while we draw
    _DISPLAY

    reg = .4

    'if size is larger than value colors given,
    'adjust the reg value to step down at a slower rate.
    'This prevents thick black rim around larger balls
    'that have a too low a given color value.
    IF size > r AND size > g AND size > b THEN
        IF r > g AND r > b THEN reg = r / size * .4
        IF g > r AND g > b THEN reg = g / size * .4
        IF b > r AND b > g THEN reg = b / size * .4
    END IF

    'now draw the ball using CIRCLE.
    'Using smaller STEP value than 1 prevents gaps.
    FOR s = 0 TO size STEP .4
        CIRCLE (x, y), s, _RGB(r, g, b)
        r = r - reg: g = g - reg: b = b - reg
    NEXT

    'show the ball
    _DISPLAY

    'If autodislay was previously on, turn it back on
    IF displayStatus%% = -1 THEN _AUTODISPLAY

END SUB

Print this item

  Code Requests
Posted by: SpriggsySpriggs - 07-10-2023, 06:52 PM - Forum: Spriggsy - Replies (2)

I'm probably not going to reinstate a GitHub for my code but this thread can serve as a place for people to request code that I've written in the past that they are now unable to find. I have an archive of my GitHub on my home PC and will distribute the code as it is requested or, if I feel that the code is good enough, I'll just make a new thread for it and make updates to it there.

Print this item

  Phoenix rising...
Posted by: Dav - 07-09-2023, 10:26 PM - Forum: Programs - Replies (13)

Just a little fun program.  See if the Phoenix rises for you.

- Dav

Code: (Select All)
'===============
'PHOENIXTEST.BAS
'===============
'Are you using QB64 Phoenix, or the Bee?
'Run this code to see...
'Coded by Dav, JUL/2023

_ICON

dh = _DESKTOPHEIGHT * .85
SCREEN _NEWIMAGE(dh, dh, 32)

'safety test...
IF _WIDTH(-11) <> 32 OR _HEIGHT(-11) <> 32 THEN END

bird& = _NEWIMAGE(dh, dh, 32): _DEST bird&
_PUTIMAGE (0, 0)-(dh, dh), -11: _DEST 0

row = 15: col = 15
xsize = _WIDTH / row
ysize = _HEIGHT / col
rise = _HEIGHT

DIM SHARED piece&(row * col), piecex(row * col), piecey(row * col)
DIM risespeed(row * col)

bc = 1
FOR c = 1 TO col
    FOR r = 1 TO row
        x1 = (r * xsize) - xsize: x2 = x1 + xsize
        y1 = (c * ysize) - ysize: y2 = y1 + ysize
        piecex(bc) = x1: piecey(bc) = y1
        piece&(bc) = _NEWIMAGE(ABS(x2 - x1) + 1, ABS(y2 - y1) + 1, 32)
        _PUTIMAGE (0, 0), bird&, piece&(bc), (x1, y1)-(x2, y2)
        risespeed(bc) = RND * 2 + 1
        bc = bc + 1
    NEXT
NEXT

_DEST 0

DO
    LINE (0, 0)-(_WIDTH, _HEIGHT), _RGBA(0, 0, 0, 55), BF

    FOR t = 1 TO row * col
        tx = piecex(t): tx2 = piecex(t) + xsize
        ty = piecey(t): ty2 = piecey(t) + ysize
        RotoZoom3 piecex(t) + (xsize / 2), piecey(t) + (ysize / 2) + (rise * risespeed(t)), piece&(t), 1, 1, 0
        rise = rise - .025
        _LIMIT 3000
    NEXT
    _DISPLAY

LOOP WHILE rise > 0

FOR t = 1 TO row * col
    RotoZoom3 piecex(t) + (xsize / 2), piecey(t) + (ysize / 2), piece&(t), 1, 1, 0
    _DISPLAY
NEXT

SLEEP

SUB RotoZoom3 (X AS LONG, Y AS LONG, Image AS LONG, xScale AS SINGLE, yScale AS SINGLE, radianRotation AS SINGLE)
    DIM px(3) AS SINGLE: DIM py(3) AS SINGLE ' simple arrays for x, y to hold the 4 corners of image
    DIM W&, H&, sinr!, cosr!, i&, x2&, y2& '  variables for image manipulation
    W& = _WIDTH(Image&): H& = _HEIGHT(Image&)
    px(0) = -W& / 2: py(0) = -H& / 2 'left top corner
    px(1) = -W& / 2: py(1) = H& / 2 ' left bottom corner
    px(2) = W& / 2: py(2) = H& / 2 '  right bottom
    px(3) = W& / 2: py(3) = -H& / 2 ' right top
    sinr! = SIN(-radianRotation): cosr! = COS(-radianRotation) ' rotation helpers
    FOR i& = 0 TO 3 ' calc new point locations with rotation and zoom
        x2& = xScale * (px(i&) * cosr! + sinr! * py(i&)) + X: y2& = yScale * (py(i&) * cosr! - px(i&) * sinr!) + Y
        px(i&) = x2&: py(i&) = y2&
    NEXT
    _MAPTRIANGLE _SEAMLESS(0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image TO(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
    _MAPTRIANGLE _SEAMLESS(0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image TO(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
END SUB

Print this item

  TYPE and CONST within SUB/FUNCTION
Posted by: TerryRitchie - 07-09-2023, 07:57 PM - Forum: General Discussion - Replies (9)

A while back I accidentally discovered that CONST can be used in SUBs and FUNCTIONs to create local constants. You can even use the same CONST variable name from the main code to create another unique local constant.

I was wondering if this worked with TYPEs. It appears it does not. While you can create a user defined TYPE within a SUB or FUNCTION it will always be seen globally. Is this correct behavior or should the user defined TYPE be local to the SUB and/or FUNCTION?

If the user defined TYPE is always to be seen globally then is it an oversight in the IDE to allow TYPEs to be created within a SUB or FUNCTION?

Code: (Select All)
OPTION _EXPLICIT

CONST SUB1_CONSTANT = 300 '      global everywhere unless also created within a subroutine
CONST SUB2_CONSTANT = 400

'TYPE Type_SUB1 '                if these lines are enabled an error occurs in SUB1()
'    a AS INTEGER
'    b AS INTEGER
'END TYPE

DIM Sub1_Variable AS Type_SUB1 ' Type_SUB1 is seen globally even though created in SUB1()
DIM Sub2_Variable AS Type_SUB2 ' Type_SUB2 is seen globally as well even though created in SUB2()

PRINT "-----------------"
PRINT "-- IN MAIN CODE -"
PRINT "-----------------"
PRINT "SUB1_CONSTANT  ="; SUB1_CONSTANT
PRINT "SUB2_CONSTANT  ="; SUB2_CONSTANT
PRINT
SUB1
SUB2

'----------------------------------------------------

SUB SUB1 ()

    CONST SUB1_CONSTANT = 100 '      constant is only local to this subroutine now

    TYPE Type_SUB1
        a AS INTEGER
        b AS INTEGER
    END TYPE

    DIM Sub1_Variable AS Type_SUB1 ' completely unique variable from one created at main code level

    PRINT "-----------------"
    PRINT "---- IN SUB1 ----"
    PRINT "-----------------"
    PRINT "SUB1_CONSTANT  ="; SUB1_CONSTANT
    PRINT "SUB2_CONSTANT  ="; SUB2_CONSTANT
    PRINT

END SUB

'----------------------------------------------------

SUB SUB2 ()

    CONST SUB2_CONSTANT = 200 '      constant is only local to this subroutine now

    TYPE Type_SUB2
        a AS INTEGER
        b AS INTEGER
    END TYPE

    DIM Sub2_Variable AS Type_SUB2 ' completely unique variable from one created at main code level

    PRINT "-----------------"
    PRINT "---- IN SUB2 ----"
    PRINT "-----------------"
    PRINT "SUB1_CONSTANT  ="; SUB1_CONSTANT
    PRINT "SUB2_CONSTANT  ="; SUB2_CONSTANT

END SUB

Print this item

Bug D notation bug
Posted by: bplus - 07-09-2023, 05:00 PM - Forum: Repo Discussion - Replies (13)

As reported at the other forum:

Code: (Select All)
Print (1D+17) * (1D+17) ' <<< the buggy one!
Print (1E+17) * (1E+17) ' E gets it right

The D notation is off by 1 power of 10.

Print this item

  Downloading QB64PE
Posted by: david_uwi - 07-09-2023, 02:02 PM - Forum: Help Me! - Replies (10)

I thought it would be a good idea to download the latest version of QB64PE.
Maybe I'm being daft, but I can't find the download link.
Perhaps it could be made a little more transparent for my benefit and any newcomers that could be easily put off.

Print this item

Information Forum Upgraded - MyBB v1.8.34 Installed
Posted by: grymmjack - 07-09-2023, 08:53 AM - Forum: Announcements - Replies (10)

Hello firebeards.

We've upgraded the forum from v1.8.33 to v1.8.34

All the existing modifications should remain, and in our testing it's all the same as before. e.g. qb code, qbjs embed, etc. should all continue to work the same way.

There are loads of fixes that we benefit from for v1.8.34:
https://mybb.com/versions/1.8.34/

Here are all the GitHub Issues resolved in this version:
https://github.com/mybb/mybb/issues?q=is...e%3A1.8.34

Of special note are:


Why are these special notes?
Because I modified the core forum source to apply these fixes myself, or had modified files, etc. Also the mark forum read fixes, I didn't fix at all, but had tried.

Anyway these official fixes are way better than the stuff I did.

Also, I have created a backup of the 1.8.33 including database.

Hopefully everything works out, but as usual if you discover any issues please let us know.

Happy QB64PEing!

~ grymmjack

Print this item

  Calculations Needing Big Integers....
Posted by: Space_Ghost - 07-09-2023, 03:58 AM - Forum: Help Me! - Replies (12)

Does QB64pe have the capability for Big Integers?

Below I pasted python (P3) code that calculates the first 5,000 Fibonacci numbers as shown.  Takes about 1 second.  It automatically uses Big Integers with no adjustment.

Can we do something similar with QB64pe?  I would guess there is at least one or more ways to run a similar calculation.  Thanks in advance !!!

Python Code for Fibonacci Sequence
def fibIter(n):
    if n < 2:
        return n
    fibPrev = 1
    fib = 1
    for _ in range(2, n):
        fibPrev, fib = fib, fib + fibPrev
    return fib

for i in range(0, 5000):
    print(fibIter(i))

This is the 5000th Fibonacci Number (it has 1,045 digits)  I skipped 1 to 4,999.
2397334346100631452333336800023778743396400988090212332865227234032387117767626167465060795065595580850691237390963845987165478074085124644348902530685083246709423858342692329718110162972268152200857232686119638781547238020078362945470777668711057069618425746387920931255084621360135655698456629322111614827324455767748623844363426260372374195153577101298837831208580530677289982029527164306876024342838547454228388796380077029917639469963653048076473269452943584037848773158456736367057460079075603072996653089318046279296240100777360367200040226807430924334616931577257195085793060133817911514540227011756335999604550121968663793604830945238116686325506344893928776515696088851468818023735825546502317562957459506612704850760351077006532507519813600498603205937022956740021970327599548184626715032015801445754074519753924901317605013561516613650173445818028242577356369143977719495739428130191089993769093308407443558168431535751910046557480949313497996285124526992631353143367314930548703966553707195171094152730704138121243470432644848607501

Print this item