Search found 347 matches

by Provoni
May 11, 2014 9:55
Forum: Beginners
Topic: Questions about variable types
Replies: 4
Views: 665

Questions about variable types

Hey all, On my 64-bit Windows 8 machine the integer variable type in FreeBASIC is only 32-bit, is that normal? When I test the speed of mathematical operations on integer versus longint I notice integers almost being 6 times faster than longints on multiplication. I wonder where the major difference...
by Provoni
Feb 26, 2014 23:06
Forum: General
Topic: ASM/Cuda with FreeBASIC?
Replies: 5
Views: 806

Re: ASM/Cuda with FreeBASIC?

Thanks gothon, that's a very informative post. I learned a bit of QBasic as a kid, 4 years ago I discovered QB64 and this year I started with FreeBASIC. I'm really in love with FreeBASIC and with the help of the forum I learned how to multi-thread my programs! I have written about 10000 lines of cod...
by Provoni
Feb 26, 2014 22:09
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 28315

Re: Threading questions/problems

D.J.Peters and fxm, you'll have to excuse me because I asked a stupid question. Somehow I didn't pop up in my mind that I could just create a local version of my array in each thread. I have some questions about your example fxm, First of all, thanks for making me aware of with-end with, I can reall...
by Provoni
Feb 26, 2014 10:25
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 28315

Re: Threading questions/problems

Hey all, Another question, I have a shared array(x,y) to which I need full access in every thread. Is it possible to create a copy, or an exclusive temporary of that array for each thread? Or will I have to add another dimension, array(threads,x,y)? Or do I need to use pointers to achieve this? Thanks
by Provoni
Feb 26, 2014 9:17
Forum: General
Topic: ASM/Cuda with FreeBASIC?
Replies: 5
Views: 806

Re: ASM/Cuda with FreeBASIC?

Thanks for the links gothon, Before I even start with this I need to get a feel of what I'm getting into, will it be worth my time and is it achievable with my current level of understanding and is it possible within FreeBASIC? That's why I started this thread. So I noticed you have OpenCL and Cuda,...
by Provoni
Feb 25, 2014 21:35
Forum: General
Topic: ASM/Cuda with FreeBASIC?
Replies: 5
Views: 806

ASM/Cuda with FreeBASIC?

Hey all, I want to learn ASM, especially for use with FreeBASIC. In short, I don't know where to start but I have allot of time on my hands. Is it something FreeBASIC will continue to support? I understand there are different versions of ASM? Any book recommendations? Can it be used with threading? ...
by Provoni
Feb 24, 2014 21:43
Forum: Tips and Tricks
Topic: Show only prime factors
Replies: 9
Views: 1311

Re: Show only prime factors

Thanks dodicat!
by Provoni
Feb 23, 2014 22:39
Forum: Tips and Tricks
Topic: Show only prime factors
Replies: 9
Views: 1311

Re: Show only prime factors

dodicat I love your version. I'm glad you posted it, but for the love of god I don't understand what's going on with my current understanding of programming. Is it possible you could comment (for beginners) the getprimefactors SUB? Function getprimefactors(number As Ulongint,p() As Ulongint) As Inte...
by Provoni
Feb 23, 2014 17:23
Forum: Tips and Tricks
Topic: Show only prime factors
Replies: 9
Views: 1311

Re: Show only prime factors

Hey lrcvs, I wanted to share my version with you. I hope you don't mind! dim as longint n dim as integer i=2 do input "enter integer to factor"; n loop until n>0 do if n mod i=0 then n=n\i print i; else if i=2 then i=3 else i=i+2 end if end if loop until i>sqr(n) if n>1 then print n else p...
by Provoni
Feb 17, 2014 15:59
Forum: Game Dev
Topic: Game question
Replies: 11
Views: 3034

Re: Game question

Hey rdc,

Yeah, that's actually how I'm doing it right now. I was just wondering if this was the right way... considering I'm gonna have allot of units etc on my screen.

Thanks
by Provoni
Feb 16, 2014 17:17
Forum: Game Dev
Topic: Game question
Replies: 11
Views: 3034

Game question

Hey all, I'm considering to make a game a la Starcraft, Warcraft I,II. Let's say I have a map 1000 by 1000 and the screen displays a 120 by 80 or so and I have lots of units and structures on the map. Do I redraw the map (by adjusting the map coordinates) every time I move the screen? How is this ac...
by Provoni
Feb 07, 2014 15:27
Forum: General
Topic: Multithread Parameter Passing
Replies: 21
Views: 3685

Re: Multithread Parameter Passing

Intel i7 930 @ 3.5Ghz (Quad core + HT): Number of threads Total execution time Execution time per job 0 (1 main instead) 0.2411586 0.2411586 1 0.2395322 0.2395322 2 0.2464726 0.1232363 3 0.2388591 0.07961971 4 0.290635 0.07265875 5 0.3490039 0.06980078 6 0.3822908 0.06371514 7 0.4027184 0.0575312 8 ...
by Provoni
Feb 03, 2014 9:01
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 28315

Re: Threading questions/problems

Hey fxm, Thanks for your remarks, I made the mutex global now. I experimented with your using of sleep in my program, it works fine until my program draws slower - due to heavy workload - than the sleep induced framerate. I'm going to work around the problem for now, I'll start by moving all possibl...
by Provoni
Feb 02, 2014 14:11
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 28315

Re: Threading questions/problems

Hey dkl, thanks for letting me know.
by Provoni
Feb 02, 2014 10:37
Forum: Beginners
Topic: Threading questions/problems
Replies: 80
Views: 28315

Re: Threading questions/problems

This code shows the problem. Some threads just ignore screenlock, as well as random lockups. declare sub MYTHREAD(byval hey as any ptr) dim shared as integer threads=4 'number of threads dim shared as byte inc dim as any ptr thread(threads) dim as longint i,j screenres 600,600,32 color rgb(200,200,2...

Go to advanced search