Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Zhol
21
Years of Service
User Offline
Joined: 30th Mar 2003
Location:
Posted: 1st Apr 2003 10:56
Material: 1 image 20x20 pixels
code: read data
what I need? I would like to create a data block and paste the image in the section I have set values for, so it can tile a large section of the screen. This is what I sort know in theory...

'code in generally speaking
For
read ' I guessing this is where the read would go to do this
next

'data block
data 0,1,1,1,0
data 0,1,1,1,0
data 0,0,1,0,0
etc...

If I'm on the right track, could some one help explain how I could get the image to paste in the set place of the data block where the 1's are set.
Thank you to whom ever took the time to read this and
decided to help me with this read data setup.
When the dark angel come's a knocking, don't be shy, let'm in.
DangYankee
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location: United States
Posted: 1st Apr 2003 21:04 Edited at: 1st Apr 2003 21:08
Let me see if I understand you right:
You want a 20x20 image that is comprised of say for Illustration :
01010010101010101010
11010100101011101111
20 lines down ...... 0=off 1=on for the purpose of tiling the screen?
I don't see why you would want to do it that way because, well it doesn't have any colour data and it seems rather crude but hey. Why not just use a paint program to do the image? I might be missing your point or reason. Then simply use the LOAD IMAGE then GET IMAGE command.

It's not the size of your code but how efficiently you use it!
bushsucks
21
Years of Service
User Offline
Joined: 8th Mar 2003
Location: United States
Posted: 1st Apr 2003 21:53
I think DangYankee may have misunderstood what you're trying to do (and I might of,too,it's a little unclear what your trying to do). I think you are trying to paste the same image several times on different parts of the screen to create a tile-effect. IF this is what you are trying to do,then your code could do that, however there may be a better way(but I don't know it)

don't re-elect bush
Zhol
21
Years of Service
User Offline
Joined: 30th Mar 2003
Location:
Posted: 13th Apr 2003 10:10 Edited at: 13th Apr 2003 10:25
Yeah, I was trying to paste the image in a tile-effect, but I wanted to use a data block as a map. Someone gave me some code. Now I'm working on saving data and reading data. Thanks for your help though.

the data block would be like this

data 01110
data 00100
data 00100

See how it makes the letter T? The image could be pasted where the ones are to form that shap. So I could do this if I wanted to create a rpg old school game and have three or more data maps to fill in stuff like walls, grass, buildings etc.

Another ex:
data 111111111111
data 110000000011
data 110000000011
data 110000000011
data 110000000011
data 110000000011
data 111111110011

if you look at it, you can see I've made a wall with the ones and the 0 is the space open to walk on. The 0 could be a another number like 3 for another image to be tiled there like a rock.



I hope this is a little clearer. Anyhow, thanks again.

When the dark angel come's a knocking, don't be shy, let'm in.
Chaos
21
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 13th Apr 2003 19:53 Edited at: 13th Apr 2003 19:56
sorry ignore this

Darkworlds are all around us
most of us are still half asleep
Current project : Creature tournament

Login to post a reply

Server time is: 2024-09-20 06:42:55
Your offset time is: 2024-09-20 06:42:55