Posts: 37
Threads: 4
Joined: Feb 2005
Hey guys, remember me. I have been off a while. So whats up. I just wanted to once again thank everyone who had helped me out last year when i was doing my school prjoect.
Anyhow, i have delve into learning Q-Basic a bit deeper, and lately i have been learning about pixels. Now i was wondering if anyone here could help me get more than 1 pixel on the screen. Is this even possible, i really don't know.
ill Gates time is almost up.... i am taking over
Posts: 320
Threads: 24
Joined: Feb 2005
Try running this:
Code:
Screen 13
Cls
do
for loops = 1 to 1000
pset (rnd(1)*320, rnd(1)*200), rnd(1)*256
next loops
loop while inkey$ = ""
.14159265358979323846264338327950288419716939937510582709445
Glarplesnarkleflibbertygibbertygarbethparkentalelelangathaffendoinkadonkeydingdonkaspamahedron.
Posts: 650
Threads: 26
Joined: Aug 2004
Code:
screen 13
PSET (100,100)
PSET (102,100)
it feels nice to help.
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Posts: 6,419
Threads: 74
Joined: Mar 2002
He's talking about getting sprites, not plotting them
Take a glance in the QB help file at the GET command:
http://qbasicnews.com/qboho/qckadvr.ggx.shtml
If you are working in mode 13h (SCREEN 13) you should remember that the array dimmension required if you are using integers is ROUND UP[(width * height)/2] + 1, i.e. for a 16x16 sprite you need to DIM an array this way:
Then read those FAQ entries:
http://faq.qbasicnews.com/?blast=MaskingAndSprites
http://faq.qbasicnews.com/?blast=SuperPu...enThirteen
It should get you started
Posts: 484
Threads: 14
Joined: Apr 2005
Quote:get more than 1 pixel on the screen
its not clear what he means, this is an ambiguous statement.
EVEN MEN OF STEEL RUST.
Posts: 6,419
Threads: 74
Joined: Mar 2002
I think that it's quite obvious that if a guy knows how to plot 1 pixel on the screen he knows how to plot two
or three.
But I agree, it's a bit ambiguous.
Posts: 650
Threads: 26
Joined: Aug 2004
Quote:He's talking about getting sprites, not plotting them
i had a feeling...
maybe he means:
FB
Code:
dim x(1000)
dim y(1000)
dim ox(1000)
dim oy(1000)
screen 13,,,1
i = -1
do
i = i+1:y(i) = i
loop until i = 199
do
for i = 0 to 199
oy(i) = y(i)
ox(i) = x(i)
x(i) = x(i) + int(rnd*6)
y(i) = y(i) + int(rnd*3)-1:if y(i) > 199 then y(i) = y(i) - 200
if y(i) < 0 then y(i) = y(i) +200
if x(i) > 319 then x(i) = x(i) - 320
pset (ox(i),oy(i)),0
pset (x(i),y(i))
next
for ii = 0 to 10000000:next
loop
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Posts: 6,419
Threads: 74
Joined: Mar 2002
Maybe
In fact, it's very possible.
We'll never know if this guy doesn't post back again
Posts: 254
Threads: 8
Joined: Apr 2005
Dio, he posted this in the QB Programming Help section, so FB code will probably be useless to him.
Posts: 3,522
Threads: 189
Joined: Dec 2003
Quote:na_th_an Wrote:He's talking about getting sprites, not plotting them
i had a feeling...
maybe he means:
FB
Code:
dim x(1000)
dim y(1000)
dim ox(1000)
dim oy(1000)
screen 13,,,1
i = -1
do
i = i+1:y(i) = i
loop until i = 199
do
for i = 0 to 199
oy(i) = y(i)
ox(i) = x(i)
x(i) = x(i) + int(rnd*6)
y(i) = y(i) + int(rnd*3)-1:if y(i) > 199 then y(i) = y(i) - 200
if y(i) < 0 then y(i) = y(i) +200
if x(i) > 319 then x(i) = x(i) - 320
pset (ox(i),oy(i)),0
pset (x(i),y(i))
next
for ii = 0 to 10000000:next
loop
WHAT THE F....
Is that a FOR/NEXT delay!?
You evil heathen! Get out of here! Go away!
Kill him!