I am into computer graphics - I am into ink illustration. I'm into the pen, it is the most satisfying, a thin clean sharp black line out of every stroke. Every movement is finely tracked - nothing smudged or attenuated.
Check this out, maybe something interesting can be made with that fascinating tangent trig expression:
'loop while _mouseinput
'mx = _mousex
'my = _mousey
'a = (mx-320) /100
a = 3*sin(j)
for i=-5 to 5
for t = 0 to 10 step .1
x = (a+i)+cos(t)
line - (b*x+320,b*y+240), _rgb(i+200,i+200,i+200)
I have no idea how you do that stuff, but I love it!
As far as "keeping it active" is concerned, it will be business as usual, but in the main forum. Just post any graphics stuff there.
There's been a lot of activity here recently since Pete's suggestion that he archive this forum, but that's about it. The last post before that was last Christmas and that wasn't even graphics-related.
But I love your stuff, and hope to see more of it.
you let me know which forums you have the authority to go around saying "what is the point of this? what is the point of this?" on, and i won't post to those forums. because the question is one thing, but it's no secret what you're getting at.
actually... you can SAY that all you want. just let me know which forums where you can ask with some authority (as if it matters whether you can figure out what the point is) and i will stop posting to THOSE immediately.
the purpose of the post was already explained. feel free to go searching.
unfortunately the last i saw her, you (that is, pete) and i weren't on the best of terms. i checked out the old forum, looks like it closed in 2009
i have little recollection of how things went over there, or whether there was any traipsing (hopefully a minimum if any.) given the context, i'd hate to get into it here, but i can at least hope for good news. whatever she's up to, i sincerely hope she's enjoying herself.
Hope thats ok, it isn't qbasic, it is for qb64,? the drawings are kind of sketcy or crude, which is something I admire about the graphic The Bob dose, he takes the time to finish them real nice,...hopefully one day like when I retire (just 5 years away)I can take the time to do them better,..
any here is the code
------------ code below --------
REM Much thanks to Unseen, and his "useing a sprite sheet" tutorial, so it code I used to do this.
X AS INTEGER
Y AS INTEGER
Width AS INTEGER
Height AS INTEGER
Sprite& = _LOADIMAGE("Dibujo.png")
'// GARY SAYS The sprite we are using has 49 frames, it has 10 frames on the X axis and 5 on the Y axis.
'// As we are dealing with an equally spaced sprite sheet we can load all the x/y points in a set of for loops.
DIM SpriteImageRect(50) AS Rectangle
FOR j% = 0 TO _HEIGHT(Sprite&) - (_HEIGHT(Sprite&) / 6) STEP (_HEIGHT(Sprite&) / 6)
FOR i% = 0 TO _WIDTH(Sprite&) - (_WIDTH(Sprite&) / 2) STEP (_WIDTH(Sprite&) / 2)
SpriteImageRect(rectcnt%).X = i%
SpriteImageRect(rectcnt%).Y = j%
SpriteImageRect(rectcnt%).Width = _WIDTH(Sprite&) / 2
SpriteImageRect(rectcnt%).Height = _HEIGHT(Sprite&) / 6
rectcnt% = rectcnt% + 1
'// Draw the images in turn.skip the last image as it is blank.
FOR i% = 0 TO 11
_PUTIMAGE (200, 100)-(420, 250), Sprite&, , (SpriteImageRect(i%).X, SpriteImageRect(i%).Y)-(SpriteImageRect(i%).X + SpriteImageRect(i%).Width, SpriteImageRect(i%).Y + SpriteImageRect(i%).Height)
_DELAY .2 '////this is the _delay, can be changed to fit the music
kb$ = INKEY$
IF kb$ = CHR$(27) THEN SYSTEM
---------------- end code ------------
This is the "sprite sheet",
Edited: Note, I just checked this, and the "sprite sheet"image, as it is from photo bucket,is not to good,all though it dose work, it is kind of blurry, the one in the zipped file at drop box should be better.
No, not a software for smileys, but a software program for animations, called ARTOONIX
It is capable of doing complete animations,or cartoons, I enjoy it,if there is a limit to frames, I have not found it,you can go up to 1,000 +,..when finished, it has a option to compile as a .gif or SWF video, and you can include sound recordings, however with .gif no sound.
The smiley, is only actually 4 or 5 frame, I don't remember maybe six. It could be done also with animax, or qb64 too, how ever, to put on a web site, or as I did post it here, it pretty much needs to be a .gif
I have a graphics tablet, which helps a lot on doing the drawings,..but I think ideally a scanner, would be best, and then one could do the drawings on paper, scan the sheets,then compile the pages into a .gif . That is what I like the artoonix program for the most, I really don't like the drawing or paint program it has, but it is great to compile images, as you can import the frame, they can be .bmp, png jpg etc,..If I remember correctly, I used a program called Pencil,
to do the drawings. or I may have used a DOS paint program I have.Pencil is free, open source, Artoonix has a pretty good demo for free (share whare), but to get all the features it is $35.
Just a few days ago, I did do a goose, flying, with animax, the drawings are not to good, but the movement works good, wings flapping etc, I am still working on that,it is working on qb64,
Thanks for the compliment
I will get back later,..
I have often wondered, the " Artoonix " software, is really pretty simple, basic,..but good especially for someone just learning.
Now my coding ability, with qb64 and qbasic is pretty limited, but it seems to me like a similar program could be done with qb64,like a clone,
Animax, is pretty neat, excellent for sprites, I like it too, for it's simplicity,..
However, for some of the things I would want to do, I need to be able to do more then 16 frames,
Anyway, it seems like I never get enough time to do all the things I would like to do,...kind of just rambling now, so anyway thanks, hope maybe they (the software) gives you some ideas,..
I tried compileing Animax,with qb64 for Linux, but am having trouble the the mouse subs,
---------- code below -----------
LB = 2
MouseDRIVER LB, 0, 0, 0 '///This is the line that it says is the error,can not compile.
LB = 0
MouseDRIVER LB, 0, 0, 0
InitMOUSE = LB
-------------------- end code --------
I tried some things, but keep getting the
"cat got the mouse",... so I need to get the "cat" out of my sytem,.!
edited,..I don't know if it matters, but my mouse is a USB mouse. Also it seems like a long time ago, I had the same problem, and you had a solution, that turned out to be quite simple, but I don't remember, and searched old posts,but didn't find it,anyway thanks again.
2nd edit: Animax dose run fine with dosbox,from my qbasics dir, so at least I do have it, and can run it from there.
There's also a QBG icon in the QBG.ZIP file if you want to use it.
These icons won't be used automatically by Windows, so they must be installed manually. You probably already know how to do that, but for those who don't: right click the current desktop icon/click Properties/click Change Icon/Click Browse and then navigate to the directory where the icon is stored. Select it, then click OK/Apply/OK.
But I am wondering, which older qb64 version you used ?, If there was also a Linux version at that time, that might work for me, to compile it with that.
On the Icon, thanks, and there is a way to attach Icons with Linux, I don't remember very well, but I saw something about that in a linux tutorial,
Ok well for now that is about it,....this was just my lunch break,...
I am anxious to try doing some animations, though, since Animax works fine with DosBox, I can still use it to do them, and then I can still used the finished animation, in QB64,..so it is no big deal. I will get back later when I have something to show.
I am not sure if I should post the code here, with the sprite sheet, so for now I am going to just post a link, to where I had posted it on the qb64.net forum.
What I am wondering is if it would be possible/practical, to do this without the sprite sheet. Or any better way to do it.
The letters used would not necessarily have to look exactly the same, but, they should be big.
instead of a sprite sheet, you could put them in an array
by mn64 (no login)
you could even locate 1,1, print the letter you wanted, use FOR Y=0 to 15 : FOR X=0 to 8: p = point(x, y): NEXT: NEXT to get the pixels you wanted to draw a letter, and then post them as squares using LINE (newerx, newery) - STEP (5, 5), p, bf for the larger version.
it just depends what you want to achieve (self contained program in one file?) and what sacrifices you're willing to make.
Self contained would be nice, saying "you could", well, if I knew how I could, I am really tired at the moment, I will see what I can figure out, I am thinking (if I remember right) there are some examples, in TheBobs tutorial, also, but I need to down load it again, I used to have it but can not find it.
Thanks, from Garry
FOR A = 167 TO 455 STEP 24
LINE (A, 100)-(A + 24, 166), 7, B
PAINT (A + 10, 110), 15, 7
FOR A = 166 TO 478 STEP 24
LINE (A, 166)-(A + 1, 165), 0
LINE (A + 1, 165)-(A + 2, 166), 0
PSET (A + 1, 166), 0
LINE (167, 95)-(479, 97), 4, BF
FOR A = 186 TO 450 STEP 24
IF A = 234 THEN A = 258
IF A = 306 THEN A = 330
IF A = 402 THEN A = 426
LINE (A, 100)-(A + 10, 150), 0, BF
LINE (A + 2, 100)-(A + 2, 142), 7
LINE (A + 2, 141)-(A + 8, 142), 15, BF
'license: creative commons cc0 1.0 (public domain)
locate 1, 1
letterwidth = 7 ' 7 times the usual width
letterheight = 10 ' 10 times the usual height
letterwidth = int(rnd * 10)
letterheight = int(rnd * letterwidth * .7 + .7)
lettercolor = int(rnd * 15 + 1)
randomize timer ' make rnd work better... below
print mid$("abcdefghijklmnopqrstuvxyz", int(rnd*26+1), 1)
'you could use chr$(int(rnd*26+65)) but this is easier to edit
newplaceforletterx = int(rnd * int((640 - letterwidth) / letterwidth))
newplaceforlettery = int(rnd * int((480 - letterheight) / letterheight))
for getly = 0 to 15
for getlx = 0 to 8
p = point(getlx, getly)
if p <> 0 then
pset(newplaceforletterx * letterwidth + getlx * letterwidth, newplaceforlettery * letterheight + getly * letterheight), p
'line -step(letterwidth, letterheight), p, bf
line -step(letterwidth, letterheight), lettercolor, bf
That it pretty neat , I like it.
Actually though, what I am looking for is a way to do the letters, or the graphics for them, as self contained graphics.
What I have is a "little program", I did for my grandaughter, she is 2 years old(almost),
In that program, when she presses the "a" key, on the computer key board, it loads a "A", that is hand drawn, at this point the "program", has
A thru K, on a sprite sheet, When and if she hits A, t it displays the A, and also uses SOUND to play a tone, (not really is exactly the note A,musicly, just a tone sound),
Ok at this point the 10 letters are on a sprite sheet. I am attaching the sprite sheet.
What I would like to do is figure out how to do this without the sprite sheet, the images "self contained", instead of always having to include the sprite sheet.
GetKey$ = UCASE$(RIGHT$(INKEY$, 1))
IF LEN(GetKey$) = 0 THEN
' skip as is blank
GetKey% = ASC(GetKey$)
LOOP UNTIL Done
Sprites& = _LOADIMAGE("LTRsprtsht.bmp")
IF Sprites& = -1 THEN
PRINT "Picture NOT found"
dummy$ = INPUT$(1)
PicWidth& = _WIDTH(Sprites&)
PicHeight& = _HEIGHT(Sprites&)
SingleLetterWidth& = PicWidth& \ 5
SingleLetterHeight& = PicHeight& \ 2
'PRINT PicWidth&, PicHeight&
'PRINT SingleLetterWidth&, SingleLetterHeight&
SELECT CASE GetKey%
CASE 27 'Escape
Done = TRUE
CASE 65 'A or a
_PUTIMAGE , Sprites&, 0, (0, 0)-(SingleLetterWidth& - 1, SingleLetterHeight& - 1)
SOUND 300, 4
CASE 66 'B or b
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 1, 0)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 1, SingleLetterHeight& - 1)
SOUND 400, 4
CASE 67 'C or c
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 2, 0)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 2, SingleLetterHeight& - 1)
SOUND 500, 4
CASE 68 'D or d
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 3, 0)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 3, SingleLetterHeight& - 1)
SOUND 600, 4
CASE 69 'E or e
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 4, 0)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 4, SingleLetterHeight& - 1)
SOUND 700, 4
CASE 70 'F or f
_PUTIMAGE , Sprites&, 0, (0, SingleLetterHeight&)-(SingleLetterWidth& - 1, (SingleLetterHeight& - 1) + SingleLetterHeight& * 1)
SOUND 800, 4
CASE 71 'G or g
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 1, SingleLetterHeight&)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 1, (SingleLetterHeight& - 1) + SingleLetterHeight& * 1)
SOUND 900, 4
CASE 72 'H or h
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 2, SingleLetterHeight&)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 2, (SingleLetterHeight& - 1) + SingleLetterHeight& * 1)
SOUND 1000, 4
CASE 73 'I or i
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 3, SingleLetterHeight&)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 3, (SingleLetterHeight& - 1) + SingleLetterHeight& * 1)
SOUND 1130, 4
CASE 74 'J or j
_PUTIMAGE , Sprites&, 0, (SingleLetterWidth& * 4, SingleLetterHeight&)-((SingleLetterWidth& - 1) + SingleLetterWidth& * 4, (SingleLetterHeight& - 1) + SingleLetterHeight& * 1)
SOUND 1200, 4
----------- End Code ---------
So anyway, that is the idea of the "program", the only graphics are the letters,
The letter graphics, don't have to be like the ones I drew, but , big, and colorful, or "bright",
I can not seem to get it to "paste", correctly.The long lines keep getting "wrapped", ???
Thanks though ,
In QB, I would have captured each character using graphics GET, and then stored each image at a different index in an array, then BSAVE'd the array. When the program ran, it would load the array using BLOAD, and each image would be PUT at the appropriate location using its corresponding index.
To be honest, I've never use QB64's _PUTIMAGE capability. If you want to learn more about my method, grab another copy of my tutorial and check out Lesson 8 on GET, PUT, BSAVE and BLOAD.
As for "self-contained", you can always draw the characters from DATA. In other words, in a utility program with the image on the screen, simply scan the image using an x/y loop and write the attribute numbers to a sequential file. Then open the file in QB64, copy it, and paste it into your final program as DATA.
When your program runs, it will then READ and PSET the images using an x/y loop with the original values, then GET the characters individually to an array. Do all of this with all attributes set to zero to hide the activity. Then erase the image and set the palette values (or simply use PALETTE if you're not using custom colors). Your main program then begins (this first part should happen almost instantaneously in QB64).
I did download the tuturial, and see, what I can do." in a utility program with the image on the screen, simply scan the image using an x/y loop and write the attribute " Do you know where I can get the "utility" ? to do that.
I meant for YOU to write the utility. Just place the image, establish its dimensions, then write an x/y loop such as:
OPEN "Image.BAS" FOR OUTPUT AS #1
FOR x% = x1 TO x2 'use integers for speed
FOR y% = y1 TO y2
n = n + 1
IF n (less-than symbol) 30 THEN
WRITE #1, POINT(x, y),
'Note that there's a comma following the WRITE line
WRITE #1, POINT(x, y)
'Note that there is NO comma after the WRITE line
n = 0
'The above IF block makes rows of 30 DATA per row
Then, when you open "Image.BAS" in QB64 (or QB), you will see something like this:
Now highlight and copy the numbers and paste them into your program and create rows with the word DATA in front, such as:
DATA 0,0,1,0,15,2,2,3,3,15,3 ...etc.
Make certain that the last number of each row DOESN'T have a comma behind it!
Then, at the top of your program, put in an x/y loop using the same values as the original:
FOR x% = x1 TO x2
FOR y% = y1 TO y2
PSET (x, y), Value
That will reproduce the original image on the screen in your finished program. From there it's just a matter of GET'ting each number to a seperate index in the array. Then just CLS and start your program. Like I say, the PSET/GET stuff should finish in an instant.
How to size the array as well as the individual image sections is all in the tutorial.
Ok, that is interesting, I didn't think it was that simple, I will try this, see how it goes,
If I understand correctly, then:
IF n (less-than symbol) 30 THEN
WRITE #1, POINT(x, y),
'Note that there's a comma following the WRITE line
WRITE #1, POINT(x, y)
Where it says POINT(x, y) The x and y, would be values , that determine or " establish its dimensions" Sit might be something like,
WRITE #1, POINT(25, 25), If it is a 25 x 25 image,
Once I try this, I will probabley understand better,..thanks a bunch,
FOR x = 20 TO 99
FOR y = 20 TO 99
PSET(x, y), 12
The idea is that the x and y at some point represent the coordinates of every pixel in that 80x80 square. In the first x/y loop of your utility, you're checking the attribute number of every pixel in your image (using POINT) and writing it to the file, then the same loop PSET's every pixel in the original color.
Experiment with it a little, you'll get the idea. For example, try changing the PSET line in the above loop to this:
new version of (simple) old program from 1990-something
by mn64 (no login)
i learned circle and pset in screen 12 around 1990-ish. it didn't lead to any ground-breaking programs, and this isn't one, either.
it's a simple randomized DRAW program. i didn't dig up the code for the "original" version (didn't need to) but i post it here because i'm tickled how qb64 handles the rgb function when you're using DRAW. it's beyond me why you see VARPTR$ for stuff like this.
no matter how many times i read about VARPTR$ i can't figure out the point of using it. i've never had a situation where replacing it with STR$ didn't work. i'm not saying there isn't a reason to use it, only that i don't know what reason it is. this version is better in several ways than the first. i especially like how it reminds me of the dragon spiral much of the time.
do while inkey$ <> chr$(27)
r = int(rnd * 256)
g = int(rnd * 256)
b = int(rnd * 256)
for p = 1 to int(140 * (rnd * 100 + 1))
if int(rnd * 50) = 0 or x = 0 then
x = 1
dir$ = mid$("udrl", int(rnd * 4 + 1), 1)
for z = 1 to 4
r = (r + int(rnd * 7 - 3)) mod 256
g = (g + int(rnd * 7 - 3)) mod 256
b = (b + int(rnd * 7 - 3)) mod 256
draw "c" + str$(_rgb(r, g, b)) + "b" + dir$ + "1"
circle step(0,0),5 ,_rgba(r,g,b,128)
I must admit I love the oil version -- it's amazing how much it looks like oil paint. A few years ago the (then) forum owner Mac and I worked on a random oil-painting program that was fascinating to watch, but it didn't have the three-dimensional color quality that yours have (SCREEN 13/256 colors).
this has nothing to do with graphics, and i invite you to delete the topic when you've read it. this isn't because i'm so concerned about topic-ness (a reasonable amount of it goes a long way) but because it will truly serve no purpose afterwards.
i've thought about this, because i haven't been part of the community for a long time, and i wasn't sure how it would go. so you know, you'd be an accomplice (heh...) but i think the worst case scenario (i'm not being a pessimist here) is that if things didn't work out fine anyway, you'd occasionally get ribbed by pete (which is an empty threat, since it occasionally happens to everyone already.)
short version: galleon only checks email, and no one can join the qb64 forum until he does. i don't use email. if you could send him one: "galleondragon aaaaaht gmail dott com" is the only one i know, there's an @qb64.net address too.
tell him "fixinupthebuggy" isn't spam and have him approve the account, he assumes they're spam unless he gets an email. (it hasn't been rejected yet.) if you want to keep a clear conscience, you can warn him it's me :) and may god have mercy on your soul... ;)
math is a funny thing. computer programs could have been like recipes (equally difficult to copyright) but the government (industry) decided to treat them more like books or music.
sure, math is free, but once you take an equation and name the variables (blame higher-level-lan... no, blame lower-level-lawyers) it becomes subject to copyright AND patent law. (the latter is especially absurd, and it wasn't like that until 1990/91.)
even if some idiot patented rgb->hsv, patent would have expired by now, but i'm curious if there's an easy equation handy. in the time it took to type this, i probably could have found one on my own, but that's only a guess. i'm curious anyway.
' q. why license your code?
'' 1. the whole "without a copyright notice it's public domain" thing
'' '' hasn't been true since the 1970's
'' 2. in some countries, people can't use your "public domain" code
'' hence, cc0. it's the formal version of wikipedia's pd dedication
' q. what about other free software licenses?
'' those are fine, too. if you use those, you better ensure
'' that your code is free for everyone to use now, and years later
' q. but i want to charge money!
'' there is *nothing wrong* with charging money for free software.
'' you just can't stop people from making copies/changes, free of charge.
' q. you should donate to qb64!
' q. get on with the code, already!
'' this will be shorter next time! here is code:
screen 12 ' the following works in other screen modes, too
gcolor 9 ' same as in screen 0
glocate 1, 1 ' same as locate statement in screen 0
gscale 2 ' 2x2 pixel width
glocate 3, 1
box$(1) = "_88888888888888888888888888"
box$(2) = "eeeeeeeeeeeeeeeeeeeeeeeeee"
boxside$(1) = "_8________________________8"
boxside$(2) = "e________________________e"
for boxes = 1 to 2
for r = 1 to 7
gprint boxside$(boxes) ' print transparent box over / on top of text
glocate 2, 1
gscalep = int(s)
gcolorp = c
gbackcolorp = c
sub glocate(row, column):
gposyp = row
gposxp = column
shared gposxp, gposyp
shared gcolorp, gbackcolorp
' # means "use the foreground color here."
' . means "use the background color here."
' _ means "transparent - don't draw this block at all" (you can layer!)
' 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f means "do color attribute 0 to 15."
' any letter after f: "use the foreground color here."
if gscalep < 1 then gscalep = 1
pcolorp = gcolorp
for p = 1 to len(p$):
select case lcase$(mid$(p$, p, 1))
case "#", "g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"
pcolorp = gcolorp
pcolorp = gbackcolorp
pcolorp = -1
pcolorp = instr("0123456789abcdef", lcase$(mid$(p$, p, 1))) - 1
if not pcolorp = -1 then
if gscalep > 1 then
line ((gposxp - 1) * gscalep, (gposyp - 1) * gscalep)-STEP(gscalep - 1, gscalep - 1), pcolorp, bf
pset (gposxp, gposyp), pcolorp
glocate gposyp, gposxp + 1
gposxp = 1
glocate gposyp + 1, 1 'gposyp = gposyp + 1
i never used sub much unless the program was big enough, i just didn't need local scope or protected variables and it was extra typing :)
qb64 feels very strange with regards to subs. i'm sure it runs qbasic programs just fine in this regard, my "concern" is that qb64 is actually more flexible, and either the subs or the calls to them are written in a way that isn't compatible.
ordinarily, i wouldn't care. for these routines, i hoped they were very close to usuable in qbasic, if not the whole 100%. i'm not going to start testing things for compatibility in dosbox, but if you're running them in qbasic and they give you an error, i'd like to hear about it-- along with the line number, if you get one.
now instead of single dots, your image will be rendered with 4x4 pixel-width blocks.
what about color? above you see the colors "#" and "." used.
"#" means "use the foreground color here."
"." means "use the background color here."
"_" means "transparent - don't draw this block at all" (you can layer!)
"0123456789abcdef" means "do each standard color from attribute 0 to 15."
any letter after f means: "use the foreground color here."
so to do "qb64" in green on black, you could do this:
no need to worry about setting up the line statement to draw boxes the size of gscale: gprint will do that for you.
and what about circles?
will go to row 5, column 15 (at the current scale) and then draw a circle of radius 20 x gscale with that point as the center.
it would be cool to have the current scale determine how many pixels wide the circular line is: in other words, if your "pixels" are scaled at 4x4, a circle with a radius of 20 (or 3, or 50) x 4 should be made of a line which is 4 pixels wide. but that can come later.
why have a string in the gcircleprint command? it's not necessary to put that in the design, it's only for fun. if you don't want to use it:
gcircleprint("", 20) 'there, it's gone :)
but you can use it to change the spacing/alignment of your circles, like gprint. if you want.
what about squares?
gsquareprint("", 20) 'square of line-width gscale, top-left corner at current row, column. height is 20 x gscale, width is 20 x gscale.
grectangleprint("", 10, 12) 'of line-width gscale, top-left corner at current row, column. height is 10 x gscale. width is 12 x gscale.
but if that isn't what you want, you can always get your rectangle the gprint way:
when can you use gprint, gcolor, glocate, gscale, gcircleprint, gsquareprint, and grectangleprint?
when they're added to qb64? no! (but i encourage galleon to consider such extensions.)
gprint, gcolor, glocate, gscale, gcircleprint, gsquareprint, and grectangleprint are just wrappers around existing qbasic graphic statements.
you can use them in qbasic AND qb64 as soon as i've coded them. it shouldn't take much, there are a lot of people on the forum who could crank these out in an afternoon whether i bothered to write them or not.
will this revolutionize graphics in basic? probably not. will it encourage a couple people who only use text mode to try some graphics in the future? i hope so, but i'm pretty sure pete will stick with screen 0 forever.
hey, screen 0 is pretty sweet, but qb64 is sort of doing this already (it's just stuck at gscale 8 or 16, i believe.)
I agree that there is a lot of potential in text mode for graphics that most people aren't even aware of, let alone explore.
I'm assuming that the "g" commands would be calls to sub procedures that you are going to write. When I first saw them I thought you might be confusing QBasic/QB64 with another BASIC language.
Not sure if you've seen it, but click the link "Example Programs" at the top of my forum page and then scroll down to MONOPOLY BOARD. Among other things, it shows the potential of ASCII graphics in QB.
i love ascii, and i'll check out the monopoly game...
by mn64 (no login)
i've heard all about it, but i didn't check it out last time i was a regular. (if pete came here more, he'd have to post something like: "last time *i* was irregular...")
this may be obvious, it might be the opposite, but the statements i'm planning are graphics statements, which draw graphics in graphics mode.
i've thought for a long time that pset, circle, line etc. should work exactly the same in mode 0 as they do in other modes. in one dialect (tinybasic i think) the graphics commands work the same in mode 0.
this thread has nothing to do with that, of course. it's about using print-like and locate-like commands (along with strings) to do graphics, without "thinking" in graphics. you and i think in graphics just fine. other people might have an easier time using something like print, to do a row of pixels (or colored blocks.) it's a theory, anyway.
it's probably a separate download that i missed the link for. great monopoly board, after that i tried to see how much work it would take to get your solitaire game (1-card draw? no! 3-card draw? no, no, no!) to work in qb64. 1200+ lines (i can't believe you got that to load) is a lot of editing i probably shouldn't entertain the false likelihood of, but i finally gave up (after a few minutes) when i saw this line:
BLOAD "Sol3SUIT.BSV", VARPTR(Suits(1))
i ran unzip again to make sure it wasn't included. anyway, give you a week and qb64, and you can probably code the REST of windows 3.x, not just the card game. (i'm looking forward to thebob's notepad especially.)
i want to figure out a way that you and i can get more qb64 hobbyists to code *anything* (regardless of how useful it is) with graphics. maybe it's changed since qb64 came out, but the last i knew, most people on the forum didn't. i don't think pset and line and other stuff are so inaccessible, but there has to be a way. i'm going to work on those locate/print style commands and see if they make any sort of difference.
Open QB64 and switch directories to samples\thebob\sol. there you will find both Sol3.BAS and S3GFX.BAS. Run S3GFX.BAS and it will create all the graphics used by Sol3. The Sol3 link on my Example Programs page should also take you to S3GFX.BAS, or if you downloaded Sol3, the graphics utility should be included. Many of the programs I wrote in recent years have a utility program associated with them that creates all the graphics for each particular program. It basically means that everything you need is in, or created by, text files. Makes the programs much easier to simply copy from the forum.
Good luck with your "g" commands!
P.S. Try running S3GFX.BAS in QBasic. That way you get to see the graphics being created. In QB64 it's over right away!