Author Topic: Oh I could have some serious fun with this...  (Read 9981 times)

0 Members and 1 Guest are viewing this topic.

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Hi folks,

I've just discovered freebasic and what fun I'm having :)

I threw a couple of things together and I make limited apologies for the messy code.  I'm going to work the ideas into a bigger demo but I figured it made sense to throw what I've done so far up here.

Please, if I'm doing something blindingly, obviously, dumb, let me know before I go much further with it.

Anyway, I've attached a couple of zips that include the source and an executable.

Xal.
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Oh I could have some serious fun with this...
« Reply #1 on: June 12, 2008 »
The spheres are my favourite  :clap:

This has to be in the top 10 of new members code posts, but then again Xalthorn I wouldn't expect less from you :)

Good job and have some good karma.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #2 on: June 12, 2008 »
I had fun with the cube, but yeah, the spheres just seem more... interesting.

At least I didn't throw a gem in there.  I think near the end of my ps2yabasic time, pretty much everything had that darn gem in it :)
Challenge Trophies Won:

Offline Voltage

  • Professor
  • Pentium
  • *****
  • Posts: 857
  • Karma: 53
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #3 on: June 12, 2008 »
Nice examples!  Very clever.

p.s.  Nothing wrong with gems :) http://dbfinteractive.com/index.php?topic=1576
Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #4 on: June 12, 2008 »
Nice examples!  Very clever.

p.s.  Nothing wrong with gems :) http://dbfinteractive.com/index.php?topic=1576

Thanks :)

That's a nice gem demo, I'll have to dust off my versions and throw some around for fun.

One thing I'm enjoying is the sheer amount of stuff that freebasic can cope with compared to an interpreted basic like ps2yabasic.
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Oh I could have some serious fun with this...
« Reply #5 on: June 12, 2008 »
One thing I'm enjoying is the sheer amount of stuff that freebasic can cope with compared to an interpreted basic like ps2yabasic.

You're only scratching the surface of what you can do... Believe me :)

Ugly Intro <- yes thats a really ugly looking intro but it throws a lot around and it's using tinyptc and this intro is by no means as optimised as it could be.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #6 on: June 12, 2008 »
One thing I'm enjoying is the sheer amount of stuff that freebasic can cope with compared to an interpreted basic like ps2yabasic.

You're only scratching the surface of what you can do... Believe me :)

Ugly Intro <- yes thats a really ugly looking intro but it throws a lot around and it's using tinyptc and this intro is by no means as optimised as it could be.

Oh good grief, you had some fun with that one :)

I might as well leap in with both feet and see if I can come up with something with a scroller and stuff tonight.
Challenge Trophies Won:

Offline WidowMaker [retired]

  • %010101
  • Atari ST
  • ***
  • Posts: 134
  • Karma: 21
  • %010101
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #7 on: June 12, 2008 »
I must admit I liked both things you have done there Xalthorn. Welcome along to this forum :)

I also use tinyptc and freebasic for quite a lot of things and it is indeed surprising what you can throw around.

The down side of tinyptc is that its most practical for 640 X 480 mode and possibly 800 X 600 depending what you are doing but if you want high res stuff you will need to use hardware accelerated graphics. It's still perfectly possible to make some quite viable demos with tinyptc and freebasic.

Rbz did a really top job on ptc _ ext!




Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #8 on: June 12, 2008 »
I must admit I liked both things you have done there Xalthorn. Welcome along to this forum :)

I also use tinyptc and freebasic for quite a lot of things and it is indeed surprising what you can throw around.

The down side of tinyptc is that its most practical for 640 X 480 mode and possibly 800 X 600 depending what you are doing but if you want high res stuff you will need to use hardware accelerated graphics. It's still perfectly possible to make some quite viable demos with tinyptc and freebasic.

Rbz did a really top job on ptc _ ext!


Thanks, it seems like a nice place to be.

I'm only messing around with it at the moment to see what I can do.  As Shockwave has already said, I'm nowhere near the boundary of what I can do with it yet, but if I get that far I guess I'll have to think of some alternatives :)
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Oh I could have some serious fun with this...
« Reply #9 on: June 12, 2008 »
I don't normally do this, but Xalthorn and I had a similar kind of coding history some years ago and I know the kind of things he's likely to be trying.
So heres a useful list of stuff that caught me out when I started.... Hopefully it will save you some time.

Some resources I figure you'll be working on now...

If you are going to draw text, you'll either want to create a font inside the program or load a bitmap font.
It's simpler to create the fonts in data statements, it's nicer looking to use real bitmaps :)

At first I took the easy route.. These first three links have binary fonts;

Crap sinescroll;
http://dbfinteractive.com/index.php?topic=224.0

Binary font, slightly better, Sine scroll example in topic;
http://dbfinteractive.com/index.php?topic=646.0

Another binary font;
http://dbfinteractive.com/index.php?topic=1360.0

If you want to load a picture in and make it part of your exe, this one deals with 24 bit windows bmp images;

How to load bitmaps and make them part of your exe;
http://dbfinteractive.com/index.php?topic=2524.0

You will notice that 24 bit bitmaps are perhaps not the most optimal way of storing bitmaps when your exe comes out at about 1mb!
use upx or something similar to squish it :)

Or.. There is another choice, rbz made some great tools to include 256 colour bmps
These are a little bit hidden away, so here's a link;

bmp2raw:
http://dbfinteractive.com/index.php?topic=370.0

Make sure that it's only 256 colour bitmaps you convert with this, be careful too I know
you use irfanview, when irfanview converts a 24 bit bitmap to 256 colours it ruins
the background colour. if it was black, the value will change to #040204
You can set it back to black by altering the first three bytes in the palette file that
bmp2raw creates (after you use bin2bas on it).

bin2bas:
http://dbfinteractive.com/index.php?topic=368.0


Shockwave ^ Codigos
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: Oh I could have some serious fun with this...
« Reply #10 on: June 12, 2008 »
Great intro, I love the one that looks like ripples, really nice morphing Xalthorn. Karma coming your way for the source code.

Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #11 on: June 12, 2008 »
I don't normally do this, but Xalthorn and I had a similar kind of coding history some years ago and I know the kind of things he's likely to be trying.
So heres a useful list of stuff that caught me out when I started.... Hopefully it will save you some time.

Hehe, you know me too well.  Although to be fair, recoding things that I used to be familiar with is the fastest way to learn a new language (I hope).

I'll probably be churning out a bunch of quick and simple tests to see how the language differs and what can be done to enhance them.

Some resources I figure you'll be working on now...

If you are going to draw text, you'll either want to create a font inside the program or load a bitmap font.
It's simpler to create the fonts in data statements, it's nicer looking to use real bitmaps :)

At first I took the easy route.. These first three links have binary fonts;

Crap sinescroll;
http://dbfinteractive.com/index.php?topic=224.0

Binary font, slightly better, Sine scroll example in topic;
http://dbfinteractive.com/index.php?topic=646.0

Another binary font;
http://dbfinteractive.com/index.php?topic=1360.0

I have a few ideas on fonts, but I think I need to do a basic scroller to get to grips with it again.  The problem with a language that has more potential is that my ideas get crazier ;)

If you want to load a picture in and make it part of your exe, this one deals with 24 bit windows bmp images;

How to load bitmaps and make them part of your exe;
http://dbfinteractive.com/index.php?topic=2524.0

You will notice that 24 bit bitmaps are perhaps not the most optimal way of storing bitmaps when your exe comes out at about 1mb!
use upx or something similar to squish it :)

Or.. There is another choice, rbz made some great tools to include 256 colour bmps
These are a little bit hidden away, so here's a link;

bmp2raw:
http://dbfinteractive.com/index.php?topic=370.0

Make sure that it's only 256 colour bitmaps you convert with this, be careful too I know
you use irfanview, when irfanview converts a 24 bit bitmap to 256 colours it ruins
the background colour. if it was black, the value will change to #040204
You can set it back to black by altering the first three bytes in the palette file that
bmp2raw creates (after you use bin2bas on it).

bin2bas:
http://dbfinteractive.com/index.php?topic=368.0

Of course, if I start messing with bitmaps I'll spend ages in Photoshop rather than coding :D

Thanks for the links and hints, I'll try to put them to use.
Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #12 on: June 12, 2008 »
Great intro, I love the one that looks like ripples, really nice morphing Xalthorn. Karma coming your way for the source code.

Thanks, I had fun with that.  I've already planned some bigger and better tricks with that but I figured I needed to get in the habit of submitting code again.  Otherwise I'd end up spending weeks on a particular thing and then throw it away as my interest moved to another idea.
Challenge Trophies Won:

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #13 on: June 12, 2008 »
Welldone Xalthorn, I especially like the morphing dot objects.

Cheers and all the best,
Clyde.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Dr.Death

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 445
  • Karma: 9
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #14 on: June 12, 2008 »
What can i say m8 i am impressed with your first go with freebasic i never knew it was that good i am using purebasic keep it up  :clap:
Proud member of DAWN

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #15 on: June 13, 2008 »
Thanks for the lovely comments folks :D

I'm messing around with an idea for a scroller, which seems to be getting there.  I think my main hurdle is keeping the code clean and tidy.  It's really bad practice I know, but I tend to sit at the editor and start typing, working straight from silly ideas.

One day I'll plan a project before I start coding..... maybe ;)
Challenge Trophies Won:

Offline nkk_kan

  • C= 64
  • **
  • Posts: 32
  • Karma: 4
  • poisoning the world with goodness
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #16 on: June 13, 2008 »
good work Xalthorn!
i liked the spheres

maybe you should code a small arcade game or something to start with if you just sit at the editor and start typing. Because that's what i do..  :P
By the way, if you like game programming in Fb, you might consider joining here

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Oh I could have some serious fun with this...
« Reply #17 on: June 13, 2008 »
To be honest I think Xal would get much more help on the official freebasic forums than on that one. Or maybe SHMUPDEV , but let's not try and entice any new members away from here shall we. In all honesty there has never ever been a programming question here that we havent been able to answer.
« Last Edit: June 13, 2008 by Shockwave »
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Xalthorn

  • Amiga 1200
  • ****
  • Posts: 331
  • Karma: 100
    • View Profile
Re: Oh I could have some serious fun with this...
« Reply #18 on: June 13, 2008 »
Please don't send me to even more forums, I don't keep up with all the ones I'm registered on now :)

To be honest, the only reason I'd look for other freebasic forums would be for inspiration, and google would satisfy that curiosity.
Challenge Trophies Won:

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Oh I could have some serious fun with this...
« Reply #19 on: June 13, 2008 »
brilliant! cool stuff! thumb up!
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won: