Dark Bit Factory & Gravity

PROGRAMMING => Freebasic => Topic started by: hellfire on September 04, 2008

Title: source of "Wire" (from the reduced resolution challenge)
Post by: hellfire on September 04, 2008
Hi pals,

I fiddled a bit with FreeBasic today and converted my entry (http://dbfinteractive.com/forum/index.php?topic=3387.0) from the reduced resolution challenge (original C++ source can be found here (http://dbfinteractive.com/forum/index.php?topic=3470.0)).
There's nothing very special about it, but maybe someone want's to have a look...
I didn't touch basic for almost 20 years, so please don't mind if there are (and there most probably are) some mayor mistakes included ;)
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Rbz on September 04, 2008
Great!

Works fine here, very nice of you converting all this code in freebasic and so fast, have some karma++
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Voltage on September 04, 2008
This is the gift that just keeps on giving.  Karma up.

The source looks good, although I'd use ' for comments, as opposed to rem (rem is a bit old school). I use FBEdit as my FB IDE and it doesn't colour code comment lines when rem is used, but it does when ' is used.

Thanks for taking the time to convert these libs.

How did you find using the language BTW?
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: gooner on September 04, 2008
Thanks Hellfire k++ for that mate :)
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Xalthorn on September 04, 2008
Very generous and very tidy, karma coming your way :D
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: hellfire on September 04, 2008
There are some minor mistakes in the source originating from copy&paste - for the moment I leave it as an excercise for the reader to find them ;)
(and fix them later when i find some time)

Quote
How did you find using the language BTW?
Well, you know: You like those things most you're used to and comfortable with, but FreeBasic really works quite well and I expected it to be much worse ;)
Personally I think it's a good starting point for beginners. It runs straight out of the box, has some nice examples and exposes most features you'd expect from a modern programming language.
I would definately not use it for bigger projects, mainly because of missing tools.

Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Xalthorn on September 04, 2008
Personally I think it's a good starting point for beginners. It runs straight out of the box, has some nice examples and exposes most features you'd expect from a modern programming language.
I would definately not use it for bigger projects, mainly because of missing tools.

That's interesting, what tools do you deem as missing?  I was considering using FB to do a PC based game I've been threatening to do for years, as it's straightforward and let's me get on with things with minimal includes.

All I really need is a buffer to draw on, a way to read input, a way to bring resources in, and a way to make noises.  FB and RBZs library sort that out for me nice and effectively which allow me to drop into the source text and get busy.

You've got me wondering what I'm missing from the development 'pipeline' now...
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: hellfire on September 04, 2008
Quote
what tools do you deem as missing?
First of all and with the just-colourful-toys stripped:
- an IDE which is able to manage a "project" and not only a collection of editable files.
- meaningful error-messages from the compiler
- an integrated debugger (a key-feature why to use "basic" at all); i can run a debug-build in gdb, but...
- a proper gui-toolkit (I usually use Qt (http://doc.trolltech.com/4.4/index.html))
- the compiler doesn't even try to optimize and some language-features aren't implemented yet

Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Xalthorn on September 04, 2008
Quote
what tools do you deem as missing?
First of all and with the just-colourful-toys stripped:
- an IDE which is able to manage a "project" and not only a collection of editable files.
- meaningful error-messages from the compiler
- an integrated debugger (a key-feature why to use "basic" at all); i can run a debug-build in gdb, but...
- a proper gui-toolkit (I usually use Qt (http://doc.trolltech.com/4.4/index.html))
- the compiler doesn't even try to optimize and some language-features aren't implemented yet

That makes sense, and I can see how that would be a more comfortable environment to work in.
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Shockwave on September 04, 2008
Nice one Hellfire :)

Have some good karma from me too!

Freebasic is pretty good, I learned it because it seemed to be what most of the people on this forum were using to learn programming at that time.

Maybe with a better editor you might find it more to your liking, it's not a language I'd use if I was going to write another really large project like a game, but as you say, it runs right out of the box and I've found it a particularly good tool for making remakes and small intros with tinyptc and opengl. :) It supports pointers and asm too so it is especially good for little software rendered things.

I even saw some of Aulds stuff ported to freebasic, someone here converted one of the matrix trilogy 1ks to freebasic.
Title: Re: source of "Wire" (from the reduced resolution challenge)
Post by: Clyde on May 22, 2010
Absolutely Awesome :)