Search found 249 matches

by frisian
Sep 24, 2014 19:08
Forum: General
Topic: RAY CASTING
Replies: 24
Views: 2566

Re: RAY CASTING

bluatigro For shadow you need to check for objects that are between the point that is hit by the view ray and the light source. The code is similar to the code for checking if a sphere is hit by a view ray. If there's a object between that point and the light source the color of the sphere need to b...
by frisian
Sep 24, 2014 18:34
Forum: General
Topic: Windoze 3.0 Advice
Replies: 12
Views: 1448

Re: Windoze 3.0 Advice

A quick and dirty way to get win3.bas compiled. Add #lang "fblite" before defint a-z Change the line static shared internalfont (0 to 318) as short => { ..... into static shared internalfont (0 to 318) as short : data .... Remove the curly bracket at the end of the data block ( } ). Insert...
by frisian
Sep 23, 2014 18:46
Forum: General
Topic: RAY CASTING
Replies: 24
Views: 2566

Re: RAY CASTING

bluatigro A little lesson in finding a errors. The error is one which I have seen is one you made before. But let me try to help you how to find errors in your program. If you change the black background color into white what will happen. Thus pset( winx/2 + x , winy/2 - y ) ,0 into pset( winx/2 + x...
by frisian
Sep 14, 2014 15:25
Forum: General
Topic: RAY CASTING
Replies: 24
Views: 2566

Re: RAY CASTING

update : - try at shading error : - i get only 1 sphere whit a color background - i dont get shading To make the spheres visible replace Function tsphere.hit and Function winner_index with these two new routines. Function tsphere.hit( ray As tray ) As Double Dim As t3d o , d , s o = ray.origin d = ...
by frisian
Aug 19, 2014 9:53
Forum: Projects
Topic: FBMath Update
Replies: 18
Views: 3591

Re: FBMath Update

Hello! I have compilation errors with the largint demos: C:\FreeBASIC\fbmath\demo\largeint\bench.o:fake:(.text+0x56): undefined reference to `LargeInit@8' C:\FreeBASIC\fbmath\demo\largeint\bench.o:fake:(.text+0xef): undefined reference to `Prints@8' C:\FreeBASIC\fbmath\demo\largeint\bench.o:fake:(....
by frisian
Jun 20, 2014 21:11
Forum: Beginners
Topic: Perlin Noise Problem
Replies: 7
Views: 1281

Re: Perlin Noise Problem

Here a somewhat cleaned up and faster version of Thorbenn perlin noise program. 'defining how big our Window will be #Define screenX 640 #Define screenY 480 Dim Shared As Integer mapX = screenX - 1 Dim Shared As Integer mapY = ScreenY - 1 Dim Shared As Single smoothNoises() Dim Shared As Single nois...
by frisian
Jun 17, 2014 12:36
Forum: Beginners
Topic: Perlin Noise Problem
Replies: 7
Views: 1281

Re: Perlin Noise Problem

Thorbenn In FB the result of x1 = (i / Period) * Period is equal to i the calculation is not stored in between calculations, to get the result you want add INT to floor the division. x1 = (i / Period) * Period ==> x1 =INT (i / Period) * Period y1 = (j / Period)*Period ==> y1 = INT(j / Period)*Period...
by frisian
May 13, 2014 21:23
Forum: General
Topic: ray casting
Replies: 3
Views: 553

Re: ray casting

bluatigro You dusted of your old ray casting program, you have probely mist my last posting in http://www.freebasic.net/forum/posting.php?mode=reply&f=3&t=22506 . (at the bottom) I have incorporated my version of the function ray named ray_new and altered the program a bit, give it a try. Th...
by frisian
Apr 28, 2014 19:29
Forum: Projects
Topic: Chess game
Replies: 50
Views: 10505

Re: Chess game

It's not as simple as the original problem with lower/upper case characters and it doesn't seem to be a problem with movegen function as latest version is perfect on perft for the following position as far as i tested it (to d = 7) 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1 I'm wondering if it is related to...
by frisian
Apr 23, 2014 18:31
Forum: Projects
Topic: Chess game
Replies: 50
Views: 10505

Re: Chess game

Here is a newer version of Nomega (work in progress). Will compile with GCC. Changed the test for castling, the simple test are done first then the more complicated test like incheck and attack. If the simple tests trigger a break off the slower test aren't executed resulting in a small speedup. Inc...
by frisian
Apr 21, 2014 20:11
Forum: Projects
Topic: Chess game
Replies: 50
Views: 10505

Re: Chess game

Some tournament results with Nomega compiled with GCC -O max and good old Numpty_DD. 100 games 40 moves / 5 min (repeating) Nomega 55 wins and Numpty_DD 24 wins and 21 games ended in a draw. 400 games 60 moves / 1 min (repeating) Nomega 232 wins and Numpty_DD 86 wins and 82 draws. In general the mos...
by frisian
Apr 21, 2014 19:28
Forum: Community Discussion
Topic: 1 Billion digit prime
Replies: 49
Views: 5750

Re: 1 Billion digit prime

As of January 2014, the largest known prime number is 257,885,161 − 1,[1] a number with 17,425,170 digits. http://en.wikipedia.org/wiki/Largest_known_prime_number That should be 2^257,885,161 − 1 Hi frisian, I'm home now and anxious to test your code. If possible can you help walk me through the in...
by frisian
Apr 14, 2014 19:26
Forum: Projects
Topic: Chess game
Replies: 50
Views: 10505

Re: Chess game

I have run a tournament with Nomega (GCC compiled) against Numpty_DD. Needless to say the Numpty_DD lost most of the time. I had 1 forfeit on time by Nomega, I was able to find out that it was caused by the following code in computer_move. if fmove(depth) = 100 then 'score = if 50 move rule is tripp...
by frisian
Apr 08, 2014 18:57
Forum: Projects
Topic: Chess game
Replies: 50
Views: 10505

Re: Chess game

I got a GCC compiled version running under Arena. In CommandLoop remove (or comment out) the following line SendCommand ("feature done=1") Ok Nomega would work but as it dropped out of the opening book (after 3 moves) it would again stop working. Freebasic is not very strict about array bo...
by frisian
Apr 08, 2014 18:09
Forum: Community Discussion
Topic: 1 Billion digit prime
Replies: 49
Views: 5750

Re: 1 Billion digit prime

There is the possibility that the result is incorrect but I have tested the method with smaller numbers that GMP/MPIR could multiply. The result where equal therefore the method used should give a correct answer. But only a straight forward multiply will give a answer on the question of result is th...

Go to advanced search