设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 77|回复: 0

[交流讨论] [XP/VX/VXA] Project Optimization (Revision 2.5; Upd-07/04/15)

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    前天 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4446

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    22899
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28239

    灌水之王

    发表于 6 天前 | 显示全部楼层 |阅读模式

    • Update History
    Spoiler

    • < Version 2.5 | 07/04/15 >Updated a tutorial on time compression.
    • Updated Zeriab's Remove Comments project under Scripts.(RXDATA/RVDATA/RVDATA2) Comment Removal.
    • Removed MCP under Optional Software Tools.

  • < Version 2.1 | 10/23/12 > Added RVDATA2 Compression under Data > RVDATA2 Compression
  • < Version 2.0 | 10/09/12 > Updated for RPG Maker VX Ace; updated appearance.
  • < Version 1.9 | 08/03/11 > Added Radical Image Optimization Tool under Graphics > PNG/JPEG Optimization
  • < Version 1.8 | 07/24/11 >

    • Added a tutorial on media compression.
    • Added a tutorial on time compression.
    • Added MCP under Optional Software Tools.

  • < Version 1.7 | 07/16/11 > Removed the textual tutorial on looping and added a video tutorial.
  • < Version 1.6 | 07/14/11 > Added Blizzard's Resource Tester project under Stowaway Files (thanks GameGuysProjects)
  • < Version 1.5 | 07/13/11 > Added Zeriab's Remove Comments project under Scripts.(RXDATA/RVDATA) Comment Removal.
  • < Version 1.4 | 07/12/11 > Added JPEG & PNG Stripper under PNG/JPEG Optimization.
  • < Version 1.3 | 07/12/11 > Added the Compact RVData script under .RVData Compression.
  • < Version 1.2 | 07/08/11 > Added a tutorial on looping.
  • < Version 1.1 | 07/08/11 > Added Yeyinde's RM Data Checker under Stowaway Files (thanks cozziekuns)
  • < Version 1.0 | 07/08/11 > Initial Release




    • To Do
    Spoiler

    • Add RTP-Less Project Tutorial





    • Easy
    Spoiler

    • \ Graphics< PNG/JPEG Optimization(XP/VX/VXA) >
      One of the easiest and quickest ways to shrink your project size is to use a PNG/JPEG optimizer on all of your graphics. While saving roughly 20 kb off of a single file may not seem very impressive, if your project has a large amount of graphics, then these small bits begin to add up quickly.


      For example, I recently optimized a project for a friend which had about 1,500 PNG files. The original size for the entire graphics folder was 84,085,192 bytes (84 mb). The size of the folder after I ran a quick PNG optimization was 57,719,751 bytes (57 mb). That's a difference of 26 megabytes simply by removing excess information that's not being used by the game and then re-compressing the file. No extra scripts or advanced computer knowledge required.


      There are a plethora of options available for PNG/JPEG optimization, but I personally prefer the following programs :

      PSYDK.ORG PNG Optimizer
      This program features an easy to use interface which you can quickly drag and drop your files into. Very simple to use. By default, the program makes backups for each file that it optimizes, so remember to either disable this feature through the options menu or move the backups after optimization is complete. No installation required; free to use.
    • Radical Image Optimization Tool
      RIOT combines several different compression methods and options for both JPEG and PNG files into one powerful application. It offers a side-by-side comparison which updates whenever you make a change, allowing you to see the end result before it is saved. The program also has a batch optimizer function which can handle multiple files at once. Highly suggested for those wanting more control than PSYDK PNG Optimizer and JPEG & PNG Stripper without the command line aspect of OptiPNG Advanced PNG Optimizer. Small installation required; free to use.
    • OptiPNG Advanced PNG Optimizer
      Unless you're like me and find glee in squeezing every last useless kilobyte out of PNG files, use the PSYDK PNG Optimizer instead. This is a command line PNG optimizer which has advanced options not normally needed, but can occasionally eek out several more kilobytes of unneeded data from the image file. No installation required; free to use.
    • JPEG & PNG Stripper
      Unlike the other two options above, this program removes useless metadata from JPEG files as well. If you are using JPEG files, I highly suggest running them through this optimizer to clear up the most amount of space possible. The program has an easy to use interface which you can quickly drag and drop your files into. Very simple to use. Please note that some anti-virus software may mark this program as malware, but it is not. No installation required; free to use.

  • < Thumbnail Cache Files(XP/VX/VXA) >
    Occasionally I see these database files just hanging around in one or more of the graphics directories, taking up space that they shouldn't be. Thumbs.DB is often the biggest offender. This file is generated automatically by Windows when browsing a folder with image files while the 'thumbnails' view is enabled. Always check to see if you have any such files before you export the release of your game, as I have seen them bloat as high as 5 mb.

  • < Stowaway Files(XP/VX/VXA) >
    Quickly run through your current graphic and audio files. Open them up, visually inspect or listen to them. Are you using all of them in your project? I've found myself guilty of allowing stowaway files into my project. That is, images that are not being used in the game and are most likely left overs from a quick graphic test or an older backup version of something that is being used in the game. These normally don't eat up very much space, but in larger games allowing these moochers to tag along can inflate the size of your project by several megabytes.


    If you're unsure if you're still using a certain graphic or music file within your game, move the file out of your project folder and use the following program or script to see if any errors crop up :






    • Intermediate
    Spoiler

    • \ Audio< General > Suggested Software ToolsAudacity Sound Editor
      Using Audacity is not required, although all of the steps for this tutorial will be done using that program. This is a fairly easy to use and completely free sound editor.
    • fre:ac Audio Encoder/Converter
      If you already have audio files created for your project and want to manage their size through compression, I suggest using fre:ac. The program has a straight forward interface and configuration is quite easy.

  • Optional Software Tools

    • MP3Gain MP3 Audio Normalizer
      Occasionally I will come across MP3s that are just outright loud or strangely quiet. I use this utility to bring their default volume up or down to a more acceptable level. This can be done within Audacity as well.

  • < Looping(VX/VXA) >
    Although the Graphics directory is often the biggest offender of project size bloat, the Audio directory can often rival or in many cases surpass its graphical neighbor.


    One way to help reduce the bulk of your Audio directory is to find a section within the music files to lock into an endless and flawless loop. To show the steps required to make a looping OGG file, I have created a short tutorial video which can be viewed below or by clicking the following link : RPG Maker VX/VXA Audio Looping Tutorial






  • < Media Compression(XP/VX/VXA) >
    If the complicated process of creating audio loops for your project is not something you want to take on or is otherwise not an option, you should consider at least compressing your media so that it takes up less space. Even if you are someone who enjoys high quality audio, I'm sure that you would be surprised about how far you can compress an audio file and still maintain great quality.


    In this tutorial, I will be going through setting up fre:ac to encode and heavily compress MP3 files into OGG files. Please note that you could also use Audacity to compress your files, although fre:ac is better for handling a large quantity of files at once.


    • < Step 1a > : Before we get started actually compressing audio files, we'll need to change a few settings from their defaults. After opening fre:ac, go to the Options menu and select the General Settings ... option.


    • < Step 1b > : Within the Encoders tab and under the Encoder subsection, click on the drop down menu and select the Ogg Vorbis Encoder option. Next, click on the Configure Encoder button which is just to the right of the drop down menu.


    • < Step 1c > : Make sure that the VBR (Variable Bitrate) option is selected before dragging the quality slide bar to the left. Personally, I prefer to set the quality to zero as I have found this squeezes the most out of the source media while leaving pretty decent quality in the end result. If you wish to adjust the slide bar and test your files at different levels of compression, simply make your changes here.
      To save the compression settings, press the OK button.




    • < Step 1d > : If your audio files are already in use within your RPG Maker project, you will need to change another option to keep the program from renaming your files as it encodes them. Within the Encoders tab and under the Filename Pattern subsection, click on the drop down menu and select the <filename> option. This will maintain the naming conventions that you currently have in place. Otherwise, the program will use any metadata tags (ID3, OGG comments, etc) to rename the compressed file.


    • < Step 2a > : Now we'll add the files that we want to compress to the joblist. To do this, simply click on the Add Files button, or click on the drop down arrow beside the button for more options. In this example, I will be using the From Directory ... option, as this allows me to add an entire directory of audio very quickly.


    • < Step 2b > : After clicking on the Browse button on the Add Directory window, we'll navigate to and then select the directory which contains the source audio files. After selecting the directory, press the OK button and the program will add the files to its joblist.


    • < Step 3 > : Now that the audio files have been added to the joblist, make sure that the Output Dir is set to the directory where you wish to have the compressed output sent to.
      Next, we'll make certain that our current encoder is set to Ogg Vorbis. This can easily be determined by looking at the Selected Encoder field which is just above the Output Dir field near the bottom of the program window.


      Once everything is set, we can start encoding either by pressing the Start Encoding toolbar button near the file menu at the top of the program window, or clicking on the Encode menu and selecting the Start Encoding option.




    • < Step 4 > : And we're done! Verify that all of the files have been encoded properly by listening to them before adding them to your project.


    • < Step 5 > (Optional) : If you're worried about heavy loss of quality, you could use Audacity or your favorite media player to toggle between each file, listening carefully to determine if more quality should be applied. Simply return to Step 1c and change the quality setting should you feel that more quality is needed. However, remember that often you will be the only one to notice small drops in quality once your game is released.






    • Extreme
    Spoiler

    • \ {Base Directory}< Executable Packing(XP/VX/VXA) >
      Although this is wandering into the realm of silliness, you can also shave around 30 kb from the Game.EXE file by using an executable packer. There are many options available for such compressors, although I would suggest using the following program :

      UPX (Ultimate Packer for eXecutables)
      This is the portable GUI version of the popular UPX program. Quick, reliable and fairly easy to use. No installation required; free to use. Using the following options should allow for optimal compression while not interfering with the normal operation of the executable :







      After packing the executable, remember to run and play through your game to check for any incompatibilities that might arise, although there really should not be any. If everything is running fine, delete the backup file Game.EX~. If the game crashes or displays problems after compression, delete the packed executable and rename the backup file to take its place.

  • \ Audio

    • < Time Compression(XP/VX/VXA) >
      Another trick that can be added to a fanatical kilobyte killer's arsenal utilizes RPG Maker's built-in audio pitch control.


      Using Audacity, you can change the speed at which the song plays. Since increasing the speed lowers the amount of time that the song is playing, this also means that it will take up less space once it is compressed. Normally, the newly altered song would sound like something that the Chipmunks performed, but once you import it into your RPG Maker project you can use the native pitch control to slow down the song and thereby making it listenable once more.


      The downside to this trick is that if you have a looping OGG file, you will have to find the loop points within the squished audio data all over again. Also, compressing the audio in this way may degrade its quality. Generally, I squeeze about 300 to 500 kilobytes from each file (comparing original compressed OGG versus time compressed OGG) that I apply this method to, which may not seem like much but it can add up quickly.

      < Step 1 > : Launch Audacity and open the file that you wish to use. I would suggest using the highest quality of source audio available to you.
    • < Step 2 > : We'll now click on the Edit menu and place the mouse over the Select option to expand another menu. Next, we'll click on the All option to select the entire length of the audio file.
    • < Step 3a > : After that, we'll click on the Effect menu and select the Change Speed option which will bring up the Change Speed window.





      Here you can enter the amount of change you wish to apply to the speed of the song. I would suggest entering a value divisible by five, as the pitch slider bar in RPG Maker goes up or down in increments of five. Also, since RPG Maker only allows you to alter the pitch up to fifty percent in either direction, you should not enter a value above fifty. Personally, I use either a value of 25 or 50.


      After entering the amount that you want, press the OK button and Audacity will begin altering the speed of the song.
    • < Step 3b > : If this is a file that you are wanting to use OGG looping with, remember to find the loop points again and write down the selection start and end information. See my video tutorial above about OGG looping if you are not familiar with how it works.
    • < Step 4a > : Now that we have sped up the song, all that needs to be done is export the new audio data and compress it. This can be done by clicking on the File menu and selecting the Export option.
      The Export File window should then appear and you can either select MP3 or Ogg Vorbis from the Save As Type drop down menu. Personally, I prefer using fre:ac for the encoding of my media files, so I will export the audio data as WAV (Microsoft) to keep the source audio quality high for now. Follow my tutorial on media compression above if you are following my route.


      If you are using the MP3 or Ogg Vorbis options, remember to click on the Options button on the lower right-hand side of the window and choose your desired compression settings.
    • < Step 4b > : Regardless of what format you choose, after you click the OK button, an Edit Metadata window will now appear. Again, if you are using OGG looping you will want to input the selection start and end information here. If not, simply click the OK button to instruct Audacity to begin exporting the newly sped up audio file.
    • < Step 5 > : Import the newly compressed file into your RPG Maker project. You may wish to click on the Tools menu and select the Sound Test option to try and find the correct pitch setting to restore the proper playback.





      The displayed settings above are for an audio file which was sped up by fifty percent.




  • \ Data

    • < .RVDATA Compression(VX) >
      I've currently completed a script to allow for compressing .RVDATA within the Data directory, as its total size can often roam higher than 4 mb in large projects. Current test runs have dropped the size from roughly 5 mb to 500-ish kb (200 maps, full compliment of items, armors, weapons and animations). No third party DLLs or EXEs required.

      Compact RVData(VX)

  • < .RVDATA2 Compression(VXA) >
    Jet has ported over his own compression script to VXA, allowing for .RVDATA2 files within the Data directory to be compressed.


  • < Scripts.(RXDATA/RVDATA/RVDATA2) Comment Removal(XP/VX/VXA) >
    Although the Scripts.(rxdata/rvdata/rvdata2) file cannot be compressed by the Compact RVData script above, it can still be optimized by removing commented lines and carriage returns. Zeriab has created a project for doing just that and I believe that it does its job well. For example, I have taken a heavily commented Scripts.rvdata2 which was 270 kb and come away with a 170 kb file after.


    It should be noted that removing the comments and carriage returns will make reading the code very difficult and should only be done when you are ready to release your game. You should also make a copy of your original Scripts.(rxdata/rvdata/rvdata2) and over-write the optimized version after having finalized your compressed distribution file.


    NOTE : There are no guarantees by the author of this project that scripts will be in complete working order after the comments and carriage returns are removed. Please test your game thoroughly before releasing the finished product.


    • Zeriab's Remove Comments(XP/VX/VXA)
      To use, place your Scripts.(rxdata/rvdata/rvdata2) file in the Input folder and run Game.exe. The comment-stripped Scripts.(rxdata/rvdata/rvdata2) file is output to the base folder once the process has finished.


    FEEL FREE TO SUGGEST A TOPIC, UTILITY OR SCRIPT




    本贴来自国际rpgmaker官方论坛作者:Ossra处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/xp-vx-vxa-project-optimization-revision-2-5-upd-07-04-15.41931/
  • 本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-14 14:21 , Processed in 0.067168 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表