Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just wondering some stuff on Pixels
#1
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
Reply
#2
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.
Reply
#3
Code:
screen 13
PSET (100,100)
PSET (102,100)

it feels nice to help.
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#4
He's talking about getting sprites, not plotting them Tongue

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:

Code:
Dim MySprite% (129)

Then read those FAQ entries:

http://faq.qbasicnews.com/?blast=MaskingAndSprites
http://faq.qbasicnews.com/?blast=SuperPu...enThirteen

It should get you started Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
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.
[Image: chav.gif]
Reply
#6
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 Big Grin or three.

But I agree, it's a bit ambiguous.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#7
Quote:He's talking about getting sprites, not plotting them Tongue

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
Reply
#8
Maybe Big Grin In fact, it's very possible.

We'll never know if this guy doesn't post back again Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#9
Dio, he posted this in the QB Programming Help section, so FB code will probably be useless to him.
Reply
#10
Quote:
na_th_an Wrote:He's talking about getting sprites, not plotting them Tongue

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! Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)