• Advertisement

bob_the_third

Member
  • Content count

    304
  • Joined

  • Last visited

Community Reputation

122 Neutral

About bob_the_third

  • Rank
    Member
  1. [java] Eclipse Questions

    Cacks, I can only fully answer (2), as I've not done anything with Ant myself (though Eclipse is supposed to support something having to do with Ant). The refactoring feature in Eclipse is very useful. It doesn't have to do with improving your code, so much as changing it consistently. Suppose you have the variable "x" in your code about 235 times in various functions, methods, etc. You decide after 2 months of development to change "x" to "hitpoints" because it is a more meaningful variable name. You could: A) Go through your code line-by-line and change all the variable names "x" by hand to "hitpoints"; B) Use Find-Replace to change "x" to "hitpoints" C) Right-click on an occurance of the variable "x" in your code, select "Refactor," and using that option, rename the variable to "hitpoints" B and C are the only safe options, because with A you might miss an instance or two. B will work, but sometimes it will catch stuff you don't want, like text, comments, or parts of names (like "extra_lives," etc.). So what you really want is for Eclipse to rename it for you, since it knows what's a variable, what's a comment, what's text, etc., and can do the job cleanly. That's one reason to use refactoring. Besides variable name changes, you can change the variable type declaration (int to float, etc.), or you can rename a class, or method, or even change a method signature. For example, you can add or remove method parameters ( "foo(int x)" can be changed to "foo(int x, float y)" ). Again, refactoring allows Eclipse to do much of the work for you and reduces the likelihood of your missing an important change--it's much safer for changing things in large projects.
  2. a voice/syntisizer API in games ?

    Well I know that Microsoft has a voice synthesizer API in it's list of Win32 APIs. I don't know if it would be appropriate for use in a game, but it might be worth checking out.
  • Advertisement