Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DATA 00,00,00 oh boy
#1
I hate to have to ask this buttttt


Code:
screen 7
cls
data 00,00,00,00,00,00,00,00,00,04
data 00,00,00,00,00,00,00,00,04,00
data 00,00,00,00,00,00,00,04,00,00
data 00,00,00,00,00,00,04,00,00,00

ylength = 4
xlength = 10

  for y = 1 to ylength
    for x = 1 to xlength

     read z
     pset(x, y) , z
    
      next
next

now 3 questions

# 1 . if I make this a 20 by 20 I get out of area or somthing
Why can I not get the data that big ?

#2 . if I want to put a complete set of new data statements & read statement then how can i do it without erasing the whole screen?

#3 if I want to place this picture at say the bottem of the screen how can that happen ?

I know I probably am overlooking the answer. I think alot of my questions could be answered by putting it into a varriable & dimming it & then psetting it on the screen.

I never really fooled with graphics at all & when I did it was lines circles & yes even draw..
Also your talking 15 years ago Sad
I know there is a hundred ways to do it so lets see it 8)
unescape.com
Massive online role playing game
Free to play
Reply
#2
Bluffer- No offence... but I don't understand what you are trying to say! Reword it, and then Na_th_an will probably help you... or, you know, someone else will...
ovaProgramming.

One night I had a dream where I was breaking balls. The next morning, BALLSBREAKER was born.

Quote: Excellent. Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Reply
#3
yes, someone else. Ok, for the array problem, make sure you dim the array to the correct size (20,20), have the correct number of data entries (20 Data's with 20 entries in each), and have the right ylength and xlength. Those are the only things I can think of that would cause that problem.

About erasing the whole screen, Im not sure what your talking about. If you mean it erases the whole screen and you don't want it to, then you prolly have an unwanted CLS in there somewhere. If you mean you don't want to have to erase the whole screen but you want to get rid of the PSETed graphics, then just draw a line like this: LINE (1,1)-step(xlength,ylength), 0, BF .

About placing the picture at the bottom of the screen, there are two things you could do. One, you could GET (1,1)-step(xlength,ylength),arrayname and then PUT (150,180), arrayname, or you could, while your reading the data, pset it to the bottom of the screen like this: Pset (x+150,y+180), z

I those answers didn't answer your questions, then please reword them and ask again. Big Grin
url=http://webberboy.no-ip.com]Fine Hand-Crafted Pens[/url]
Pneumonoultramicroscopicsilicovolcanoconiosis: Noun, A hypothetical, invented disease of the lungs, caused by inhaling mineral or metallic dust, such as silicon and quartzite, over a long period.]
Reply
#4
Code:
screen 7
cls
data 00,00,00,00,00,00,00,00,00,04
data 00,00,00,00,00,00,00,00,04,00
data 00,00,00,00,00,00,00,04,00,00
data 00,00,00,00,00,00,04,00,00,00

ylength = 4
xlength = 10

  for y = 1 to ylength
    for x = 1 to xlength

     read z
     pset(x, y) , z
    
      next
next

DIM pic(xlength , ylength)

get (0,0)-(xlength , ylength), pic
cls

put (x,y),pic

screen 7,0,1,0

while x < 270
put (x, 100), pic
pcopy 1,0
cls
x = x + 1
wend

most of this came from a tutorial I found last night from Mallard
even though the WHILE & WEND is probabaly out dated & maybe all of this is out dated Sad
But hey I'm outdated as well 8)

Does this look right ?
unescape.com
Massive online role playing game
Free to play
Reply
#5
Well was this right ?

also how would you go about putting two completly differant pictures on the same screen. To clarify it :
Have 1 set of data for a piture of a mouse.
Have another complete differant set of data for a cat.

& be able to have the cat chase the mouse ?

8)
unescape.com
Massive online role playing game
Free to play
Reply
#6
Hey Bluffer! What's up?

For that,...
What you want to do is make two arrays.

You could name one MousePic and the other CatPic...

...But why would you want to use screen 7? If it's because of the PCOPY Function, then I would reccomend looking at one of the QB libraries. Wink It'll make your shyt a whole lot eezyuh! :lol:
Reply
#7
Quote:Well was this right ?

also how would you go about putting two completly differant pictures on the same screen. To clarify it :
Have 1 set of data for a piture of a mouse.
Have another complete differant set of data for a cat.

& be able to have the cat chase the mouse ?

8)

like was said, you need two arrays, one for the cat, one for the mouse. you also need two variables, one for each. I would call them mousex and catx, or something similar. Then do this:
Code:
catx=somenumber
mousex=somenumber + 20

do
  put (catx,100),catpic
  put (mousex,100),mousepic
  play "mfp64"    'or you can use some other pausing code
  cls
  catx=catx+1
  mousex=mousx+1
loop until inkey$<>""    'wait for keypress
url=http://webberboy.no-ip.com]Fine Hand-Crafted Pens[/url]
Pneumonoultramicroscopicsilicovolcanoconiosis: Noun, A hypothetical, invented disease of the lungs, caused by inhaling mineral or metallic dust, such as silicon and quartzite, over a long period.]
Reply
#8
8) thanks guys 8)

Hey Dr.

One more little question, While & wend is it to ld or out dated to use ? I grew up using them & had no prob.
I like DO & LOOP too but why cant I use it without peeps saying " What The Crap"

or is it aceptable today ?
unescape.com
Massive online role playing game
Free to play
Reply
#9
While & Wend are included in the help file... I just never chose to use them for some reason...As far as I know, there isn't one thing wrong with using that style code... hell, it might even be faster for certain things...anyone ever tasted it against the other flavors?
Reply
#10
Do Loop is the fastest.

Or actually:
Code:
Label:


If Condition Then Goto ExitLoop
Goto Label:
ExitLoop:

Is the fastest, but also the messiest.


Although, I don't know if it's faster if the program is multisegmented, never used it in such large programs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)