Search found 6465 matches

by dodicat
Jul 14, 2020 20:32
Forum: Beginners
Topic: Difference between "Sadd", "StrPtr", "VarPtr", and "Address of"
Replies: 9
Views: 243

Re: Difference between "Sadd", "StrPtr", "VarPtr", and "Address of"

@ is OK for variable length, it is @s[0] dim as string s="abcdefghij" print strptr(s) print @s print @s[0] print dim as string * 10 g="abcdefghij" print strptr(g) print @g print @g[0] print dim as zstring * 10 h="abcdefghij" print strptr(h) print @h print @h[0] print pr...
by dodicat
Jul 14, 2020 18:50
Forum: Beginners
Topic: TSNE problem.
Replies: 9
Views: 225

Re: TSNE problem.

Win 10 One of these methods should work. #include "file.bi" Sub savefile(filename As String,p As String) Dim As Integer n n=Freefile If Open (filename For Binary Access Write As #n)=0 Then Put #n,,p Close Else Print "Unable to save " + filename End If End Sub Function loadfile(fi...
by dodicat
Jul 14, 2020 8:11
Forum: Game Dev
Topic: game dev challenge (paul doe exercise)
Replies: 21
Views: 666

Re: brlapi

Hi! I'm blind and I want develop a game engine for the blind and i choose freebasic for the portability because there's one call blastbay game toolkit(BGT) but it's only for windows I need some help to make a .bi for the libbrlapi from the project brltty to make possibility to control braille displ...
by dodicat
Jul 13, 2020 15:27
Forum: General
Topic: Oh no, not another PRNG
Replies: 67
Views: 1408

Re: Oh no, not another PRNG

This is purely pre processed. #lang "fb" for x as long=1 to 5 next x #ifdef x print "OK",x,__FB_LANG__ #else print "NOT OK",__FB_LANG__ #endif #lang "fblite" sleep With the rnd code, the last call to rnd determines the future method, (not the previous, so not ...
by dodicat
Jul 13, 2020 10:26
Forum: General
Topic: Oh no, not another PRNG
Replies: 67
Views: 1408

Re: Oh no, not another PRNG

Looks like the rnd function is pre processed. I try to capture rnd 1, 5 (Win32 Crypto API, Linux /dev/urandom) by creating a pointer to the function. I know that rnd 5 cannot be re seeded, so I expect the totals to be different, but suddenly my pointer seems to point to the twister without my permis...
by dodicat
Jul 12, 2020 23:36
Forum: Windows
Topic: SOLVED - MPEG2 Play Code and Win10
Replies: 47
Views: 1471

Re: SOLVED - MPEG2 Play Code and Win10

GDI code with video screen size found. Or you can use your own gfx screen (handy for audio files). Write down a path to a file, or if no path then the openfile window shows. #define WIN_INCLUDEALL #include "Windows.bi" #include "win/mmsystem.bi" #Include once "/win/commctrl....
by dodicat
Jul 12, 2020 22:14
Forum: Game Dev
Topic: game dev challenge (paul doe exercise)
Replies: 21
Views: 666

Re: game dev challenge (paul doe exercise)

I quite enjoy trying to code games, but not playing them (especially this) I follow the rules approximately, with only one killer box (red). No globals, but cheated by using two byref functions to simulate two globals. Use the mouse rather than the keyboard, start off with the eater box in the botto...
by dodicat
Jul 10, 2020 12:18
Forum: Tips and Tricks
Topic: Fireworks v0.60 build 2020-07-13 beta
Replies: 14
Views: 1210

Re: Fireworks v0.60 build 2020-07-09 beta

Some Irish examining boards I believe award up to 110 percent.
The extra ten percent is earned if you spell your name correctly at the top.
So more than 10 out of 10 is acceptable.
Thanks UEZ.
by dodicat
Jul 10, 2020 12:10
Forum: General
Topic: Oh no, not another PRNG
Replies: 67
Views: 1408

Re: Oh no, not another PRNG

Dafhi. Make up a pipe file (compile one) Use the command as per deltarho[] or just simply as given below. Pipefile example 'pipefilecrt2.exe 'command >> pipefilecrt2.exe | rng_test stdin32 -multithreaded '====== 'my own generater (skew) '====================== #include "crt.bi" randomize 0...
by dodicat
Jul 09, 2020 20:14
Forum: General
Topic: Crashing on x64 execution
Replies: 8
Views: 209

Re: Crashing on x64 execution

OK here 64 and 32 bit compiler compiling . . . Success ( 0.8300442999461666 seconds) FreeBASIC Compiler - Version 1.07.1 (2019-09-27), built for win64 (64bit) Copyright (C) 2004-2019 The FreeBASIC development team. standalone -gen gcc -Wc -O3 compiling . . . Success ( 0.5713402000255883 seconds) Fre...
by dodicat
Jul 09, 2020 18:53
Forum: General
Topic: Oh no, not another PRNG
Replies: 67
Views: 1408

Re: Oh no, not another PRNG

Thanks for testing srvaldez.
Using deltarho[]'s rnd.
i.e.
#undef Rnd
#define Rnd x128.randD

And still using the skew (log10) generator, it is very fast, about six seconds here for 8 numbers, which beats the c generator (randomize 0,1)
by dodicat
Jul 09, 2020 16:49
Forum: General
Topic: Oh no, not another PRNG
Replies: 67
Views: 1408

Re: Oh no, not another PRNG

I have fixed my tetris so box 1 is always a vertical row. This gives an even start for tests. The random numbers to fill the tetris, if a bit skew, seems to work well. So I start with a simple skew generator.(line 119) I also have deltarho[]'s generator in place, you can test it, just un comment the...
by dodicat
Jul 08, 2020 17:45
Forum: Beginners
Topic: Resizing ImageCreate
Replies: 8
Views: 279

Re: Resizing ImageCreate

Create image in it's own likeness. frames for fun #define pushtop(a) ubound(a)+1 #define poptop(a) ubound(a) #define bottom(a) lbound(a) #macro push(a,index,insert) If (index)>=Lbound(a) And (index)<=Ubound(a)+1 Then Var index2=(index)-Lbound(a) Redim Preserve a(Lbound(a) To Ubound(a)+1) For x As Lo...
by dodicat
Jul 06, 2020 10:22
Forum: Windows
Topic: SOLVED - MPEG2 Play Code and Win10
Replies: 47
Views: 1471

Re: SOLVED - MPEG2 Play Code and Win10

The mciSendString topic is huge, it must have taken many Microsoft coders a while to perfect it, I daresay they continually update it. When you think that most windows computer users are not in the least bit interested in coding, rather a great deal of interest in photos, movies, online TV, e.t.c. t...
by dodicat
Jul 06, 2020 8:51
Forum: General
Topic: Squares
Replies: 7926
Views: 496032

Re: Squares

Albert has contributed to this forum in many ways, for a long time. For instance has made the fastest big number multiplier, he has made a parser, he has made games in opengl, he has extensively used win api and solved a few problems with his code with little help. He never brags about his work. He ...

Go to advanced search