Search found 7780 matches

by D.J.Peters
Oct 25, 2020 22:03
Forum: Documentation
Topic: WINDOWTITLE()
Replies: 10
Views: 170

Re: WINDOWTITLE()

On the WindowTitle() page I would add a two more links !

See also:
ScreenControl(SET_WINDOW_TITLE, title)
ScreenControl(GET_WINDOW_TITLE)
Screen (Graphics)
Screenres

Joshy
by D.J.Peters
Oct 25, 2020 21:56
Forum: Community Discussion
Topic: [solved] Simple math question ?
Replies: 7
Views: 238

Re: [solved] Simple math question ?

Here are the real problem I have here . The tokamak C++ physics lib used: maxOverlappingPairs = ( nCollisionShapes * (nCollisionShapes-1) )/2 let say you have 100 cubes how many pairs of cubes exist they can collide ? 100*100 is wrong becouse the 100 cubes can't collide with it's self: x = (100*(100...
by D.J.Peters
Oct 25, 2020 21:31
Forum: Tips and Tricks
Topic: The missing DEC(uinteger, digits) function.
Replies: 1
Views: 36

The missing DEC(uinteger, digits) function.

For my FreeBASIC remote controlled Retro 32 Channel Logic Analyzer I used OCT(), HEX(), BIN() and needed the missing DEC() function also. Joshy function Dec(byval number as uinteger, byval nDigits as uinteger=0) as string var ret = str(number) if nDigits>0 then var Digits = len(ret) if Digits<nDigit...
by D.J.Peters
Oct 23, 2020 14:52
Forum: Community Discussion
Topic: [solved] Simple math question ?
Replies: 7
Views: 238

Re: [solved] Simple math question ?

This works for me thank you all for the hints. Joshy function fx(n as integer) as integer if n<2 then return 0 return (n*(n-1))*0.5 end function function fn(x as integer) as integer dim as integer n = sqr(x*2)+1 dim as integer y = fx(n) if y<=x then return n return n-1 end function dim as integer n ...
by D.J.Peters
Oct 23, 2020 14:14
Forum: Community Discussion
Topic: [solved] Simple math question ?
Replies: 7
Views: 238

Re: Simple math question ?

n as integer it's sqr(x*2) ! Joshy dim as integer n = 100 dim as integer x = n*(n-1)*0.5 print "n: " & n & " x: " & x print x = 20000000 n = sqr(x*2) dim as integer y = n*(n-1)*0.5 print "n: " & n & " of x: " & x & " ~: " ...
by D.J.Peters
Oct 23, 2020 13:37
Forum: Community Discussion
Topic: [solved] Simple math question ?
Replies: 7
Views: 238

[solved] Simple math question ?

dim as integer n = 100 ' any number > 0
dim as integer x = (n * (n - 1) ) / 2

if x is 20_000_000 what was n ? (note: integer not floating point)

if it was x=(n*n)*0.5 then n = sqr(x*2)
but (n*(n-1))*0.5 makes me confuse ATM :-)

Joshy
by D.J.Peters
Oct 22, 2020 14:36
Forum: Libraries
Topic: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)
Replies: 10
Views: 269

Re: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)

added: new example to play with in second post.
(Using the y-axes of a hinge joint as motor.)

Joshy
by D.J.Peters
Oct 22, 2020 14:27
Forum: Libraries
Topic: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)
Replies: 10
Views: 269

Re: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)

VANYA wrote:All examples are working now. Thanks!
Cool now i'm safe to use tokamak lib in my game :-)

Joshy
by D.J.Peters
Oct 22, 2020 13:21
Forum: Documentation
Topic: Basic-Macros in fbc 1.08
Replies: 38
Views: 1732

Re: Basic-Macros in fbc 1.08

I know what you try (using loop counter in macro) but that make no sense at all. If all class members are the same (and in a macro loop it would be the same) type X0 declare sameA ... as sameB ... end type type X1 declare sameA ... as sameB ... end type type X2 declare sameA ... as sameB ... end typ...
by D.J.Peters
Oct 22, 2020 13:09
Forum: Linux
Topic: ScreenInfo returns the wrong refresh rate
Replies: 2
Views: 56

Re: ScreenInfo returns the wrong refresh rate

If wine reports 144 Hz (the emulation ask's the monitor)
it does not mean the Xorg desktop are running with 144 Hz !

What shows your desktop settings ?
In my case I have NVIDEA desktop settings and it reports 60Hz.

Joshy
by D.J.Peters
Oct 22, 2020 12:56
Forum: Libraries
Topic: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)
Replies: 10
Views: 269

Re: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)

Ok I fixed the typo download and try again and test all examples please.
(The tokamak-c lib is the same I fixed only the *.bas files)

Thank you.

Joshy
by D.J.Peters
Oct 22, 2020 12:41
Forum: Linux
Topic: Why -dylib works without "-pic" Linux 64-bit ?
Replies: 1
Views: 167

Why -dylib works without "-pic" Linux 64-bit ?

If I compile dynamic C/C++ Linux 64-bit libraries for FreeBASIC I must use "-fPIC" !

Why does it works without fbc "-pic" if I compile dynamic fbsound libraries for Linux 64-bit ?

Joshy
by D.J.Peters
Oct 22, 2020 12:23
Forum: Libraries
Topic: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)
Replies: 10
Views: 269

Re: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)

VANYA wrote:Some examples require renderer.bi file. All other examples work.
Thank you for testing
Roland Chastain wrote:Same for me Thank you for your help about library installation.
No problem and thank you for testing.
By the way this is a good example and shows how comfortable fbsound-1.2 is.
No need to install any library :-)

Joshy
by D.J.Peters
Oct 21, 2020 22:31
Forum: Libraries
Topic: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)
Replies: 10
Views: 269

Re: Tokamak physics SDK V1.2 (Windows/Linux 32/64-bi)

@Roland yes on linux libs must be found by the linker you can show where the linker will look for: echo LD_LIBRARY_PATH or echo $LD_LIBRARY_PATH on many linux distros /usr/lib or /usr/local/lib ... if you know the path copy or move as root the lib to the lib folder cd tokamak-1.2-c sudo cp libtokama...

Go to advanced search