Search found 1220 matches

by dafhi
Oct 24, 2018 1:29
Forum: General
Topic: Bernard Widynski's Middle Square Weyl Sequence RNG (MsWs)
Replies: 106
Views: 2413

Re: Bernard Widynski's Middle Square Weyl Sequence RNG (MsWs)

thanks for sharing the framework

Knuth LCG experiment

Code: Select all

  state = mul * (state shr 9) + add

my "CSG_ii"

Code: Select all

    a += 1 - (state = 0)
  state = (mul * (state shl 52 or state shr 12) + add) xor a
by dafhi
Oct 23, 2018 17:10
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated January 22, 2019)
Replies: 483
Views: 46565

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated October 7, 2018)

when i hit ctrl-R and press tab, hi-lighted source gets replaced (by a tab)

expected: move to the 'replace with' field
by dafhi
Oct 22, 2018 3:43
Forum: Community Discussion
Topic: my best effort
Replies: 123
Views: 5219

Re: my best effort

here's a quick thing you can look at type tType as string s = "-" declare constructor(as string = "") end type constructor tType(i as string) if i = "" then exit constructor s = i end constructor sub test_byref(byref t as tType) t.s = "ByRef" end sub sub test_...
by dafhi
Oct 22, 2018 0:33
Forum: Projects
Topic: monte-carlo weights
Replies: 1
Views: 637

Re: monte-carlo weights

short animation https://www.youtube.com/watch?v=BkOm0KFjie4 /' code smashed together for a quick .. ----- test scene ------ '/ #include "rand.bas" #undef rnd #define rnd csg_ii #include "pathtracer.bas" '' https://www.freebasic.net/forum/viewtopic.php?f=14&t=18491 #include &q...
by dafhi
Oct 21, 2018 0:22
Forum: Projects
Topic: Gameboy emulator written in FreeBasic
Replies: 15
Views: 1009

Re: Gameboy emulator written in FreeBasic

could u b more specific?
by dafhi
Oct 13, 2018 22:09
Forum: General
Topic: How to make glitter paint
Replies: 10
Views: 329

Re: How to make glitter paint

rnd * range - .5 + bas will give a balanced distrib. I shoulda used those instead. You can mod if u want. Otherwise i'll make the change tomm.

- updated
by dafhi
Oct 13, 2018 21:25
Forum: General
Topic: How to make glitter paint
Replies: 10
Views: 329

Re: How to make glitter paint

how about something like type ByteRange declare operator cast as ubyte declare operator cast as string as integer bas = 0 as integer range = 256 end type operator ByteRange.cast as ubyte return rnd * range - .5 + bas end operator operator ByteRange.cast as string return str(cubyte(this)) end operato...
by dafhi
Oct 13, 2018 20:22
Forum: General
Topic: How to make glitter paint
Replies: 10
Views: 329

Re: How to make glitter paint

I assumed you were attempting a paint program which uh .. then would create an animated .. yeah i guess .gif would be the end result.

It's an easy enough scenario and interesting, who knows I might have a crack at it
by dafhi
Oct 13, 2018 12:57
Forum: General
Topic: How to make glitter paint
Replies: 10
Views: 329

Re: How to make glitter paint

I would make a buffer of pointers as big as your image

1. each pointer 'pixel' refers to the address of an actual pixel, or the address of a palette color
2. the palette can have individual cycles.

this guy gives a great talk .. https://www.youtube.com/watch?v=aMcJ1Jvtef0
by dafhi
Oct 08, 2018 7:13
Forum: Community Discussion
Topic: Would anyone find a FreeBASIC vs JavaScript side-by-side series useful (+is it allowed here)?
Replies: 24
Views: 1232

Re: Would anyone find a FreeBASIC vs JavaScript side-by-side series useful (+is it allowed here)?

What I like about Pritchard's idea is the fact that he offered to serve up something relevant, and of interest
by dafhi
Oct 08, 2018 4:32
Forum: Game Dev
Topic: 3D polygon world render
Replies: 12
Views: 1203

Re: 3D polygon world render

thanks for sharing :-)
by dafhi
Oct 08, 2018 3:51
Forum: Community Discussion
Topic: Would anyone find a FreeBASIC vs JavaScript side-by-side series useful (+is it allowed here)?
Replies: 24
Views: 1232

Re: Would anyone find a FreeBASIC vs JavaScript side-by-side series useful (+is it allowed here)?

JavaScript had been on my mind before your initial post .. i would enjoy a 'comparison' of sorts :-)
by dafhi
Oct 08, 2018 1:46
Forum: General
Topic: How to make a trangle wave U = f(t)
Replies: 8
Views: 471

Re: How to make a trangle wave U = f(t)

Code: Select all

function U_triangle2(i as double, period as single= 4) as single
    i = i / period
    return (abs(i - floor(i)-.5)-.25)*4.0
end function

times

Code: Select all

  gcc -O 3

U_sawt      .244
tri_wave    .0094
U_triangle  .0397
U_triangle2 .0079
by dafhi
Oct 08, 2018 0:29
Forum: Projects
Topic: 3D Playground
Replies: 26
Views: 1765

Re: 3D Playground

I'll adopt S.O.L.I.D. and anything else you can throw at me once my brain decides to flip on. I love these amazing concepts you present

Go to advanced search