BMP's in gwbasic

Discuss popular GCS tools like ZZT, Megazeux and Adventure Game Studio, as well as programming and other topics related to game design.
Enigma...

BMP's in gwbasic

Post by Enigma... »

Don't ask why... but I'm trying to get a BMP or some other windows image in GW-BASIC.
Is there any way to do it? It doesn't have to look smashing but a 256 color picture would be nice.
The problem is... I can't get my screen 13 to work. That would be a nice start if it would.

Can you guys help me out?

greetings from holland
barok_unlogged

Post by barok_unlogged »

why bother with gw basic? Use qbasic... Much better. Or even Visual Basic.

you won't find a bmp loader for GWBasic. Look for one for qbasic and try to convert i guess.
User avatar
Enigma...
Newbie
Newbie
Posts: 6
Joined: Mon Jul 26, 2004 2:50 pm

Post by Enigma... »

I know... qbasic is easier and better.
But I just wanna try if it is possible. See it as a challenge.

So can anyone help me?
Can I use Assemble maybe to access 256 color modes?
knico

Post by knico »

Try google :laugh:
barok_unlogged

Post by barok_unlogged »

okay... that doesn't make sense... you want to create a bitmap loader in gwbasic for the challenge... yet your asking for HELP....

:blah: kids nowadays... why don't you just head to qbasicnews?

I suggest antoni's bitmap loader. it's a geocities page... but i don't know which.
Guest

Post by Guest »

gwbasic can't do screens with 256 colors when i remember correctly.
Guest

Post by Guest »

:blah:
User avatar
Enigma...
Newbie
Newbie
Posts: 6
Joined: Mon Jul 26, 2004 2:50 pm

Post by Enigma... »

But I mean...
Isn't there any way I can do that by using asembly code?

and b.t.w. I'm not saying gwbasic is better that qbasic.
please don't get me wrong here. :upset:
Interon 2.0
Experienced Member
Experienced Member
Posts: 54
Joined: Fri Sep 24, 2004 3:58 pm

Post by Interon 2.0 »

BMPs didn't even exist when GWBasic was made, so unless there's a converter or a hack, it's about 99% impossible.
User avatar
Frenkel
Way too much free time
Way too much free time
Posts: 540
Joined: Wed May 05, 2004 7:47 am
Location: Netherlands

Post by Frenkel »

Sure, you can do everything in assembly.
Groeten van Frenkel
Visit us at the Official S&F Prod. Homepage
Interon 2.0
Experienced Member
Experienced Member
Posts: 54
Joined: Fri Sep 24, 2004 3:58 pm

Post by Interon 2.0 »

Yeah that's about 99.9% true

But then you would need to make changes to GWBasic itself, and I'm not sure how one would go about that without the original Microsoft source code.

Unless GWBasic has an internal function that allows high-resolution graphics (lots of pixels). Then you may be able to rig a BAS file that GWBasic would interpret it and draw the picture.

Or wait a moment... Isn't GWBasic's limit 64 KB? So the bitmap must be smaller than 64 KB, and even when you add a bitmap, there's not much room left for source code.

And even to accomplish this feat, you may need an enormous amount of free time, patience, and intelligence.

So IMO, you may as well leave off this ambitious project. It's probably more trouble than it's worth.
User avatar
barok
Member
Member
Posts: 30
Joined: Sat May 15, 2004 7:13 pm
Location: bushlands of saskatchewan

Post by barok »

Frenkel: yes, you could do anything in assembly, but you wouldn't want to use 1000 lines of assembly to make a game that takes 10 lines of basic, would you?

Enigma: I never thought you said that gwbasic was better than qbasic. However, since most people at qbasicnews have dealt with gwbasic too, they'd be the people to go to. Basically, the people there would be able to give you over 10 times as much support and information as here. (no offense, but some of the people at qbnews are gurus.)

Interon: It doesn't matter if bitmaps weren't made before or during the time of gwbasic. As long as you understand the file format of the bitmap, you'll be fine. Basically, this guy wants a 320x200x256 colors bitmap. (he wants screen 13, that is it's resolution.) Now, 320x200= 64000 pixels. However, due to the way that screen 13 handles bits, bytes and pixels, you only need an array that's 32001 integers large. (you'll see where the one comes form in a minute.) you see, 8 bits = 1 byte. Now 1 byte = 1 pixel. you still with me? Now TWO bytes = 1 integer. So therefore, we can fit a 320x200 picture into this array: picture(32000) However, since basic starts counting from 0 instead of 1, the array should be this. (31999) Now, i said the array should be 32001. That means we have two extra integers somewhere. Those extra integers hold the length and width of the picture. It's odd, really. the first integer holds the size of the picture... IN BITS!!! Before you start panicking, remember that 8 bits = 1 byte = 1 pixel. So therefore, all we have to do is take the width of the picture and times it by 8. the height of the picture has to be in pixels. That's true.

Btw Interon, from what i understand of what your saying, your saying that gwbasic can't handle a picture that large. It can. The source to load and display the picture shouldn't be large at all, and the picture is only 32 kb large. So therefore the person can load the bitmap and still have lots of room for code. And btw, i've coded in gw before, and as i recall, i've loaded more than 64 kb of code and variables before with no ill effects...

just run gwbasic with /ah and you'll be fine.
Qbasic can do much more than you think!
User avatar
Da_Goat
Moderator
Moderator
Posts: 2026
Joined: Sat Sep 14, 2002 6:14 pm
Location: Prescott, Arizona, USA, Earth, The Milky Way, The Universe, Nothing and Nowhere.

Post by Da_Goat »

Well guys, if you ever accomplish it, please put a link so I can download the BAS file, so I can be shocked and amazed...
Interon 2.0
Experienced Member
Experienced Member
Posts: 54
Joined: Fri Sep 24, 2004 3:58 pm

Post by Interon 2.0 »

Note: the above post is mine and not Da_Goat's. See http://www.dosgames.com/forum/viewtopic-nc-t-4304.html for more information.
relsoft

Post by relsoft »

Enigma... wrote:I know... qbasic is easier and better.
But I just wanna try if it is possible. See it as a challenge.

So can anyone help me?
Can I use Assemble maybe to access 256 color modes?
Yeah, make a com file that switches the screen res using int 10h and call absolute. Or if gwbasic supports call interrupt.
b_unlogged

Post by b_unlogged »

hey, listen to this guy! He's a guru! Consider yourselves graced by his presence!
Jack Bond the guest

Post by Jack Bond the guest »

I need help too. I'm not sure how to draw pixels. can any1 help me?
Guest

Post by Guest »

Look in QBASIC Help, under the DRAW command.
Jack Bond

Post by Jack Bond »

I don't use qbasic I use GW basic
bond

Post by bond »

nevermind the graphics
I just wanna show a CCOOLL one I did :cuccoan:
Post Reply