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. "Ok" is a little ambiguous here. Regardless of whether it can be found or not, pirated software is pirated software. Is it legal? Depends on your country's copyright laws. Is it moral? Well, that's a whole 'nother can of worms, and possibly a religious debate. Either way, I think companies tend to turn a blind eye to pirated copies of outdated games. It wasn't until Nintendo started launching retro games on the virtual console/gba/etc, that a lot of nintendo roms started getting pulled from the internet. Coincidentally, it was only the games that HAD been re-released (therefore obtainable) that were pulled from such websites. Take that as you will, I can't say for certain whether that is actually true, just one conclusion I have drawn. I have no moral issues with it.
  2. Did you want to bypass just the enemy targeting or both the enemy and actor targeting? Well Assuming you are using default battle system (or something similar enough anyways), these little snippets should do what you want: Script Edit to skip enemy targeting: # Skip Enemy Targeting class Scene_Battle #-------------------------------------------------------------------------- # * Frame Updat (actor command phase : enemy selection) #-------------------------------------------------------------------------- def update_phase3_enemy_select @active_battler.current_action.target_index = 0 @enemy_arrow = nil if @skill_window != nil end_skill_select end if @item_window != nil end_item_select end phase3_next_actor end #-------------------------------------------------------------------------- # * Start Enemy Selection #-------------------------------------------------------------------------- def start_enemy_select @enemy_arrow = true end end Script Edit to skip actor targeting: # Skip Actor Targeting class Scene_Battle #-------------------------------------------------------------------------- # * Frame Update (actor command phase : actor selection) #-------------------------------------------------------------------------- def update_phase3_actor_select @active_battler.current_action.target_index = @actor_index @actor_arrow = nil if @skill_window != nil end_skill_select end if @item_window != nil end_item_select end phase3_next_actor end #-------------------------------------------------------------------------- # * Start Actor Selection #-------------------------------------------------------------------------- def start_actor_select @actor_arrow = true end end Just put 'em above main (in whichever order, or whichever one or you could put them both in the same script) (just make sure they are below all Scene_BattleX)
  3. Wait, are you sure you would need a script for parallax mapping to work? I though you just made the map as an image, then make it a panorama and import it. Then set the map's background to the panorama and make the map the same size as the image. I could be wrong though, I've never done it before. Post the script, so I (or someone else) can take a look. It may be easy to port, or, it might even be compatible.
  4. Unfortunately this script was re-posted by Marked to retain our script uploads (or something) and I am not sure you are going to be able to get a response from the original author. So let me try to help: Step 1: Put this script above "main" Step 2: Before you call the "Shop Processing" event command, you need to use a call script to set the shop type. For buy only, make your call script like this: $game_temp.shop_type = 1 For sell only, make your call script like this: $game_temp.shop_type = 2 Once the shop has completed, it will return to the normal shop. So, the next call to Shop Processing, if $game_temp.shop_type has not been set, will be a normal shop. Hope this helps.
  5. This could definitely be done. A couple approaches: 1. Every time the player gains an achievement, have RPG Maker write the data to a separate file, so the achievements remain persistent and can be shared across save files. Then an extra option could be added the the title screen menu to view the achievements (an extra option could be added to the menu as well) 2. Similar to above, except write achievements to the save files themselves, and have the extra menu in the title screen just read the achievements from the save files. This way, one would have to ensure duplicate achievements are not displayed, unless you would want the player to be able to get the achievement more than once. As for sharing the achievements, it's theoretically possible to have RPG Maker communicate with a server to share online, but then you would need a server of some kind to host different users achievements, which may or may not be worth the price. You could always just resort to good, old fashioned screen shot sharing. The only downside, is that it is pretty easy to get ruby to read through/modify the files...even more easily if the data structures/script is posted online. Although I guess players "cheating" would always be an issue, even if the files were properly encrypted. So, I guess what it comes down to is; how do you want the achievement system to behave? I could put something together if you want.
  6. I don't ever remember any community who would ban someone for USING pirated/illegal software...as long as no one posts links or advertises such things, I don't see an issue. Also, who's to say the official english version wouldn't be pirated? In that case, how would one even begin to attempt to regulate who's using paid versions and who's using pirated versions? EB/Degica/Whoever has a bad/good (depending on your viewpoint) track record of making it ridiculously easy to get free full versions (I mean, directly through the trial version, no cracks necessary) And hasn't it really always been like this? Some people support the company and buy the legal version, then some people pirate the software, with no reprimand? This is the same for any software. By this logic, they should never release software ever again, because it's not fair that some people pay and others don't. Of course you could sell a game if you buy the legal software, you can with RMXP, RMVX and RMVXace and it HAS been done before. Have communities EVER banned people for using "illegal" resources? I see SNES/NES/etc rips in RPG Maker games all the time -- that's illegal. I have yet to see anyone get banned over this. If it's ripped, you can't sell your game. If you own no rights, you can't sell the game. It's been this way for a long time...hasn't it? Also, I would REALLY like to question the person who is SELLING a game, without getting a proper artist and/or using RTP. I would NEVER pay for a game that isn't 100% original content. Why would I pay for a game full of RTP when I can get a million and one free games full of RTP? Maybe that's just my opinion, but if anyone wants to make money, they should seriously consider getting a proper team. I dunno, why should you ever buy a legal copy of something if no one would ever know you are pirating it? It's for the license and the support. You CAN sell your games (if you want). You THINK they won't be buying a legal copy. But why wouldn't they? People still buy RMXP, RMVX, RMVXace and it's the easiest software (that I've encountered) to pirate. People often pirate things, then buy them when they have the money. Piracy is a REALLY poor argument for NOT releasing software. All those huge software companies better stop making/selling programs because people are just gonna pirate it. Also, I really hope these "communities" already have systems in place for people to NOT request/upload illegal versions of RM2k3. Regardless if there's a legal english version or not. I have encountered users who HAVE bought the japanese versions of Rm2k/3, so it's not like a legal version isn't accessible; it's just that a legal non-japanese version is non-accessible. I've been using the software since RPG Maker 95, and I don't remember whatever company (who was producing the software) ever prosecuting anyone over using their software illegally. Could you point out a time where they did? (I believe ASCII developed 95, 2000 and 2003? I could be wrong) And why wouldn't the communities support a legal version? The communities SHOULD NOT be "supporting" illegal use of the software anyways. It's not a matter of turning a "blind eye," it's a matter of not prosecuting people over a matter that cannot be easily proved/disproved or regulated. It's easy to ban members for trying to distribute pirated software, but how do you control members from going over to the bay and downloading it anyways? Also, I always wondered whether "Degica" ever really cared about people using pirated material. RTP is free download for ANYONE (you do not need to own the software), and the trial version can be tricked into thinking it's the full version without much technical knowledge, no cracking necessary. There are many arguments as to why a legal version should not/will not be made, but I think the whole piracy/legal issue is never a reason not to develop a program. If piracy is a reason for not developing software, then software should never be developed ever.
  7. I think it's just reflects humanity's "superiority complex" pandemic. "Stop liking what I don't like", "You like something I don't like, therefore I'm better than you" I, personally think, that "bashing" a game itself is okay. If the "basher" has valid reasons then cool, it's all subjective anyways and can make for good discussion. If the "basher" has no valid reasons, and is bashing for the sake of bashing (bandwagons, fanboyism, etc) than they just make themselves look like an idiot, and should be ignored. I often bash newer games over older games (if I don't like them anyways, there are some new gen games I like) because my preference/taste in video games is often more catered to by older games. IMO, most new gen games lack the creativity, challenge or "fun" that most older games have. That's not to say new games can't be good. A game is like anything subjective, if you don't like it and want to tell people your opinion, you should be able to. Especially if you spent money on it, and feel like you were ripped off (Companies love dressing up their products to be the next best thing, and often fail to deliver. IMO, this is false advertising and the only reason they get away with it, is because it's subjective) Degrading people because they enjoy what one perceives as "trash," is not fair. Degrading something because you think it's trash, is fair. For example, I hate Final Fantasy 7. I think it was a boring game with a bland story line, poor gameplay (I know, all final fantasies play the same, but 6 had many more rich and cohesive features than 7) and had VERY poorly written characters/dialogue. IMO, the game was garbage. Do I think people who DO enjoy final fantasy 7 are a bunch of idiots? no. If they enjoyed it, they enjoyed it. I can't tell someone they are an idiot, because they like something. I also can't tell someone that they don't actually like something. But of course, it's only human nature to translate subjective opinions into "OH MAN, YOU LIKE THAT? YOU'RE A LOSER!" But I mean, this doesn't just apply to video games. This applies to everything from sports to movies to lifestyles. There's still people around who bash others because they enjoy recreational drugs, or go to church or are sexually attracted to the same gender. It's okay to disagree about something (i.e., you may not like a religion or drugs or the same gender, but to bash people that do enjoy that is unfair.) People should just learn "if you don't like it, don't do it, disagree with it; but don't degrade others who do like it" I believe, that everyone should be allowed to do anything they wish with their life, as long as they do not harm/negatively affect those around them. i.e: I hate WoW, but I don't mind that other's play WoW; but if their enjoyment of WoW starts harming others (Like, yknow, forgetting to feed your children), then I think negatively of that person. Not because they like WoW, but because they abandoned their children over a video game. Sorry, to go off on a tangent, I just feel this topic exceeds just the scope of video games, and is a very good question about the human race. Degrading the game itself is either because of: 1. You personally disliked the game 2. You are jumping on a bandwagon, just to look internet-cool Degrading the people who enjoy the game, is just wrong. EDIT: Of course, In reverse, I think it's fair to argue against someone's negative opinion, but to bash them because THEY dislike something is wrong.
  8. To be fair, the engine's source code was ALWAYS pretty confusing, and IMO smells of bad design. Their sudden attempt to create a more manageable design while maintaining similarity to the original design can be an even more confusing jump. I can see some rationale behind their design choices, as RPG Maker was never REALLY intended to target programmers. It still irks me though because the source code doesn't really feel like Ruby and the heavy dependencies make the system very non-scalable/non-extensible. Half the time, when writing custom scripts for RMxx, I feel like I'm hacking at the source code to make it work rather than extending the engine. That's partly the reason why I mostly gave up on developing custom scripts, it's quite irritating working with the engine. I'd like to note that I love the RGSS library, though.
  9. RMVXace (In my opinion, after all, this topic is highly subjective) is more powerful, and has greater potential for developing games. However, this potential requires more work to unleash, primarily through scripting -- RMXP + RMVX uses the Ruby 1.8.x interpreter (i think it's 1.8.3 if i recall correctly) while RMVXace uses the Ruby 1.9.2 interpreter, and the main update from 1.8 - 1.9 was the Ruby Virtual Machine, primarily involving improved performance. If I recall correctly, the Ruby VM in 1.9 is something like 7 times faster than the Ruby VM in 1.8. RMXP however, has greater potential "out of the box" in terms of mapping. While *technically* there are the same number of layers between versions (if not more, in RMVXace, if you count the shadow layer...but only shadows can be drawn on the shadow layer), in RMXP the map editor gives the user MUCH more control over the layers themselves. In RMXP you essentially get 3 arbitrary layers (which can have ANY tile from the tileset), plus an event layer. RMVXace, forces layers through the tiles' location in the tileset and cannot be explicitly controlled.
  10. I hate to distract from legitimate discussion/debate, but this * 1000. <3 I miss rm2k/3 :(
  11. Well, to be honest I haven't used many engines other than the RPG Maker series. I've gotten very familiar with Sphere, though (http://www.spheredev.org/wiki/Sphere:Latest) which is much like a "more" generic RPG Maker. Mainly, I stopped using Sphere over some desire to learn ruby properly (RPG Maker XP was a good learning environment, plus I used to use RPG Maker 95/2000/2003 heavily; so it was also much more familiar) and Sphere seemed to have little support and a small/non-existent community (I could be wrong, I didn't really look that hard). The main difference between Sphere and RPG Maker is that Sphere lacks many built-in features such as saving, data classes, battle/menu systems, etc. But, IMO, that is actually awesome, because it provides the basic necessities of an rpg - graphics, movement (pixel-perfect btw), mapping, etc. - without overbearing the developer with bloated, highly dependent features they have to hack around. Also, Sphere uses javascript as the backing scripting language; which is a very powerful scripting language, just wrapped in clunky syntax and primarily associated with web development. Otherwise, I haven't really worked with any other engine long enough to formulate an opinion about. Primarily, I've been looking/toying with different free/open source Game Development Programming Libraries. I've toyed mostly with Gosu (http://www.libgosu.org/) which has bindings for Ruby and C++ I haven't been developing much in terms of Game Development in favour of spending more time designing and planning my current project. However, I just finished my 2 year college program, and will have a light course-load over the summer (bridging into second year University), so I plan on spending more time with OpenGL (http://www.opengl.org/) and planning. I don't really like the idea of using game "engines," I don't like settling for "good enough" and I don't really like rewriting/working around existing code, just to get something to "feel" right. I dunno, call me crazy, but I get nervous if my design doesn't look, feel and behave exactly how I envisioned it...
  12. Parallax mapping should not require any script to work, just a little more work on your end to get things to line up right, and make passability work correctly. That's a hard question. In my opinion, yes, I think RMVace is a complete improvement. For what it is, not so much. The mapping itself, is definitely gimped. I am not going to lie, while there is still the ability to create nice maps in RMVXace, like you said, the way the layers work now limit your creativity, and probably makes mapping much more painful/tedious. Also, I have never really tried out rmvx mapping...so maybe they are mostly the same. My answer is mixed because I am heavily biased: 1. I don't use RPG Maker xyz anymore for my projects. 2. I never really liked the mapping system, nor the RTP (any version) and in previous RMxx projects, I was developing ideas to completely replace the built-in mapping system (my final comments on my last post will give insight into what I was thinking) 3. I'm more of a programmer than artist (I am including "mapper" under artist here), therefore the solution to getting around the limitations of the map editor is just a matter of writing some scripts to hack at the default implementations. This is not so accessible for non-programmers. I guess being a programmer, when I analyze the editor I look more at the underlying implementation/design rather than the default features/systems. Therefore, the performance boost plus additional debugging features puts RMVXace on a pedestal higher than the other versions, more so than other users. So, I guess the best way to put it would be: In terms of potential: RMVXace takes the crown. In terms of default built-in features/functionality: RMXP is still king. Also, I guess it would be worth to note, RMXP still has the best RTP. (But, I don't see why one couldn't use any of the RTPs in any of the makers, it's just a bunch of .png files...and in my opinion all the RTP is pretty boring)
  13. Oh, well I like being different. Since there's a lot of RMVXAce bashing going on, I'mma step in. 1. RMVXAce mapping: Yes, It's not the best. But, there actually ARE 3 layers plus events, plus regions, plus shadows. Layer 1 = columns 1-4 in 'A'. Layer 2 (or "embellishment" tiles) = columns 5-8 in 'A' Layer 3 = 'B'+ Event Layer = can be used for tiles too, and is *technically* unlimited layering with clever use of events (read: NO SCRIPTING NECESSARY) Region Layer = not really useful for mapping Shadow Layer = free drawing pen tool, draws shadows on layers 1 and 2? The only difference, and the reason it feels like there are less layers, is because the editor now automatically handles the layering rather than in RMXP where you have to do all the work. Annoying? yes. Less layers than rmxp? no. Also, in the mapping, you can specify MULTIPLE tilesets for ONE tileset. Mixing and Matching is allowed (upto 4 tilesets) Also, in reality, i think regardless of which maker is being used parallax mapping SHOULD be utilized. It may be more work, but the maps look MUCH nicer. (In real reality, I would actually advise a combination of parallax mapping, and using scripts to render only visible parts of the map. RPGxx's mapping system currently renders the ENTIRE MAP which is nasty resource hogging IMO, but not everyone is a scripter, so I understand not doing this) 2. RMVXAce Database: I think, the database has the largest, and greatest rehaul. With the new implementation of "features" and "effects" we are starting to see Enterbrain think about developing modular aspects to the editor and achieving a higher level of abstraction within the data classes themselves. Plus, you can create unique damage formulas without scripting? Beautiful. 3. RMVXAce Scripting: RGSS3 Just because I haven't expressed myself enough: -Ruby 1.9.1 -Debug Console The API hasn't evolved THAT much, but it's worth noting movies can be played, and Windows have padding that can be changed (finally) Default Scripts The main architecture of the engine mostly feels the same. Still very highly coupled. I am impressed that Enterbrain finally started implementing "event-based" object messaging systems, however am disappointed that they only implemented this for the Selectable windows (Enterbrain calls them "handlers", it would've been nice to see multiple handlers/delegates, and/or modular controller classes...throw in a some abstract "Controllable" class interfaces and then we're talking <3) *Ahem* Almost got caught in a rant there. So my verdict: The mapping system could have been better, but with everything else, I think I could overlook that aspect....Who knows, maybe with the newer ruby interpreter, someone might develop an external map editor and a custom map script. Anyways, if you guys still don't like vxAce, rmxp's still kickin', and it's probably only going to get cheaper.
  14. Sorry I'm late, moved to Debate and Mature discussion.
  15. :O Enterbrain, congratulations on finally implementing event-based messaging, but why did you stop at selectable windows?

  16. My vote, is null and void... (obviously, I have been pretty much non-existant) Though, if I could fairly vote I would vote for Jon Bon. I'm probably over thinking this, but from skimming through recent content; I feel he has put an effort forth in being helpful that appears to have gone unnoticed.... (mind you, like I said, I haven't been around...So what do I know?) Eitherway, I feel he deserves at least a few kudos. This can also be read as: Next month, I mean to nominate Jon Bon...Since, after today I'm probably gonna disappear again for a bit) Anyways, best of luck to the nominees and keep up the good work.
  17. Okay, fair enough. However, I am willing to bet c + openGL is much more powerful than torque 2d engine builder, and is ultimately much more powerful. And they're free. What's your point? Torque 2d Engine Builder is probably much more open (not as specific as RPG maker) and much more complex of a tool. RPG Maker wasn't meant to be powerful per se, just easy. So amateur's and hobbyists can access game development without having to devote large amounts of time to just learning to use tools, etc. RPG Maker is a "pick-up-and-go" game development tool of sorts. Also, rpg maker in itself isn't really *not powerful* as it is just more specific to small, simple, 2d RPGs. And, like I said, there's not much you *can't* do with RGSS (in terms of it's intentions, of course you can't make 3d games, etc. Although, Ruby has an extension that allows it to interface with OpenGL...which is free, so you could make 3d games with ruby if you want to learn Ruby + OpenGL) I understand that RPG Maker isn't as feature rich as YOU wanted it to be, but to say it isn't (in itself) 90$..then i'd have to disagree (well, except in the sense that it's just a virtual copy so, technically not physically worth anything). I'm not trying to convince you to buy it; I just feel that RPG Maker is a powerful tool for amateurs, and can even more powerful if in the right hands. Sure, it's not the best thing since sliced bread; but I think Enterbrain did a good job with VXA. Personally, I think they should have redesigned the engine's code; but I can see why they wanted to follow at least a similar pattern...but if that was a big deal I don't see how rewriting the engine isn't possible... As for Visual Studio: Have you tried it out? Now that's a powerful tool. It took me a bit of tweaking to get it to perform nicely (partially a disappointment, but it's good now); but it has the best intellisense I have ever encountered before. And it's closest you get to point and click programming....which these two things are also what I dislike about it...It makes it too easy, I feel I may forget everything once I don't have VS anymore Q_Q LOLOL So I guess RPG Maker VXA only costs 90$ to people who don't understand the Windows registry? Oops did I start this xD [on the actual topic of RMVXA] Anyways, I finally downloaded it to try it out, and I like what I see. I really like the new database set up, all the new attribute stuff is starting to make the database very powerful. Like I mentioned, the code design mostly follows the same pattern; but they brought back a lot of features they left out of VX. Plus, a lot of things that originally would require a custom script to achieve is now built in to the system. Plus, with the attribute or feature system (whatever it's called) I can only see possibilities of extending the system with ruby. I am VERY impressed with this design choice they implemented. @Bigace: If you want to have specific class weapon/armor sets, you can create your own categories for the weapons/armors. Just make a category for each class, allow the class to equip those types then set the weapon to those types. It's an extra step, but you can also now do some really complex stuff, like have another type of items that some classes share or only specific characters can use, etc.
  18. I think 90$ is a fair price tag. You aren't paying for ruby, you are paying for: A) A GUI-based click and point game development tool, which also has a pre-programmed 2D game engine WITH source code B) A fully-functional 2D game library/API (rgss3) C) A full set a resources for you to use in your game D) A complete license for using and SELLING games made with all of the above. Yes, ruby is free, but ruby alone cannot make games. There are free libraries/api's for ruby to make games, but you have to build the engine, resources, etc from scratch with no click and point programming. A little bit more than a crappy modern game, plus it's a tool that can be used to make money. With a proper plan, that could be made back and then some. Consider: 5$ a copy of your game, 20 copies and you've already made profit. And if the game is good and advertised properly, 20 copies is nothing. sell your game for a 1$, and I bet it wouldn't be hard to sell 1000 copies. $90 -> $1000 is pretty good, especially when 90% of the work is already done for you. And people DO buy rpg maker games: http://www.rpgfan.com/reviews/aveyond/index.html But, that's just how I feel about it. At the end of the day however, there are many free tools that achieve similar goals as rpg maker; that are more powerful and free. *yawn* RPG Maker XP is released, people complain it's too hard to use, so Enterbrain simplifies everything and makes VX. Then people complain it's missing too many features from XP. So, they bring them back with VXA. And, with RGSS + Ruby you aren't even forced to USE their systems. So there isn't really any limits either... Also, look at Visual Studio 2010: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/professional/overview On sale for $499! And all you get is an IDE (well, its a lot of powerful things but you don't get half the things that RPG Maker gives you) Of course, once again, this is just my opinion. I had no plans on buying VXAce, but I DO think it's a fair price tag. And I DO think it can only lead to good things for the RPG Maker series. I'm stoked to see what scripts people will come up with for the new series :o
  19. To be honest, I just reformatted my PC and haven't put any RPG Maker back on it yet (eventually I will, I totally forgot to back up those installers xD), and I am not familiar with programming against event movements... my guess is one of these might help: module RPG class MoveRoute def initialize @repeat = true @skippable = false @list = [RPG::MoveCommand.new] end attr_accessor :repeat attr_accessor :skippable attr_accessor :list end end module RPG class MoveCommand(code = 0, parameters = []) def initialize @code = code @parameters = parameters end attr_accessor :code attr_accessor :parameters end end More information on these classes are in the help manual (luckily, I could easily find the help manual online) You're gonna have to mess around with some of the default stuff, until you can find some clues (or maybe someone else knows offhand?) .... Hmmm, wait... Is "Wait for move completion" an event command or checkbox somewhere? Hmmm, either way, I'm not the best one to ask about Events. I hate events. You should probably read through the Interpreter class (to learn how normal events handle the "Wait for move completion" the default scripts are well commented IMO), read through the Game_Event, read Sprite_Event. Also, the Help manual has ALL the documentation necessary for the Default data classes. I would look at any RPG::Event* classes in there. Once you learn how the Event's work, inside and out, programming with/against them should be duck soup.
  20. haha, finally finished reformatting my laptop! I'm still amazed that windows pretty much ships with NO drivers, while on Linux all my hardware works out of the box. Actually, I am not that surprised.

    1. kellessdee

      kellessdee

      omg LOL yes, I am really digging these metaphors

    2. Polraudio
    3. Foxkit

      Foxkit

      yea, its a pain to look at linux through windows ;)

    4. Show next comments  12 more
  21. *ahem* *dusts off brain* Let's see if I can help explain this. It seems you are just a little confused with how things work. I'll try not to get into the technical implementation of ruby, as that would probably be much more confusing... But here's what you need to understand: Class - a blueprint/definition/template (whichever is easiest to understand) of an object - these are static, i.e. They do not change! Object - an instance of a class - these are not static, i.e. They change state! obj_var = ClassName.new What happens (basically)? 1. class ClassName is loaded into memory 2. Memory address of class ClassName is assigned to obj_var 3. Constructor method of ClassName is called (this would be your def initialize, invoked by the .new method) so, obj_var holds the location of an INSTANCE of the class ClassName in memory. You can look at their relationship EXACTLY like that of a house: To make a house, you need blueprints (well, you should have some AT LEAST); ClassName would be those blueprints. Then, those blueprints can be used to construct the house or even many different houses. obj_var would be the house. The houses can be changed, etc. while the blueprints remain the same. the actual house is an instance of those blueprints. however, when it comes to object oriented programming; we can still DO stuff with the static classes: class Test def instance_method_a print "Hello, world!" end def self.static_method_a print "Hello, world!" end end test = Test.new test.instance_method_a # "Hello, world!" is displayed Text.static_method_a # "Hello, world!" is displayed test.static_method_a # Undefined method error Test.instance_method_a # Undefined method error So what's the difference? The difference, is the SCOPE of the method. instance_method_a, has an "instance" scope, meaning it can ONLY be invoked from an INSTANCE (Test.new) of Test. "static_method_a" has class scope, meaning it can ONLY be invoked from the class itself (STATIC). So, in your example: class Foo is static def bar is an instance-scope method Foo.bar will not work. Foo.new is static, and returns an instance of Foo Foo.new.bar would work or f = Foo.new f.bar would work Or, this could be another example: class Foo @@static_bar = 5 def self.static_bar=(value) @@static_bar = value end def self.static_bar return @@static_bar end def initialize @instance_bar = 5 end def instance_bar=(value) @instance_bar = value end def instance_bar return @instance_bar end end variables with @@ preceding them are class scope variables, therefore they are STATIC. Foo.static_bar => 5 Foo.static_bar = 10 Foo.static_bar => 10 f = Foo.new f2 = Foo.new f.instance_bar = 25 f.instance_bar => 25 f2.instance_bar => 5 static_bar can only be referenced from the class instance_bar can only be referenced from an instance of the class, and every instance will have it's own instance_bar (and potentially different values for instance_bar). As to what you are trying to do... well, I'm not really sure what it is you are doing, so this might not help; BUT if you need to access methods from within interpreter, you have 2 options: work within interpreter class Interpreter # add some stuff end and it can still exist in a separate script. class Test def a print "a" end end class Test def b print "b" end end t = Test.new t.a => "a" t.b => "b" Ruby has open classes, so the interpreter just thinks of Test as one single class. So, if you need the interpreter to do something other than what it does, just make a separate script that adds something to interpreter (I am assuming, by interpreter, you mean class Interpreter in the default classes). However, if you only need access to the interpreter's methods, and don't need to change the functionality; all you need to do is use an instance of Interpreter: interpreter = Interpreter.new interpreter.some_method or something... Do you mind sharing what it is you want to do?
  22. I can see that, that's the main reason why I still ever use java -- it has probably one of the most well constructed api, and just as well constructed documentation. C's libraries are fairly clean, however very compact. C++ libraries are much more vast, however very messy. I couldn't have said it better myself. That's part of the reason why I love C (I am familiar with C, however I wouldn't say I know it, I've only started learning it fairly recently), with languages such as Java or Ruby, I get too tempted to "just try stuff" without necessarily thinking it through Q_Q, while C on the other hand actually forces me to REALLY think things through. Thankfully, those practices have been leaking back through to all my programming. Believe it or not, I REALLY think C has actually taught me better programming practices. Maybe that's why I have such a soft spot for C... Although it helps that my C#/.NET/ASP.NET teacher is A REALLY good teacher, and I have him 3 times a week. I hate that, as I am sure you know (I am willing to bet even more so than me, as you have worked in the field) that in school you have to focus on what's being taught...It makes it difficult learning all the languages you want to learn. I read up about Scala once, and that's a language I definitely want to learn before I die xD Looks like we dislike java for the same reasons. I guess it just bugs me more, or I am just overly opinionated, lol. There's another benefit of Java, it's a lot easier to distribute than a lot of languages, and is popular enough that most people will probably already have some sort of JVM installed. No problem, I look forward to such discussions.
  23. Whoa, so this is that engine you spoke of! I'll be honest with you, I AM biased against mmorpgs and the like...so I can't say I'd be playing this on a regular basis (though, I think I will check it out eventually) Nonetheless, from an objective point of view, I'd like to say this: The concept of this game is amazing. It seems to me, almost like a dungeons & dragons type game, but instead of one dungeon master you have a community of dungeon masters contributing to create a huge world. That probably doesn't do this justice.... BUT that's what I gathered, and I think it's a really good idea. I wish you the best, and hope to see this go somewhere, I think it has potential for something great. Out of curiosity, was this made with a team or did you do it all yourself?
  24. Heh, sorry I'm late; but welcome to the community and I hope you enjoy your time here! I'm definitely impressed -- your own MMORPG engine? That's pretty exciting. Although, I do feel for you...Java xD are you a masochist ;) ;) (just teasing, I have a certain aversion against java, not so much the language -- more so the JVM) And, I do agree with you that everyone should learn java. It's a good introductory language, with a nice balance between static/strongly typed (c-like) languages and safe/reflective languages (but, to be fair; by being a good introductory language by NO means, make it a bad language, I just dislike it for personal reasons haha; but man does it make cross-platform GUIs a lot more streamlined). And don't take this the wrong way, but I'd like to disagree with c or c++ being arcane. You are right, in terms of it being a lot harder to create nice design and stable code, but they are far from arcane. There is a reason they are still extremely popular languages. The idea is, prototype in something safe/productive; then if performance is an issue, translate to C or C++. You just don't get the flexibility and power combined with cross-compilation that those languages provide. It's really the Memory Management capabilities that make those languages so powerful. However, It's nice to see a new trend of reflective/safe languages implementing both managed/unmanaged modes, as in C# or D. D is still a little too young/unpopular at this moment, but it claims to have the efficiency of C/C++, while remaining "safe". (If you have your own gripes with Java, and aren't a fan of c or c++ I would advise you should take a look at D, if you want/care) But, that's me just rambling again...and that maybe better for another discussion. Welcome!
×
×
  • Create New...