data

Blitz3D Forums/Blitz3D Programming/data

Oiduts Studios(Posted 2008) [#1]
how in the heck do you know what to do when you right data lines? is there a program? I would like to kno..


Gabriel(Posted 2008) [#2]
Generally it depends on what I'm trying to put in there. Frankly, I don't find the data statement particularly useful any more for anything more than a quick test.

What do you want to use it for?


Oiduts Studios(Posted 2008) [#3]
just wondering, i was looking at some code in the archives and most of it is lines of data. I was just wondering if its easier. And how do you get those numbers?


Gabriel(Posted 2008) [#4]
Well you don't provide a link, so I don't know what entry you're looking at. When I use the data commands, they're just that, a few numbers I want for some reason.

People have written programs which allow you to convert an image into data statements, but it really doesn't serve much more than a novelty purpose for general usage. You increase the time it takes to compile your program, and you bloat your source code, and for no real benefit except a little satisfaction.

However, in the code archives, it may be that people have done this because you cannot upload images and other accompanying files to this site, and so it may be that they've done it so that the source contains everything you need. Again, no doubt with a program they've written. I imagine the program would be included with or nearby the entry in question in that instance though.


Oiduts Studios(Posted 2008) [#5]
where can i get a converter to turn an image into data?


Neochrome(Posted 2008) [#6]
you mean turn an imagine into Byte values?

data 000,000,123,012,020....... so forth?


Oiduts Studios(Posted 2008) [#7]
yes


WolRon(Posted 2008) [#8]
"Visual Blitz" had a decent built-in image-to-data-statements convertor.

But don't bother trying it yourself. Definitely use a convertor. By the way, converting an image into data statements takes up typically 3-10 times as much storage space versus leaving it as an image.

By the way, if you'd like an example of how to use data statements, you can check out my 2D platformer example at my website. It may help you understand better how to use them and why you (may) use them.