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

azdesign

Member
  • Content Count

    14
  • Joined

  • Last visited

Everything posted by azdesign

  1. I have RTP1.03 installed (japanese installer, so presumably RGSS103J.dll), set locale into japanese, editor is english japanese version. Either japanese text inside an event, or japanese character as variable value shows up properly in either pop-up window(print) and message window. No problem as long as the character is inside the editor EDIT : I'm currently using JAPANESE editor, so that's explain the thing. I install english editor and it wont display text properly just like you said. So I make sure with RMVX, result : RMXP : wont display jap text inside game window unless the editor is jap as well. changing rgss##.dll doesn't have any effect. RMVX : display the jap text inside game window, pop ups, even editor and .dll is in english either version DEPENDANT on system locale. jap text jumbled if system locale was not set to jap in VX So dead end with ruby 1.8.1 now I'm working on XP-ization of VX. Gonna import all tileset, charset. etc. Hate those chibi chars. MORE EDIT : I performed another test, involving a japanese rpg maker game. I run them and the game just fine. Now I save the game using English editor, everything messed up, text are gone So this is really dependant with the editor version, my theory is, the editor has built in encoding, regardless rgss####.dll and system locale. The result is, jap text saved using jap editor shows fine. Jap text in english editor messed up. Jap text from a jap game edited and saved using english editor became messed up.
  2. @ForeverZer0 Hmm.. I also did some experiments with this and none seems work. But hey, These are just coming up in my mind but I don't know how to do it, maybe you can help me with this : You see, putting a japanese character directly inside the script without calling them from an external file works fine. It shows up properly when called ( for example, create a variable with japanese characters as its value). The problem arise when these characters are taken from outside (.ini file) to be parsed inside (IO -> String). So i thought about this. How if we just store the characters in form of code (like ASCII code for alphabets) in .ini file and then the script grab it then convert those code into its corresponding character ? The parser would use its internal encoding so I think maybe this might works. This is the chart : http://www.rikai.com...s.unicode.shtml I don't know how to do it nor I know whether there is a method in rgss to do that, I'm new to to ruby, but have experience using java, php, etc so I know the logic. If you're willing to help me with this please let me know the result. The next solution is like what I stated at the first time, to store the localization dialogues inside a script in form of array/hash. This will eliminate the purpose "everyone can grab it and translate it into any language using any text editor" though. Maybe we can just export the variable into a text file, wait until someone provide translation, then we apply the translation into the script and then repackage the game. At least, no need to manually check every event and translate each dialogue. I hope not to resort in using newer version of RPG Maker. I personally dislike the "chibi-style" of RMVX and Ace along with their automatic layer mapping and smaller screen. Curse them all. Oh well.., because the original purpose was to distribute the game into english and japanese, maybe for the time being I'm gonna stick with the array/hash. If I'll be using your scripts in the future, either the entire scripts or modified one, I will definitely put your name and any links you want me to provide on the credit. I respect the work of an author who put their hard work to be shared on the community. Maybe if you want, I can give you a single copy of completed game when it is published. Then again, thanks for the script.
  3. Wow you made it quickly. I tried the demo, the result was just like what I hoped for nice work. Never touched Win32API before, lol need to learn more. Anyway the .txt file unicode has no problem handling non-standard characters but the parser seems to have problem. I tried using japanese characters into it. It read as "p}". I made sure my system locale changed into japanese Maybe the RTP should also changed into its corresponding language ? Or are there specific configuration we can change to solve this ? Currently I'm using english RTP(RGSS102E.dll). Don't know why, switching to japanese RTP made the text invisible. Maybe some font missing.. Anyway, thank you for the script. gonna learn every bit of it and make my own one. (lol for commercial product I don't want to have copyright issues)
  4. Consider that I want to publish a game in different languages. While maybe I'm not the one who provide the translations, I want everyone, can easily grab the entire dialogues file and translate them using a text editor. No need to own RPG Maker, no need to have scripting skills to do that for sure. So here are my thoughts based on my current experience and knowledge : 1. Rather than using RPG Maker to show text manually stored inside an event, how about create a single global variable called DIALOGUES, which is a container to the entire dialogues, could it be text, system message, menu label, etc. This variable is categorized, and each category items has its own ID. For example : DIALOGUES = { :Common => [#this is ID no 0-5"Hello, how do you do?","Welcome to the village!",.....#this is ID no 6-10#and so on ], :Another_Category => []} then in "Show Text" just call DIALOGUES[:Common][0] which result in "Hello, how do you do?". This approach could also eliminate redundancy. Gonna need to alter message-related class to do this 2. Store that variable in a .rb file, separated from the rest of the file, so anyone can just grab it and start the translation. 3. At the game start, check the file integrity, to avoid corrupt, ID mismatch, missing, etc. If invalid, use the default language pack stored inside the .rgssad and store in into memory (I dunno if.. lets say 2500 lines worth of dialogues will take a long time to load) or, rather than any ruby related variable, what if the dialogues stored in a plain text file ? I'm not sure how to keep track of each dialogue though. Gonna invent some text grabbing method maybe for easier call. I also curious how to overcome problems for non-alphabet characters such as kanji and arabic not properly showing up (mostly displayed as boxes). I think that's it. Anyone has better ideas of what kind of approach for localization? Please share your thoughts here Thanks in advance
  5. Okay, tested, it is proven to have less CPU usage (noticeable differences) 20-25 vs 31-40. BUT new problem appear, the Z index. image layers became messed up. How can I specify the z-index manually for every image components I'm combining ? I don't see z attributes in Bitmap while its only available for Sprite Edit : Nevermind, I made some kind of "queuing" algorithm, to force .blt call specific image part in order. This way it works.
  6. Perfect, now I don't have to write @image.each { |key,val| val.x += 1 } instead : @image.x += 1 Before I read your reply, I got something from google called RMagick, a gem that provide additional image manipulation functionality, which, one of its method is to produce a single image from combination of different image. But it seem that using .blt is way easier. Nice! another one step to complete my poser script I have not tested the performance difference yet, I'll let you know if I found it later. Thanks you very much
  7. Simple example, A tree consisted of 4 different parts. The root, trunk, branches, and leaves. @root = Sprite.new @root.bitmap = RPG::Cache.picture('root.png') . . @leaves = Sprite.new @leaves.bitmap = RPG::Cache.picture('leaves.png') Just consider that I have set their coordinates to form a tree at the middle of the screen. Now, when I want to move that tree, its means that I have to move each parts of it. In the actual code, I have around 15 parts (body, hand, hair, brow, eye, nose, mouth, top, pants, shoes, etc) to be individually moved just to perform a single moving animation. That is for a single character. What if I have 3-4 character appeared simultaneously on the screen ? I have to move around 60 objects per frame. The question is, is there is a way to create a single image object made from different parts of images ? Not a mere container, because if I were to move the container, the container will need to move each parts of its contents, which result just the same cpu usage For those who wondering why would I separate different parts of the images : I want character pose to appear on the screen based on what he/she is currently equipping, expression, arm pose, hair color, etc. So I don't have to make different single images like 'char_a_frown_hands_up_red_boots_armor_glove_greatsword.png' along with its hundreds of variation Thanks in advance :D
  8. Thanks for the input everyone, I gain many things I didn't know before Firstly, I will definitely try everything like, store data in a class then export/import to a file, symbol in hashes, storing data in Table and using Struct, really thanks for the input, there are so many alternatives I could use (I didn't realize these are exist, well, the tutorials I've been reading only covers so little) And then, I will use the appropriate model for each algorithm in my script. And of course, I will make sure it works first before trying to make it tidy or optimize it. Thanks guys
  9. I understand. Before I went to do scripting with ruby, I work with XML, Java, PHP and MySQL and because I accustomed with storing data in structural manner (XML, MySQL), its just become a habit. RPGMaker XP did not allow me to create some kind of custom database other than weapons, items, skills, etc. That is why I put class data in a hash/array as lookups instead. In the meantime, I'll just follow your suggestion, focus on the the algorithm, data and optimization comes later. Is there some kind of built-in modules in RPGMaker, that allow us to work with XML ? Or, did I wrong about that we cannot add another "table" other than the pre-defined ones such as weapons, items, skills, etc ? Thanks
  10. Hello again everyone, While I was coding my script, I was wondering that there are many of these variables that called, assigned, disposed, etc across the program. Let me give you a simple example : @offset_top @offset_right @offset_bottom @offset_left print @offset_top @image.x = 640 - (@image.bitmap.width + @offset-right ) #etc.. VS @offset = { 'top' => 10, 'right' => 10, 'bottom' => 0, 'left' => 10, } print @offset['top'] @image.x = 640 - (@image.bitmap.width + @offset['right'] ) #etc.. obvious variable name are made to be easier to remember/accessed, while I think, put them into hashes make them tidier (like a database). I like hash/array, centralized similar attributes. Lets assume that there are hundreds of those variable or hash elements, the hash may even have nested elements in the script, which one "lighter" for CPU to call them ? To make it simple, is puts @container['identifier'][index] use significantly greater CPU Usage than puts @Grandparent_Parent_Child ? Is it significant ? or less noticed ? or even almost nearly the same ? I did my own test using animation calling nested hash elements (around 50 elements) per frame but cpu usage (amd athlon II X4 635 @2.9GHz) just went random, sometimes high (around 25), sometimes low (around 13), so I can't get accurate information. Please share me your opinion
  11. Very nice, I create class instance in Scene_Map with the update call on its main's loop and the animation works just like how I want it to be. Thanks, I have so many things to learn yet. Oh, one question, between these scenario, which one is the most effective/proper for animation ? 1. Dispose the image, set the new coordinates, re-draw the image with the new coordinates 2. just change the existing image's attributes without redraw/clear I wonder because there is 40 or 60 times in a second the program repeat this and I don't want the performance to drop (just like my first game-dev attempt making ping pong with openGL in java, re-draw ALL images per frame including the static images and its lag as hell, should only re-draw the moving one) Btw, thanks really, you solved my problem :D
  12. @ForeverZero : I think I have a problem, the update method is not called automatically, here is the example code : class MySprite < RPG::Sprite def initialize super @image = Sprite.new @image.bitmap = RPG::Cache.picture('picture.png') end def fade_out(frames) @fade_duration = frames end def update super if @fade_duration != nil self.opacity -= 1 @fade_duration -= 1 if @fade_duration <= 0 @fade_duration = nil end end end end then in a map, I create 2 events, one which create an instance of MySprite class in a global variable and the others calls fade_out movement trigger the creation event, the image popped out, then when I trigger the fade_out method from another event, it does nothing Do you have a solution ?
  13. Wow thanks, it never crossed my mind to let the graphic update do the work instead of having my own loop. I'll try it, really, thanks for the input :D
  14. Hello everyone, nice to meet you, I made a custom class to display character portrait in RPGMaker XP Here is the class : class Poser attr_accessor :images def initialize @images = Sprite.new @images.bitmap = RPG::Cache.picture('Character.png') #100x300 @images.x = 540 #place it on the bottom right corner of the screen @images.y = 180 end end Create an event on the map to create an instance as global variable, tada! image popped out. Ok nice. But Im not satisfied, Now I want it to have bobbing-head animation-like (just like when we breathe, sometimes bob our head up and down) so I added another method : def move(x,y) @images.x += x @images.y += y end def animate(x,y,step,delay) forward = true 2.times { step.times { wait(delay) if forward move(x/step,y/step) else move(-x/step,-y/step) end } wait(delay*3) forward = false } end def wait(time) while time > 0 time -= 1[/color] Graphics.update end end I called the method to run the animation and it works, so far so good, but the problem is, WHILE the portrait goes up and down, I cannot move my character until the animation is finished. So that's it, I'm stuck in the loop block, what I want is to watch the portrait moving up and down while I walk around village, talk to npc, etc. Anyone has suggestion for better logic for playing animation ?
×
×
  • Create New...