Help with DATA graphics

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Using modules? How you do that? you not on SUBs or somthing? *Going to chack and see how big RoboRaider is* (didn't want to compile)

Edit: :cry: Oh, no big deal, its only 202kbs,.. :lol:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

A module is an ordinary BASfile, except it contains only sub routines and functions.
I have left this dump.
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Ok, Z!re talking about a Library but its a BAS file.

The Def. of Library is a collection of functions (or Subs) without no Main program...

This is good so all I have to do is link to one of my external BAS Libs and I'm all set cause most of my program is Subs...
No really 16MB!!! That's awsome...He he!!

And No I'm not even done my core! I got to do my seeker missles (still), enemies, collision routines, blowup routines, bosses, and txt file level loader routines...Then I Start making it a game....hehe....Then finally music/SFX....

*Mit catches something out of the corner of his eye*
:shock: Its..its...Horrible!!! Its inhuman!!! Its immoral!!! Its...Its...Z!re's avitar!!! *Lightning flashes and loud suspenseful music plays*

Ahhhh!!!! *Mit runs around in a circle like a chicken with its head cut off*

LOL :lol:
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) Say, QB4.5 & 7.1 have a Lib maker, but when I make a Lib.. then try to INCLUDE it,. a bunch of yellow code come down (The type that comes up when you try to open a .EXE file in QB) and debugs thro it... all other libs don't do this, why mine?? :wink:

Yeah, I commented on that new avatar, it '$INCLUDE: 'blood', heh heh,. :roll: :D
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

:shock: QB4.5 has a Lib maker? What else a cappichino maker? :wink:

No, seriously, I had no clue...
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Yep,. it has a Lib maker right under the make EXE file,.. can't seem to work it tho, tried to make my PWRCALL.BAS a lib, but it wount load right,.. :( :wink: Oh well,...
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Ok, so how do you make it?

DO you make some code in the main screen? Or do you just make the Subs/Functions?

In order to include it in your program, you just use '$INCLUDE: 'QB.BI' right?
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

I don't really know,.. maybe you put somthing there(main mudule) but I wouldn't know.. all I know is I havn't figured it out yet,.. YET!! :wink:

'$INCLUDE: "QB.BI" would also load my lib or something?? :) Or are you asking that?? heh heh :roll:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Rattrapmax6 wrote: '$INCLUDE: "QB.BI" would also load my lib or something?? :) Or are you asking that?? heh heh :roll:
Ummm no noit really, It was there as an example of the $include metacommand.

BTW...You put "QB.BI" ^ it should be 'QB.BI' :lol: , and yes I was wondering inorder to include a Library that you made if you use the $include metacommand.
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Yeah, but every time I INCLUDE my libs, it pulls all the jumbled text(the stuff you get when you use NotePad to open a .EXE) under it gives a sentax error... I used to get it with other libs, like QB.BI,.. but I'm having no luck with mine.. I'll keep trying and let you know.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Hmmm...never had a prob with $include: 'QB.BI', oh well...
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

I did once, I think I put it backward or somthing, left something out maybe, can't remeber.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
romassoldier
Newbie
Posts: 4
Joined: Tue Aug 30, 2005 9:03 am

Re: Help with DATA graphics

Post by romassoldier »

RayBritton wrote:If you do:

Code: Select all

DATA 01,01,01,01
DATA 01,00,00,01
DATA 01,00,00,01
DATA 01,01,01,01

FOR x = 1 TO 4
FOR x = 1 TO 4
READ z
PSET(x, y), z
NEXT
NEXT

DIM box(4*4)
GET (0, 0) - (4, 4), box
but i get a syntax error about the PSET(x, y), z
so i redid it but now i get a syntax about GET (0,0) - etc.
I think this is the right code:

Code: Select all

CLS
SCREEN 13
    FOR x = 1 TO 4
        FOR y = 1 TO 4
READ z
PSET (x, y), z
NEXT
NEXT

DIM box(4, 4)
GET (1, 1)-(4, 4), box

DATA 01,01,01,01
DATA 01,00,00,01
DATA 01,00,00,01
DATA 01,01,01,01
Am I on the right way?
Last edited by romassoldier on Sat Mar 10, 2007 3:21 pm, edited 1 time in total.
I came, I saw, and I didn't believe my eyes...
User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened »

I think, considering this thread is 7 months old, that everybody's figured it out. :wink:
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."
Seb McClouth

Post by Seb McClouth »

How can I use this for a font-routine. A font for e.g. 8x8. How can I load it from a file, when I need capital and regular font?

grtz
Seb
User avatar
The Awakened
Veteran
Posts: 144
Joined: Sun Aug 07, 2005 1:51 am

Post by The Awakened »

There's already a post going on right now about this. A good place to start is Chris Chadwick's PixelPlus256. There's a file called usersubs.bas, and it has a font routine that I'll probably utilize for my game.
"Sorry for beating you up with a baseball bat Julian, but I DID think that you were a samsquanch."
paulunknown..

Post by paulunknown.. »

help
how come when i get and put
DATA 01
DIM ...
GET (0,0)-(1,1),...

there is black around the dot
like i tried to put it in a row, there is black lines

also does the background color mess up the color i use to draw something else
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

When you say 0, 0 to 1, 1, You mean these cords (to QB)

0,0
1,0
0,1
1,1

All you want is 1, 1 (or something like that). So, to fix this:

Code: Select all

GET (1, 1)-(1, 1), Array
to see an example of this, use the Selection tool in Paint.
Image
Post Reply