Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

kellessdee

Member
  • Content Count

    1,023
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by kellessdee

  1. As soon as you started your story with a cat, I was hooked. I love cats. I definitely pictured it as a cartoon. After hearing all those crinkles not finding a mouse, I probably would have gave up and checked myself into the loony bin, lol. You should make a cartoon, called Jon Bon and Jerry; a cross between Garfield, and Tom and Jerry hehe. If I was a cartoonist I'd draw you a comic strip. Also, it's kind of interesting that your cat catches the mice a live, and brings them to you--are they always alive? Any outdoor cats I had, preferred to bring my family dead things it killed. I know one cat I had, brought us back a bunny it had pretty much skinned alive, and this cat was front declawed. My mom spent all night trying to save the poor thing. Maybe your cat just likes to play with them, and bring them home as friends.
  2. Confirmed for, a little bit of column A and a little bit of column B. In an attempt to recreate the error; this is what I came up with: s = Sprite.new s.bitmap = Bitmap.new(18400, 18400) Raises the exact same error. s = Sprite.new s.bitmap = Bitmap.new(18400, 500) No error here s = Sprite.new s.bitmap = Bitmap.new(18399, 18399) No error is raised here s = Sprite.new s.bitmap = Bitmap.new(18399, 18399) s2 = Sprite.new s2.bitmap = Bitmap.new(6300, 6300) Raises the same error again. bitmap = Bitmap.new(18400, 18400) No error bmp = [] for i in 0...500 bmp << Bitmap.new(6000, 6000) end Same error, on the 11th iteration. So, it appears to be triggered depending on: 1. the number of pixels in memory 2. whether the pixels are rendered on screen or not So, it looks like, you are either trying to render graphics WAY too big OR, you were right and you just load TOO MANY big graphics. Clearing the cache may help.
  3. Is this for RPG Maker XP? I do know (if I recall correctly) RPG Maker VX has an issue when you try to create a Bitmap greater than a certain size... Dunno if it applies to both versions. However, to answer your question: RPG::Cache.clear Will clear the cache and call the garbage collector to cleanup all bitmaps that are created from RPG::Cache.xxxxx("filename") I don't see why having too many graphic images loaded into memory would cause issues, but I don't know how RPG Maker is implemented so I could be wrong.
  4. Pajamas and textbooks. Just need some vitamin C[affeine].

  5. Oh, I forgot to comment on this: I love it. I agree, with jon bon, that it should always be persistent; and I think you should add some more (probably profile) features to it. Otherwise, great idea.
  6. You could set them to nil, just remember; before using the variables for ANYTHING, check if they are nil first: if @dest_x != nil # do stuff with @dest_x end (or you can just do if @dest_x nil and false both evaluate to "false" in any conditional statement in ruby. Everything else evaluates to "true") How about you try something like this? class Window_Base < Window def has_dest? @dest_x && @dest_y end def moved? return has_dest? ? (@dest_x == self.x && @dest_y == self.y) : false end def update # update stuff if has_dest? if moved? @dest_x = @dest_y = nil else if self.x < @dest_x self.x += 32 end if self.x > @dest_x self.x -= 32 end if self.y < @dest_y self.y += 32 end if self.y > @dest_y self.y -= 32 end end end end end Those that help any? And yes, for the alias you would have to pass the required number of parameters. When you alias the method, it copies over the definition and the parameters (I'd argue that parameters could be defined as part of the definition, but that's another story). EDIT: I missed a couple ends lol EDIT2: parent class xD
  7. Bob makes a VERY good point. And I'd like to take it a step further. Jon, I don't think you give yourself enough credit, I admire your modesty, but I would like to point this out: As member of this community, I think you are easily more valuable than I. I like to think of myself as friendly/fair/helpful (or I try to be anyways), but what I provide mostly comes down to the fact that I love programming. I love talking about, explaining it, helping others learn it, and of course, I love programming as well. So, I try to do what I can around here because I enjoy doing it. You may have noticed however, I am rarely outside of programming topics. You on the other hand, are often in a wider array of topics. And, in each of these topics all your posts are well thought out, and provide some kind of valuable input. And of course, you are friendly, fair and well-spoken. That's the one thing I think often gets lost in these MOTM polls is that it's about commemorating valuable members to the community, and I think there is much more to being a "valuable member" than providing RGSS support. I don't think saying, a good scripter is a good member is very fair. This is about the community, not RGSS. And in those respects, I feel that there are many members that are much more valuable to the community than I. It's not like I'm even the ONLY scripter. So, while I may provide a specific support, that is only one aspect of the community. I think, what you do, represents a broader aspect of the community, the community as a whole; and in those respects makes you a much more of a model member. Just wanted to say that, I hope you get my point. In a sense, sometimes it bugs me when I get nominated; I just feel that there are a lot of other members on this forum that deserve some credit.
  8. OH I figured it out! My mistake, there was an issue with the window script. However, the Scene_ scripts made me clue into this. First, I'd like to point out the fact that, the windows that are causing you issues, start out like this: #window_status class Window_MenuStatus < Window_Selectable def initialize super(0, 0, 480, 480) # ETC... end # ETC.. end # Window_Title/End class Window_Command < Window_Selectable def initialize(width, commands) super(0, 0, width, commands.size * 32 + 32) # ETC... end # ETC... end Note the most important point, is the parameters passed up to the super class: super(0, 0, 480, 480) super(0, 0, width, commands.size * 32 + 32) So, eventually, the (x, y) parameters (0, 0) in these cases, eventually trickle up to Window_Base: class Window_Base < Window def initialize(x, y, width, height) super() self.x = x self.y = y # intitialization stuff @dest_x = self.x @dest_y = self.y end # ETC... end Note: @dest_x & @dest_y are both equal to x & y respectively, and in these cases, are 0 & 0 Now, let's look at your update method: def update # stuff if self.x < @dest_x self.x += 32 end if self.x > @dest_x self.x -= 32 end if self.y < @dest_y self.y += 32 end if self.y > @dest_y self.y -= 32 end end So, what is happening, is @dest_x and @dest_y are set to 0 and 0 when those windows in question, are being instantiated. Then, you set the windows' x, y coordinates after they are instantiated. Since the windows' x/y coordinates are NOT 0, 0; the window now is "magnetically" attracted to 0, 0. Does this make sense? So, what you could do (perhaps, there are MANY options) is after setting the x/y of a window (when you don't want it to move), make a call to window.start(window.x, window.y) before its next update, that way the dest_x/dest_y are ENSURED to be the same as x/y That's probably not the cleanest way, but the only other ways I can think of, involve redesigning the entire script or modifying the default scripts (so you can pass x, y as a parameter). That might be the easiest method. If you want me to go over other options, I can do that. As for the alias thing, here's another example; it might clear some things up:
  9. I like the look and feel this game portrays, and would be interested in helping with the development. If you are still looking for a scripter, I have sent an e-mail to your specified e-mail address with more details.
  10. As I said in the chat it's more a Ruby thing, than an OOP thing (and like-wise, it's not really a "Ruby" thing, other languages of various paradigms). Although, I've noticed most programming languages have their own "rabbit-holes" if you will. Now, based on just the script you have there, I can't see anything that would lead to "magnetic attraction" to 0, 0 Have you changed the actual Scene_ script(s)? I think the issue is probably *mostly* in the Scene itself. However, it could be a combination of both; and I'd have to take a look at both of them. One thing I'd like to point out, you alias update; then override update, but you don't make any calls to the original update. You *might* want to make that call to "cms_update" so the original method can be called. Unless you want to override the method completely, then, in that case you don't need to alias. *ahem* but I don't really think that's the issue at all, as if I can recall correctly, your new version of update covers all functionality of the old update (so you probably don't need to alias the method at all)
  11. kellessdee

    How aliasing works

    Hehe, I struggle with plain explanations a lot. I've been trying to practice lately, but sometimes it's easier to just use the VCR than tell someone how it works, if you catch my drift ;)
  12. kellessdee

    How aliasing works

    Lol, you posted within a minute of me Or not even a minute really, I went back to the forums after posting and my name wasn't there haha
  13. kellessdee

    How aliasing works

    alias, does exactly what it sounds (alias being another name for something) alias merely creates a copy of the element that was defined. Consider this: class Foo def bar puts "Hello, World!" end alias hello bar end end f = Foo.new f.bar # "Hello, world!" f.hello # "Hello, world!" As you can see, they called the same method. Traditionally, alias is used to create various ways of calling the same thing like: class Point attr_accessor :x, :y def initialize(x, y) @x = x @y = y end def to_s "#{x}, #{y} end alias to_str to_s alias to_string to_s end Now, Point can be formatted as a string with #to_s, #to_str or #to_string Now, traditionally, in the RPG Maker XP world; alias is significantly more popular, and much more significant. Since for the most part, a lot of makers put a bunch of scripts together (written by different people). This is fine, but what happens when one script redefines a classes initialize method, and another script does the same thing? Well, only the one later in the script editor is gonna be called, as the method is redefined (overwritten completely). So, how do we get around that? 1. copy the old method into a new method. 2. redefine the OLD method 3. call the new method (which is the OLD method) class Scene_Map def initialize # default initialize end end # I want to do some more stuff with initialize, and share it! class Scene_Map # initialize is copied to my_new_init alias my_new_init initialize def initialize # initialize is overwritten # do some new stuff my_new_init # calls old initialize (from my_new_init end end Now, different programmers code is less likely to interfere; as they aren't overwriting each others work. Note, inheritance doesn't work here because it MUST be Scene_Map (for it to work in the RMXP engine) Hope that makes sense EDIT: @bigace: you have a good demonstration of it's possible usage, but *technically* it doesn't let you add more to the method; that's just one thing you CAN do with it. It just copies the method (conceptually, there are more to the internals, but you can look at it this way, because redefining one of the symbols, does not redefine BOTH symbols).
  14. You make a very good point here. However, now that websites are pretty much forcing users to create passwords with upper + lower + numbers or something, wouldn't that mean dictionary based attacks would require the attacker to create dictionaries with combinations of such things? For example, with an entry in the dictionary like bananas, for most cases would be a useless attempt, because there isn't a single password in the database that is ONLY lowercase letters. With that aside, you still can't deny that the length of the password is where its true strength lies. For each extra character, you are exponentially increasing the number possible combinations. But, then again, increasing the number of possible options (i.e. just characters vs. characters and symbols) adds another level of exponential growth hmmmmmmmmmmmm. Let's crunch some numbers: let's say, for sake of argument, we have 52 letters (upper + lower) and 10 numbers and 33 symbols (I think that covers a standard US keyboard, but I may have miscounted. I am including space; and of course ignoring carriage returns, line feeds, etc) so in total that's 95 possible options, for a single "digit" of the password. so, let's say the minimum length of a password is something like 8 characters: All possibilities = 895 = 62165404551223330269422781018352605012557018849668464680057997111644937126566671941632 Just letters = 852 = 91343852333181432387730302044767688728495783936 And 16 for max: All possibilities = 1695 = 2462625387274654950767440006258975862817483704404090416746768337765357610718575663213391640930307 227550414249394176 Just letters = 1652 = 411376139330301510538742295639337626245683966408394965837152256 Well, Fzer0 you've just changed my mind about not using symbols or numbers. But, then again (I could be wrong) I'm not sure how many people use brute force for anything other than wifi networks (nowadays anyway) where, especially if you are using WEP encryption it literally does become a counting exercise for the CPU. I think the most important thing is to inform people of social engineering. Phishing and such are HUGE now (I once got a call from some guy claiming that he worked for Microsoft Windows, and that my computer was sending them reports of being infected with viruses LOL. I played with him for a bit, until he realized it wasn't going anywhere...and he got mad at ME for wasting HIS time); or for example how dangerous it *can* be to use a public wifi network; considering connections over wifi aren't encrypted and packet sniffing becomes easy as pie. The unfortunate thing, is that, phishing works far to well. Or my favourite tactic I've seen, once I found a random website, that just mimicked facebook's login page, and was logging the username and password fields. Their site directory was open, so I downloaded their log file and saw that there was roughly at least 5-6 people who fell for it. And, what you said about whether it matters having an account hacked, is very, very true. I would only worry if someone broke into an account that stores very private information. All my meaningless accounts (even my emails for that matter) I mostly use false information. Unfortunately with financial/government accounts, that has to be real and very private data :( (and then, of course, most of it is linked to some e-mail) @fox: It really depends on the website. No one is forced to encrypt passwords. And even so, to encrypt something, you need some kind of routine for encrypting it and another routine for decrypting it, which must exist somewhere around the website. It might be on the Database level or on the Website level (or something) Assuming the encryption/decryption routine is done at the database level; if someone gets the database, they have those routines. So now encryption is moot, since they just have to use that routine to output decrypted passwords. Assuming it's on the website level; then they may be able to easily acquire the routines anyways. So really, encrypting passwords may or may not even be beneficial. Making CERTAIN that the actual database cannot be acquired is more important. But, my cryptography knowledge is lacking as well, so I cannot say for certain as to what is more beneficial (and then, you get into many different ways of encrypting data....) @jon bon: Your point of fraud/identity theft is actually a VERY good point. I think, the biggest misconception about hacking, is that while there is "tech" ways to get into systems, most actual hacking that involves getting passwords, usernames, etc. Actually involves social engineering, and unless the target has very poor security, I'd say in most cases, the "tech" way is pretty inefficient, and not worth the headaches. The weakest link (*most* of the time, assuming there's some kind of decent security implemented) to ANY security system is PEOPLE. I wonder how easy it would be to call into somewhere, pretending to be a certain user, and sweet-talking the person on the other line to give you some password or way in. Or, like I said about phishing, send an e-mail pretending to be someone important; asking for a username and password. Most people might say "whoa, no way!" however, it's not that hard to set up some kind of spam server, and eventually (especially if the email looks legitimate enough) someone's going to get tricked into sending a password. Also, that's another thing: How far does password guessing work, if you don't know anything about the person OR especially if you don't know their username. Now you need a username AND the right password that matches THAT username. If you have a specific user you are targeting, that's not AS hard. Take banks for example, most require you login using your account/card number and a password. While getting an account number is still possible, it's much more unlikely for someone to know your card number (especially if you don't use that number online....) than it would be for them to know your e-mail address, or RMXPU username. Nonetheless, I guess it's very important people think about these things. You can never assume that that information cannot be acquired. Because, most likely, it can.
  15. Hahaha, what you said about Males vs. Females role-playing is so true. And in fact, playing with my sister, that's basically what it was--she was the only female and it often came down to: "LET'S KILL THEM" "No, we shouldn't fight!" etc. And I think this type of psychology transcends role-playing. Of course, this is not really sexist, it's just males and their testosterone. Also, The Hobbit reference makes this song that much better, The Hobbit was definitely one of my favorite novels; and it puts a fun spin on the parody indeed. ah, no, my response was worded funny. When I was commenting on your proficiency in English, it was basically pointing out that, as you said, most non-native English speakers "suck" at it (which is why I was curious as to whether English was your native tongue or not). I meant, that I had no right to say they "suck" at it, because I am not bilingual, and have issues with English sometimes myself, and in actuality I'm impressed by your level of control of the English language. Your response was quite adequate.
  16. And thanks for another one. The lyrics remind me of the few times I've played Dungeons and Dragons. Once, I was playing with my Sister and some friends (my older brother was the Dungeon Master), and she thought it would be a good idea to try and reason with a pack of kobolds. Needless to say, they decided to ambush us instead xD Was the last bit a reference to The Hobbit by J.R.R Tolkien? Yes, indeed; I didn't have any right being so blunt about it though; since I only speak English and even as my native language it trips me up enough. I have a friend who can speak French/English, but he sucks at writing in English (I've never read his French, nor can I read French, so I can't comment on his French writing abilities). Although, it's cool because I get to use him for practicing my proofreading abilities (or lack thereof). hahahaha oh my, I like your response :) that probably caught them off-guard.
  17. I liked that, and it was nice of you to translate. Dramatic/Epic tone, with humorous lyrics. [OFFTOPIC] Is French your native tongue? Just out of curiosity, because you write in English very well.
  18. I just +1'd you Because I really wanted to know what I was doing wrong :D
  19. Mark, I really really hope you are right. To be honest, I've been trying to find info online myself (He mentioned once where he lived to me). Unfortunately, I think, this is something that only Kiriashi himself could disprove (unfortunately, it's much easier to find records of people dying as opposed to records of people definitely being alive) So, I dunno. I hope you are right, but I guess it's on the table until we find something definite. If he's okay, I hope he comes back soon; if not, I only can wish the best for his family, and say that I'll miss those times when he would finally return here and be an awesome member and such.
  20. wow, I am so GLAD I didn't go for finance. I've been trying to work this out, and I just can't get it. This hurt my algebra-esteem :( I even tried working backwards from the end, to get to the start. Either this is terribly contrived, or I was never as good at algebra as I thought. Or it's some kind of financial mathematical formula. For some reason, any kind of financial math makes me wither up and die inside. My last math course, the midterm (all computer math) I got 100%, the final exam (mostly financial math) I got 50%. I don't even get it, it's all math, but for some reason my brain just doesn't like monetary formulas.
  21. Yea fox, I wouldn't necessarily advise converting scripts over to take advantage of it; unless it makes things work better. But to expand on what pearl is saying, it's all about Ruby's concept of metaclasses. consider this: class Foo def self.bar "bar" end class << self def do_something "do something!" end end end def Foo.something_else "something else!" end Each method definition, essentially, defines a class method for Foo: Foo.bar Foo.do_something Foo.something_else Would work, but an instance of Foo could not call those methods...however, you can get the class of Foo conveniently from an instance: f = Foo.new f.class.bar Would work. The metaclass (or, sometimes referred to as the "singleton class" which I don't like that term because it reminds me too much of the singleton pattern, which is not EXACTLY what it is), is essentially an anonymous class that Ruby constructs behind the scenes, kinda like a parent class of class Foo. However, it only acts as a parent in terms of the class scope, not instance scope. This is because, Foo, nothing more than a constant instance of the class Class. Remember, everything in ruby is an object: irb(main):017:0> Foo.class => Class irb(main):018:0> Foo.superclass => Object irb(main):019:0> Foo.class.superclass => Module irb(main):020:0> Foo.class.superclass.superclass => Object So, Foo is an instance of Class, which inherits from Module, which inherits from Object. However, Foo inherits from Object. Which might explain why, if you look at Ruby's documentation for class and look at the (not so) pretty diagram: +---------+ +-... | | | BasicObject-----|-->(BasicObject)-------|-... ^ | ^ | | | | | Object---------|----->(Object)---------|-... ^ | ^ | | | | | +-------+ | +--------+ | | | | | | | | Module-|---------|--->(Module)-|-... | ^ | | ^ | | | | | | | | Class-|---------|---->(Class)-|-... | ^ | | ^ | | +---+ | +----+ | | obj--->OtherClass---------->(OtherClass)-----------... http://www.ruby-doc.org/core-1.9.3/Class.html And it goes even deeper than this... *Ahem* But, if you want a good introduction: http://www.infoq.com/presentations/metaprogramming-ruby It's a nice video + slideshow presentation on introducing metaprogramming in ruby. It's only an hour long, with examples and explanations. Still an introduction, but a very good one.
  22. and then suddenly we realize, we're admitting to the man who controls our passwords, that we use the same password for everything. Not to spread any conspiracies or anything.
  23. I thought I took Cultural Anthropology, not Culture of Snuff Videos :S

    1. kellessdee

      kellessdee

      @marked: LOL, I always had an issue with taking "art" in school. I personally don't believe it's something that can be taught, and if you're an artist you should just go be an artist. But, also, I have no idea what they teach in art classes

    2. Marked

      Marked

      By art i mean like... cultural studies, mass communications, american studies, etc. These things are in the college of arts in nz

    3. kellessdee

      kellessdee

      Oh, well, I still stand by my statement; and I still agree with your statement. Unfortunately the gov't likes to enforce taking general education courses. I had to take 2 this term, and I only had 2 options: cultural anthropology and short stories :( At least I get to practice my writing abilities, I guess.

    4. Show next comments  6 more
  24. I think you did a pretty good job of explaining ruby's meta-programming facilities. I mean, you only scracthed the surface but I don't know how you feel about writing an essay about how deep that rabbit hole goes...And I think I might be the only one insane enough to read such an essay. Metaprogramming, as moonpearl was saying is simply, is you're basically writing code, that kinda writes code. And that's 2 aspects of it: In terms of ruby (or, i.e. languages with the ability to metaprogram themselves, which is also referred to as "reflection" or "reflexivity") which more leans to the side of you are actually manipulating the code itself at run time or the ability to "peer" into the runtime itself; through code In some languages/applications this is deemed dangerous (we're talking embedded systems, C and that fun stuff...would you want the software that's preventing your car from crashing to be modifying itself would you?) However, technically, C could be used to "metaprogram" other languages. Hell, RPG Maker does a lot of metaprogramming for you. Think about eventing, the database, etc. You click and point, and suddenly your project DOES stuff (that requires code, no?) and you didn't write a lick of code. Just like any popular IDE -> you start up a project, suddenly there's a bunch of source code, some makefiles maybe or other build systems...and all you did was say "File > New Project... > Some Project Type" (which is a love-hate relationship for me. I trust machines to do what their told, but I don't always trust others to tell them to do the right thing xD) That's the other end of the spectrum; writing programs to write other programs (well, more in terms of getting it to all that automated boring stuff...who seriously wants to spend all day typing out data classes for their game?) Or that boring stuff like xml, html, SQL. Sure, they're easy, but pretty damn boring -> so just make a program that writes it for you (I am a firm believer that xml WAS NOT intended to be written by man, but by machines) If you REALLY wanna get into meta-programming I advise learning any dialect of Lisp (scheme is probably the minimal, and easiest dialect to learn, or so I've heard. And I've heard great things about how functional programming languages play very nicely with concurrency) Lisp is really neat, and works perfect with meta-programming. Lisp code, although obscure looking, is actually written in essentially what the ruby interpreter might turn your code into, before it can start executing stuff (Abstract Syntax Trees and all that goodness)....so really, Lisp code can be walked through, executed or manipulated directly with Lisp, since it's pretty much already executable lisp. When you hear something like, a Lisp interpreter completely implemented in Lisp, then you might see what I'm getting at. That's good; and I really hope your last sentence isn't true. In my opinion, there is a very fine line between being an artist and an engineer, in terms of programming. Being able to write elegant, concise yet simple solutions (therefore maintainable and scalable, solutions) is a key ingredient to being an engineer (that's what software design is all about, and why it's always a bad idea to skip that step) So, I think, by your definition I would almost call you just as much an "engineer" as an "artist" (I won't, however, call you an architect, they just like to draw diagrams with fancy lines and arrows. Just kidding, I like diagrams with fancy arrows :(modelling's pretty fun...not what I'd want to do for living, but sometimes a picture really is worth a 1000 words. And they can save you a 1000 lines of code if they're real good. Okay, maybe not that much...but maybe) Like Joel Spolsky likes to say: "No code without specs!" END RANT This was a pleasant conversationtangent I hadwent withoff on you guys Time to go home, I have homework to do and ironically, it's not here with me at school.
  25. That actually sounds quite genious. As per most WPA2 cracking utilities, most people try to only work with certain ranges of characters, to try and avoid wasted time/cpu power. I wonder if anyone would even think of letting the thing try 1 character password! I'll be the first to set my password to 1 character! This is true. However, if you REALLY wanna get those people, just send 'em an email saying you're a facebook admin or something, and you need their password, blah blah. I think phishing is *probably* the most popular method of stealing passwords. I didn't mention that, only because with phishing, once you send out your password it's all over but the crime. It doesn't matter how long, how complex, etc. Well, indirectly. There are still a lot of websites that say "hey you should make your password stronger!" and don't enforce, and some that actually force it. I think it's 6 of one, half a dozen of the other. I was never "taught" passwords either. It's just from signing up everywhere (hotmail, gmail, whatever) that's indirectly taught me that "I'd better make a really weird looking password!" But alas, it's a good point you're making anyways. People should be forced to make stronger passwords; but technically speaking, adding foreign characters only protects you from people trying to guess your password. actually, I think there SHOULD actually be password education. Train people not to use stuff that's easy to find just by running a quick google search. But seriously, the TRUE issue isn't weak passwords. It's password reuse. Here, xkcd explains it to elegantly for me to try and explain: http://xkcd.com/792/
×
×
  • Create New...