Search found 2980 matches

by vdecampo
Aug 09, 2016 16:56
Forum: Tips and Tricks
Topic: 32bit Random Color Macro
Replies: 10
Views: 874

Re: 32bit Random Color Macro

Doesn't this work?

Code: Select all

Randomize
Dim As UInteger rclr = &hFFFFFF*Rnd


-Vince
by vdecampo
Aug 09, 2016 13:44
Forum: General
Topic: Can not get a double buffering working well with thread (solved)
Replies: 43
Views: 1926

Re: Can not get a double buffering (flip screen) working well with a thread

This has been discussed numerous times on the forum. FBGFX is not thread safe and all calls to it (as well as Image manipulation) should occur on the main thread.

-Vince
by vdecampo
Aug 08, 2016 12:41
Forum: Tips and Tricks
Topic: 'dirExists' function ;)
Replies: 7
Views: 1170

Re: 'dirExists' function ;)

Why not just...

Code: Select all

#Include "dir.bi"

Function DirExists(path As String) As Integer
   Return Dir(path,fbDirectory) <> ""
End Function


Returns TRUE or FALSE

-Vince
by vdecampo
Jul 04, 2016 13:41
Forum: General
Topic: Freebasic on the arduino, could it be done ?
Replies: 5
Views: 743

Re: Freebasic on the arduino, could it be done ?

Arduino uses AVR not ARM. There is already a port of FreeBASIC for ARM. You'll have to search the forum for the exact posting.

-Vince
by vdecampo
Jun 17, 2016 13:22
Forum: Beginners
Topic: recursive function
Replies: 21
Views: 1309

Re: recursive function

Is this just a proof of concept? This function has incredible overhead which makes it very slow. Each recursive call has to push/pop the stack. For long strings this would seem to not be an optimal solution.

IMO
-Vince
by vdecampo
Jun 10, 2016 18:23
Forum: General
Topic: Guidance required on following problem
Replies: 7
Views: 458

Re: Guidance required on following problem

Add this to the structure layout...

Code: Select all

<StructLayout(LayoutKind.Explicit, Pack:=1)>
Structure.....
...
...
End Structure


-Vince
by vdecampo
Jun 09, 2016 15:23
Forum: General
Topic: ERROR IN STATIC BOOLEAN VARIABLES
Replies: 7
Views: 710

Re: ERROR IN STATIC BOOLEAN VARIABLES

The docs say this However, the purpose and intent of the boolean data type remains, that it should only ever hold a True value or False value, regardless of the underlying details. so ideally the coercion of -1 to boolean TRUE should either cast -1 to +1 or produce a type mismatch error. IMO -Vince
by vdecampo
Jun 05, 2016 12:55
Forum: Beginners
Topic: Gah! This error is stupid!
Replies: 28
Views: 1800

Re: Gah! This error is stupid!

You need to set a screen resolution before calling ImageCreate.

-Vince
by vdecampo
Jun 05, 2016 12:51
Forum: Beginners
Topic: Questions about DIM and REDIM
Replies: 16
Views: 770

Re: Questions about DIM and REDIM

Are you getting a runtime error? What do you mean "fall over other data"? Do you mean a segfault? Have you tried compiling with the -exx to help debugging? It would be helpful to know exactly what problem you are seeing. As for your questions...Dim and ReDim both initialize your data to ze...
by vdecampo
Jun 04, 2016 14:30
Forum: General
Topic: Moving a graphical window.
Replies: 9
Views: 438

Re: Moving a graphical window.

Code: Select all

#Include "fbgfx.bi"

ScreenRes 800,600,32

For x As Integer = 0 To 800
   ScreenControl(FB.SET_WINDOW_POS, x,0)
   Sleep 1
Next



Enjoy
-Vince
by vdecampo
Jun 03, 2016 16:56
Forum: General
Topic: OOP or not OOP... That's the question! XD
Replies: 21
Views: 1647

Re: OOP or not OOP... That's the question! XD

Just adding my .02 dollars to this discussion.... I use OOP almost exclusively. There are exceptions, but the main reasons I prefer OOP are.... 1. Scaleability - It is much easier to scale a solution when OOP was already implemented. 2. Debugging - It is much easier to isolate bugs when code is divi...
by vdecampo
May 09, 2016 14:39
Forum: Documentation
Topic: Windows API Documentation (FOR FREEBASIC!)
Replies: 25
Views: 3281

Re: Windows API Documentation (FOR FREEBASIC!)

int is defined as a signed integer and is 32 bits.

-Vince
by vdecampo
Apr 30, 2016 12:17
Forum: Libraries
Topic: fbsound 1.0 Win/Lin 32/64-bit (wav mp3 ogg mod it xm s3m)
Replies: 240
Views: 59960

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

D.J.Peters wrote:
D.J.Peters wrote:Sorry I stopped the development of FBSound, it's dead.


That is a shame. I really liked it.
Have you considered releasing the source code?

-Vince
by vdecampo
Apr 29, 2016 22:20
Forum: Libraries
Topic: fbsound 1.0 Win/Lin 32/64-bit (wav mp3 ogg mod it xm s3m)
Replies: 240
Views: 59960

Re: fbSound for Linux x86 Win32 (wav mp3 ogg mod it xm s3m)

I downloaded this version but I can't get it to work with the latest FB version. Errors from linker. Have you tried it?

See thread @...

viewtopic.php?f=8&t=24634

-Vince
by vdecampo
Apr 28, 2016 1:09
Forum: Game Dev
Topic: Thoughts on writing games with FreeBasic
Replies: 38
Views: 5033

Re: Thoughts on writing games with FreeBASIC

I disagree. I believe FB is just as good as any other language for making a game. Actually it is perhaps simpler since it has many built in graphics functions.

Just my opinion.
-Vince

Go to advanced search