This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Builderboy
Pages: 1 ... 269 270 [271] 272 273 ... 375
4051
« on: June 07, 2010, 04:41:44 pm »
I think i could write a pretty good tutorial on RunLengthEncoding. I am very familiar with it since i "invented" it by myself way back when i made the original Portal (I didnt invent it But i came up with the idea on my own).
4052
« on: June 07, 2010, 04:19:14 pm »
Yeah that might be really cool I think i am going to stick with my RLE though, as it provides a lot more compression, even if it does only allow 16 tiles (plenty for what i need) And as for RLE, its a maximum of 16 tiles, it could be as low as one. The way it works is this, say you have a map 0000000 0-----0 0-----0 0000000which looks like this in memory 00000000-----00---00000000A pretty simple map with 28 tiles, but there is a lot of repetition, so lets compress it into this 805-205-80
which might look like gibberish, but here is what it means, first take the first 2 numbers, 8 and 0. What it means is that there are 8 of the 0 character at the beginning of the tilemap. The second part looks like 5-, which says that it is followed by 5 of the - characters. You do this for the entire map and you end up with some good compression, depending on the map design of course. I use 1 byte per grouping, which means i have 1 byte to say what the tile type is, and what the length is. I use 1 half of the byte for each, so i can have a maximum length of 16 tiles, with a max of 16 different tiles. You can push these values around a bit if you have less or more tiles you want to work with, but it gets worse and worse compression the shorter you make the length. So at the worst, this compression gives a single byte per tile
4053
« on: June 07, 2010, 04:01:47 pm »
Ah i see. That would work So you would have a byte per tile, and instead of having 256 different tiles, you would have 32 different tiles with 8 different characteristics.
4054
« on: June 07, 2010, 03:54:26 pm »
That gives you 3 bits extra for data or something.
Hmmm? Now im confused, where are these 4 bits coming from?
4055
« on: June 07, 2010, 03:46:44 pm »
I would recommend against posting any portion of code until you get the OK from DJ, i think this was frowned upon last contest, so im not sure.
4056
« on: June 07, 2010, 03:43:00 pm »
One thing i would recommend from experience is to consider using 4x4 tiles, it makes collision SO much faster, as you only have to divide by 4 instead of 5.
4057
« on: June 07, 2010, 03:41:17 pm »
That could be done, but in this case, it loses the biggest advantage which is more tiles. If you have to de-compress it, this doubly defeats your program, because instead of saving those bytes, you have to make a large enough buffer inside your program in order to contain all of the bytes. Unless you absolutely needed those 16 extra tiles, it doesn't seem to be worth it.
True, the disadvantage to decompressing means that you have to have 2 copies of the map, one thats in your program and one that is in memory. But say you used L1 to store your map buffer, you could have over 700 tiles in your map matrix with no detriment to your program size, it only includes the compressed data, which is significantly smaller.
4058
« on: June 07, 2010, 03:22:51 pm »
Well no matter what your storage is, you can then decompress it into a matrix buffer so that you are working with simple bytes and not this weird byte thingies. PortalX uses RLE where up to 16 tiles can be stored in a single byte, and i find that it offers much more compression that tile squeezing. However its not random access so it has to be decompressed at the start of each level, and stored in byte form.
4059
« on: June 07, 2010, 03:01:07 pm »
I have such a selective taste i have barely 100 songs in my playlist
4060
« on: June 07, 2010, 02:59:48 pm »
How would you store the data tho? Since 37 isnt a full byte (255) you would have to either do some very tricky modular arithmatic to even get the numbers out of memory, or just store them in a byte, which kind of defeats the purpose of using 37 in the first place.
4061
« on: June 07, 2010, 02:50:03 pm »
Congrats on the feature! You deserve it
4062
« on: June 07, 2010, 02:46:12 pm »
If you wanted the compression of half byte, but still wanted the ease of use, you could store your data as half byte, and then decompress it into single byte for ease of use. (Even i dont use half byte in portal because its so much of a hassle )
4063
« on: June 06, 2010, 04:24:32 pm »
Is it enlarging by 2 only? Then i can think of a way, let me pull something together...
4064
« on: June 06, 2010, 04:21:29 pm »
I tried '7IN INTO CM' and it gave a syntax error i also tried '7 IN INTO CM' and '7 In Into Cm' and '7In Into Cm' and they all gave syntax errors and when i press goto it just goes to the program
4065
« on: June 03, 2010, 09:04:44 pm »
Oh whoops, didnt see that there was another page, sorry about that I havent had anyproblems witht eh scroll feature so far but i'll holler if i encounter any!
Pages: 1 ... 269 270 [271] 272 273 ... 375
|