Author Topic: source of "Wire" (from the reduced resolution challenge)  (Read 6408 times)

0 Members and 1 Guest are viewing this topic.

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Hi pals,

I fiddled a bit with FreeBasic today and converted my entry from the reduced resolution challenge (original C++ source can be found here).
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 ;)
« Last Edit: September 04, 2008 by hellfire »
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2748
  • Karma: 492
    • View Profile
    • http://www.rbraz.com/
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #1 on: September 04, 2008 »
Great!

Works fine here, very nice of you converting all this code in freebasic and so fast, have some karma++
Challenge Trophies Won:

Offline Voltage

  • Professor
  • Pentium
  • *****
  • Posts: 857
  • Karma: 53
    • View Profile
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #2 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?
Challenge Trophies Won:

gooner

  • Guest
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #3 on: September 04, 2008 »
Thanks Hellfire k++ for that mate :)

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #4 on: September 04, 2008 »
Very generous and very tidy, karma coming your way :D
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #5 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.

Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #6 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...
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1290
  • Karma: 466
    • View Profile
    • my stuff
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #7 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)
- the compiler doesn't even try to optimize and some language-features aren't implemented yet

Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #8 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)
- 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.
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17393
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: source of "Wire" (from the reduced resolution challenge)
« Reply #9 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.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Absolutely Awesome :)
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won: