btw, i'd like you to have a copy of m-w's definition of programmer
by mn (no login)
pro·gram·mer noun ˈprō-ˌgra-mər, -grə-
: a person who creates computer programs
there's other stuff further down, which includes other instances or types of programming, but i hate this "i'm not really a programmer" nonsense. it's not like you invented it, and it's not just false modesty, i know you had a point, but if you're not a programmer that disqualifies too many programmers. it's time to squash that one.
if you mean "i'm not a REAL programmer(tm)," ok, i guess. i mean by some definition of "real programmer," none of us are. the only one i know is galleon. but i think one of basic's strengths is letting people who aren't "real programmers" become, well, programmers. and programmers "of a sort" are still programmers, and you are as much as we are. so unless your intention is to insult us (and i'm sure it's not,) stop being so freaking modest. it does no good at all
I suppose that compared to a lot of newbies, I would certainly qualify as a programmer. I have, in fact, written some things that not just anyone could write--for example, how many people could write a Solitaire game that actually works, graphics notwithstanding.
Okay, darn it! I accept that I am a programmer and can take my place among the lot of you with some degree of pride.
they have filters that turn images into ascii representations. you could have an interesting time converting ascii into graphics.
there are several ways you could do this. the easiest would be to create a "font" of blobs for characters that can be typed on the keyboard, then show a grid of blob characters instead of a legible text font. the blobs could be liney or blocky or round and blobby (shiny or shaded matte.)
perhaps better yet, the blobs could fit together seamlessly into shapes.
suppose i drew a circle-like figure using commas, periods, and apostrophes. either the graphics could turn this into some kind of line, or it could make each part into a 3d block or a shiny blob shaped slightly differently based on which character was used.
connecting things together would require a lot more programming, but if you were just going to replace text objects with images, you could switch between different styles (graphical fonts, block/blob/line) and/or colors, and using different characters (comma, apostrophe) would yield slightly different blobs.
rather than make this into some ultra-fancy graphical tool/filter, the concepts could be put together in a simple way, and the limitations would still allow lots of room to explore different input/output.
possibly it could even do cool things with random text. you should see what is possible with random printing of spaces, / and \ through a few difference of gaussians filters, plus aother forms of edge-detection. but this can be done without heavy algorithms and standard filter effects.
on the "bottom" of the screen is a large isometric plane. arrow keys change row and column. each section is roughly 22x22 pixels "square" (isometric, so really more of a diamond shape.) i say "roughly 22x22" because 16 or 20 could work, as could 28 or 32. but 22 seems about right for more squares + ample room for each.
i made a program once that laid out isometric cubes in a scheme like this. it plotted the "back row" (so far it would look like the "top") from right to left, then "forward" in "front" of itself for the next row, until it had a layer. then up, to draw the next layer on top the same way.
i never did make my voxel drawing program. instead i just had it plot all the cubes based on some output of tan() vs. the row and column or something. it made a really cool pattern of cubes.
you could do better than my little cube voxels. make each cube area a brick instead. you could have one that is tetrahedron shaped, one that is a sphere, one that is a longer rectangular solid oriented for each axis, you could even make ones that have more than one color. so long as they all fit in 22x22x22 or whatever standard you pick.
playing with this program might not be as cool as legos, but it would be way, way cooler than the variety of wooden blocks i had (and adored) before legos took over my childhood. bonus if there's no part of the screen that can't have a block filling it. though 30x30x30 is roughly the most array you'll get out of standard qb, unless you use files. if your block volume is 20 pixels high, that's L x 24 x W blocks on a 640x480 screen.
left-right keys for column change, up-down for row change, pgup-pgdn for layer change. enter or block-letter to place block, backspace or e to remove, any other letter could be assigned to a type of block. c could be a tetrahedron, v a toroid, b a cone, n a rectangular going east-west. you could even have three basic shapes and three rows of letter keys to change orientation and/or color.
as with the blobs program, you could start with a very simple version of this. if i really wanted to commission software i'd just commission software, but these are ideas that i'm sure you could program and they would benefit from your pixel skills. i think this one would yield you more fun than the ascii blobs idea, but who knows.
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.