Search found 2577 matches

by badidea
Apr 22, 2022 0:14
Forum: General
Topic: __FB_VERSION__
Replies: 2
Views: 368

Re: __FB_VERSION__

"1" instead of "!" in "!.10.0" ?
by badidea
Apr 10, 2022 13:16
Forum: Beginners
Topic: Grid Transfer
Replies: 8
Views: 1094

Re: Grid Transfer

I thought that 'window9' is a GUI library for windows & linux. But this code is for windows only?
by badidea
Apr 10, 2022 11:27
Forum: General
Topic: Communicate with other program (solved)
Replies: 12
Views: 1335

Re: Communicate with other program (solved)

Here is an overview of various Inter-process communication methods on Wikipedia: https://en.wikipedia.org/wiki/Inter-pro ... munication
Of course, some are easier to implement (in freebasic) than others.
by badidea
Apr 10, 2022 0:42
Forum: Sources, Examples, Tips and Tricks
Topic: Metaballs: blobs of goo
Replies: 8
Views: 2259

Re: Metaballs: blobs of goo

I know what you want - not "fake" meta balls but real calculated ones. :wink: Actually, I do not know what metaballs are. Wikipedia says: "metaballs are organic-looking n-dimensional isosurfaces, characterised by their ability to meld together when in close proximity to create single...
by badidea
Apr 07, 2022 22:34
Forum: Sources, Examples, Tips and Tricks
Topic: Metaballs: blobs of goo
Replies: 8
Views: 2259

Re: Metaballs: blobs of goo

It think I fixed it. If you keep a button pressed, then at loopCount 260 a ball (bottom-right) starts separating. The smaller dots are the grid centers. When white, then part of the blob. Note: I changed and '<' to '>'. Same result, but now positive logic, easier for my mind. const N_BALL = 20 Dim s...
by badidea
Apr 06, 2022 23:38
Forum: Sources, Examples, Tips and Tricks
Topic: Metaballs: blobs of goo
Replies: 8
Views: 2259

Re: Metaballs: blobs of goo

A bit dusty code, but exactly what I was looking for (marching squares). There is however a bug in it as can be better seen it this slightly modified version: const N_BALL = 20 Dim shared metaballX(1 to N_BALL) as integer Dim shared metaballY(1 to N_BALL) as integer 'randomize timer randomize 27 scr...
by badidea
Apr 05, 2022 21:59
Forum: Sources, Examples, Tips and Tricks
Topic: Gaussian 'blob' animation
Replies: 1
Views: 692

Gaussian 'blob' animation

Just for fun. Two 2d-Gaussian surfaces moving around. #define dbl double const SW = 800, SH = 600 type dbl3d as dbl x, y, z end type sub pset3d(p3d as dbl3d, c as ulong) dim as integer x, y x = SW \ 2 + p3d.x + p3d.y / 2 y = SH * (3 / 4) - (p3d.z + p3d.y / 2) pset (x, y), c end sub 'https://en.wikip...
by badidea
Mar 31, 2022 19:20
Forum: Beginners
Topic: Project suddenly won't compile
Replies: 7
Views: 993

Re: Project suddenly won't compile

First error message that is see in your post is: Now compiling shared\filehandling\setup.bas Settings Loader(2) error 61: Illegal inside functions in 'sub loadsetup()' The code in setup.bas: dim file as ubyte sub loadsetup() print "Loading..." file = openfdf("settings") end sub T...
by badidea
Mar 29, 2022 19:47
Forum: Hardware Interfaces / Communication
Topic: IP Address
Replies: 10
Views: 9028

Re: IP Address

I do not know what you mean with 'simple GUI alternative', but here is a partial translation of https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersinfo: #include once "win/winsock2.bi" #include once "win/iphlpapi.bi" dim as PIP_ADAPTER_INFO pAdapte...
by badidea
Mar 26, 2022 23:52
Forum: Sources, Examples, Tips and Tricks
Topic: simple, dirty huffman coding example
Replies: 2
Views: 2308

Re: simple, dirty huffman coding example

Code from 'Mindless' above updated for fbc 1.09.0 32/64-bit linux/windows ' huffman compressor - decompressor For FreeBasic ' to compress huffman c myfile.txt myfile.huf ' to decompress huffman d myfile.huf myfile.txt ' updated for fbc 1.09.0 32/64-bit linux/windows '----------------------------- si...
by badidea
Mar 26, 2022 13:06
Forum: General
Topic: Compression
Replies: 14
Views: 1627

Re: Compression

badidea Old FreeBasic code from 2006. Do you think this could ever be made to work on 64 bit PC's ? I am pretty sure that code does not work on any PC (32/64, Windows/Linx) with the current compiler. One of the issues is that: function save_tree (byval node_given as node_t ptr, bt_data as ubyte ptr...
by badidea
Mar 26, 2022 0:49
Forum: General
Topic: Compression
Replies: 14
Views: 1627

Re: Compression

Someone just Emailed me a Huffman Compressor - Decompressor for FreeBasic. The code was also posted here in 2006: https://freebasic.net/forum/viewtopic.php?p=40618 Things seem to go wrong already at the compression step, at bt.save_tree(b, tdata). When I print the data in tdata, it contains many ze...
by badidea
Mar 25, 2022 9:16
Forum: General
Topic: Compression
Replies: 14
Views: 1627

Re: Compression

I know, I tried a bit yesterday; found 2 bugs, but not yet working here either...
by badidea
Mar 25, 2022 9:14
Forum: General
Topic: Topic locked?
Replies: 34
Views: 2486

Re: Topic locked?

If there are no data compression limits, then why do you stop at 90%? Continue until you have 1 bit left.
by badidea
Mar 25, 2022 0:40
Forum: General
Topic: Topic locked?
Replies: 34
Views: 2486

Re: Topic locked?

If you still think that the universe can be compressed to a single bit, then that must be prove that only one universe exists.