Conversation Between Blah and karatekid552
Showing Visitor Messages 91 to 105 of 683
-
January 18th, 2014 9:17 AMBlahDid you watch the stuff I recommended?
-
January 18th, 2014 3:40 AMkaratekid552I b rite here:P
-
January 17th, 2014 10:26 PMBlahWhere u go?
-
January 11th, 2014 6:32 PMBlahHaha, sounds like fun.
-
January 11th, 2014 11:20 AMkaratekid552Haha, I'll add more explanations.
-
January 11th, 2014 11:10 AMBlahWell, from now on follow that rule. Reading files is pretty expensive :P
Looks like you figured out the image stuff, good work!
Though with those variable names and lack of comments (other then that 1 comment), I have a hard time trying to figure out what's going on. Comment it/give better names for "a,b,c,r,n" and I can probably help you cut down on it a little (6 for loops is a lot, you can probably do it in 1-2 with some recursion). -
January 11th, 2014 9:45 AMkaratekid552I would have to recode my entire program to adhere to that rule, lol.:P However, take a look at this! http://snag.gy/ghNNd.jpg
The code in the background is complicated, because I had to take a string of pixels, convert it into 8x8 blocks, then mash those blocks together into one image. -
January 10th, 2014 11:17 PMBlahWell, I don't know if it'll be more efficient to be honest. In a normal case, say if this was a text document, you'd only read once. In fact, as a general rule: Only read once.
-
January 10th, 2014 1:12 PMkaratekid552Okay, that makes sense. I'll start adding it to my code.
I don't know if it will be 100 times more efficient, since the rom is always open and buffered as a binary. -
January 10th, 2014 8:38 AMBlahYeah turn the entire ROM into a byte stream and then patch the differences when save is hit. 100 times more efficient than reading the ROM whenever something is needed.
As for the doc string stuff, it's optional but a good idea that you do it. Most programming jobs require you to write the doc string before the actual code. Formatting is like this: http://pastebin.com/ReTrWnyY
Basically:
''' (parameter) -> return type
Description of function's objective with the paramater. If no
parameter just explain what the function does. (keep it short)
>>> function_name(sample_parameter)
sample output
'''
Note that at the ">>>" you write out possible test cases as to what your function can handle. You may think that doc strings are pointless, but try running this in your python shell:
help(function_name)
You'll notice it outputs the doc string for a function/variable's type. It's a good idea to include for open source projects so people can easily expand on what you're doing and make full use of the stuff you've already written :) -
January 10th, 2014 3:38 AMkaratekid552rom is the open rom file. It is a file object that we are reading from. Obviously that has to happen a lot since we don't actually know the data length. Though, I have considered turing the entire rom into a byte stream.
-My editor only shows green comments with two #. It is an editor preference.
-I know.:p I like long names, that was I don't forget what they do, haha.
-The reason I didn't use those, was because I tried to type it all on one line at first, but it looked unclean, so i hit enter in the middle and just threw in more '#'s.:p Normally my code does make use of extended quotes.
Alright, I will let you know.:) -
January 9th, 2014 7:52 PMBlahLooks like rom.read() is doing a lot of work. Out of curiousity what does it do? 3 more things:
- you can use the green comments in Python with just a singe "#" character.
- get_bytes_string_from_hex_string() is a long ass name
- you can put in doc strings using the single quote character that this, " ' " three times.
ex:
'''
description
'''
def name()
stuff
As for the anime, they are good. Come back for more once you're done those 3 :D -
January 9th, 2014 7:24 PMkaratekid552Lz77 is a compression method, but it is super simple:
There is a 4 byte header. The first byte is always 10 to signal that it is Lz compressed. The next three are the total data's uncompressed size.
Then, there is the compressed data. The first byte is a bit field for the next 8 to 16 bytes to come. If the bit is 0, then that byte is raw and should be copied as is. If the bit is 1, that byte is a multiplier for how many times the next byte should be repeated.
I don't know if I explained that very well, so here is my code, lol:
http://pastie.org/8619316
I will look at your lists.:P I'm actually kind of familiar with all of these (never watched them, but I know them) so this should be good. -
January 9th, 2014 5:45 PMBlahYou're right, I have no idea what LZ77 is! Though from memory I believe it's image compression.
Also, here's what I'm gonna get you to watch:
http://myanimelist.net/anime/5114/Fullmetal_Alchemist:_Brotherhood
When you're done with that,
http://myanimelist.net/anime/1535/Death_Note
http://myanimelist.net/anime/1575/Code_Geass:_Hangyaku_no_Lelouch
All three of the above are available in english too if you prefer it that way. I should mention that these are typical starting anime (I actually started from FMA before this remake :D ). -
January 9th, 2014 11:45 AMkaratekid552Haha, you don't know how simple LZ77 is.:p
Ummmmmm, I think action would be best. I don't mind subtitles thar much.:)

