设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
123
返回列表 发新帖
楼主: fangyc
打印 上一主题 下一主题

[已经解决] RMVX在Vista和Win7上启动比较慢有什么解决办法吗?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
61
在线时间
24 小时
注册时间
2008-8-5
帖子
1924
21
发表于 2010-8-18 09:47:36 | 只看该作者
本帖最后由 紫苏 于 2010-8-18 10:09 编辑

最近换了新计算机,很神奇地也有了这个问题,XP 是在 Audio.bgm_play 的时候卡 6 秒左右,VX 是启动就卡 10 秒
估摸着能和微软从 Vista 起废除了 DirectSound 有关,坐等高人解释:
Windows Vista features a completely re-written audio stack based on the Universal Audio Architecture. Because of the architectural changes in the redesigned audio stack, a direct path from DirectSound to the audio drivers does not exist[1]. DirectSound and other APIs such as MME are emulated as WASAPI Session instances. DirectSound runs in emulation mode on the Microsoft software mixer. The emulator does not have hardware abstraction, so there is no hardware DirectSound acceleration, meaning hardware and software relying on DirectSound acceleration may have degraded performance. It's likely a supposed performance hit might not be noticeable, depending on the application and actual system hardware. In the case of hardware 3D audio effects played using DirectSound3D, they will not be playable.
Third-party APIs such as ASIO and OpenAL are not affected by these architectural changes in Windows Vista. A solution for applications that wish to take advantage of hardware accelerated high-quality 3D positional audio is to use OpenAL. However, this only works if the manufacturer provides an OpenAL driver for their hardware.[2]
As of 2007, a solution to re-enable hardware acceleration of DirectSound3D and Audio Effects, such as EAX, called Creative ALchemy was launched[3]. Creative ALchemy intercepts calls to DirectSound3D and translates them into OpenAL calls to be processed by supported hardware such as Sound Blaster X-Fi and Sound Blaster Audigy. For software-based Creative audio solutions, ALchemy utilizes its built-in 3D audio engine without using OpenAL at all.
Realtek, a manufacturer of integrated HD audio codecs, has a product similar to ALchemy called 3D SoundBack. C-Media, a manufacturer of PC sound card chipsets, also has a solution called Xear3D EX, although it works instead by intercepting DirectSound3D calls transparently in the background without any user intervention.


奇怪的是我之前也用过 Vista 和 Win7 系统,却没有这个问题
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1045
在线时间
1564 小时
注册时间
2008-7-30
帖子
4418

贵宾

22
发表于 2010-8-18 10:38:19 | 只看该作者
测试代码: Scripts.rar (114.9 KB, 下载次数: 24)

因为刚从Win7下换到XP,所以只能用XP测试 = =

时间精度是两个time.now相减。
  1. total:0.188
  2. Cache                    =>        0.0
  3. Game_Actor               =>        0.0
  4. Game_Actors              =>        0.0
  5. Game_BattleAction        =>        0.0
  6. Game_Battler             =>        0.0
  7. Game_Character           =>        0.0
  8. Game_CommonEvent         =>        0.016
  9. Game_Enemy               =>        0.0
  10. Game_Event               =>        0.0
  11. Game_Interpreter         =>        0.0
  12. Game_Map                 =>        0.0
  13. Game_Message             =>        0.0
  14. Game_Party               =>        0.0
  15. Game_Picture             =>        0.0
  16. Game_Player              =>        0.016
  17. Game_Screen              =>        0.0
  18. Game_SelfSwitches        =>        0.0
  19. Game_Switches            =>        0.0
  20. Game_System              =>        0.016
  21. Game_Temp                =>        0.0
  22. Game_Troop               =>        0.0
  23. Game_Unit                =>        0.0
  24. Game_Variables           =>        0.0
  25. Game_Vehicle             =>        0.0
  26. Scene_Base               =>        0.0
  27. Scene_Battle             =>        0.0
  28. Scene_Debug              =>        0.0
  29. Scene_End                =>        0.0
  30. Scene_Equip              =>        0.0
  31. Scene_File               =>        0.0
  32. Scene_Item               =>        0.0
  33. Scene_Map                =>        0.0
  34. Scene_Menu               =>        0.0
  35. Scene_Name               =>        0.0
  36. Scene_Shop               =>        0.0
  37. Scene_Skill              =>        0.015
  38. Scene_Status             =>        0.0
  39. Scene_Title              =>        0.0
  40. Sound                    =>        0.0
  41. Sprite_Base              =>        0.0
  42. Sprite_Battler           =>        0.0
  43. Sprite_Character         =>        0.0
  44. Sprite_Picture           =>        0.0
  45. Sprite_Timer             =>        0.015
  46. Spriteset_Battle         =>        0.0
  47. Spriteset_Map            =>        0.0
  48. Spriteset_Weather        =>        0.0
  49. Vocab                    =>        0.0
  50. Window_ActorCommand      =>        0.0
  51. Window_Base              =>        0.0
  52. Window_BattleMessage     =>        0.0
  53. Window_BattleStatus      =>        0.0
  54. Window_Command           =>        0.016
  55. Window_DebugLeft         =>        0.016
  56. Window_DebugRight        =>        0.0
  57. Window_Equip             =>        0.0
  58. Window_EquipItem         =>        0.0
  59. Window_EquipStatus       =>        0.0
  60. Window_Gold              =>        0.0
  61. Window_Help              =>        0.0
  62. Window_Item              =>        0.0
  63. Window_MenuStatus        =>        0.0
  64. Window_Message           =>        0.0
  65. Window_NameEdit          =>        0.0
  66. Window_NameInput         =>        0.0
  67. Window_NumberInput       =>        0.0
  68. Window_PartyCommand      =>        0.0
  69. Window_SaveFile          =>        0.0
  70. Window_Selectable        =>        0.0
  71. Window_ShopBuy           =>        0.0
  72. Window_ShopNumber        =>        0.0
  73. Window_ShopSell          =>        0.0
  74. Window_ShopStatus        =>        0.0
  75. Window_Skill             =>        0.0
  76. Window_SkillStatus       =>        0.0
  77. Window_Status            =>        0.0
  78. Window_TargetEnemy       =>        0.0
复制代码
不知道是我写错了还是定义本来就非常快 = =
反正就是两次Time.now相减,精度不够的话望众位(望着紫苏)修正= =

WindowsXP,赛扬D 2.8Ghz, 1G DDR
(因为运行了很多次,所以觉得有点快,之前目测是大概需要3s)

只测试了script.rxdata定义的部分。
没有测试Main ← 这个咋测试{:nm_9:}
  1. class SimpleBenchMark
  2.   
  3.   attr_reader :mark_list
  4.   
  5.   def initialize
  6.     @mark_list  = {}
  7.     @init_tmark = Time.now
  8.     @last_mark  = Time.now
  9.     @last_cons  = Object.constants
  10.   end
  11.   
  12.   def mark
  13.     if @last_mark != nil
  14.       t_cost = Time.now - @last_mark
  15.       a_cons = Object.constants - @last_cons
  16.       @mark_list[a_cons] = t_cost
  17.       @last_cons = Object.constants
  18.     end
  19.     @last_mark = Time.now
  20.   end
  21.   
  22.   def get_total
  23.     return @last_mark - @init_tmark
  24.   end
  25.   
  26.   
  27. end


  28. dk_sbm = SimpleBenchMark.new
复制代码
从sound开始,每隔类的前面放一个dk_sbm.mark

统计:
  1. #p dk_sbm.mark_list

  2. file = File.open("DK_Simple_Bench_Mark_Testing.txt","w+")
  3. #dk_sbm.mark_list.each do |key,value|
  4. #  
  5. #  s_key = key[0].to_s
  6. #  while s_key.size < 25
  7. #    s_key << " "
  8. #  end
  9. #  file.write (s_key.to_s  + "=>" + "\t" + value.to_s + "\n")
  10. #  
  11. #end

  12. ary = dk_sbm.mark_list.keys.sort

  13. file.write ("total:" + dk_sbm.get_total.to_s + "\n")

  14. ary.each do |e|
  15.   t_e = e.to_s
  16.   while t_e.size < 25
  17.     t_e << " "
  18.   end
  19.   file.write (t_e.to_s  + "=>" + "\t" + dk_sbm.mark_list[e].to_s + "\n")
  20. end

  21. file.close
复制代码

See FScript Here:https://github.com/DeathKing/fscript
潜心编写URG3中。
所有对URG3的疑问和勘误或者建议,请移步至发布页面。
欢迎萌妹纸催更
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
34 小时
注册时间
2010-8-15
帖子
34
23
发表于 2010-8-18 15:08:05 | 只看该作者
我的4盒CPU,没有10秒现象

点评

和CPU没关系,是系统问题  发表于 2010-8-18 15:10
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
54
在线时间
36 小时
注册时间
2006-6-13
帖子
237
24
发表于 2010-8-20 13:40:06 | 只看该作者
我的WIN7表示也有10S问题。。。。
另外,测试战斗的时候,经常再战斗结束时,也要卡上好几秒钟战斗结束音乐才响起,然后才结束战斗。。。

点评

嗯,第二次就没问题了。估计是楼下说的声音的问题,头一次缓冲完了之后就没问题了。  发表于 2010-8-25 00:18
精灵出现了同样的问题+1 第二次战斗就没问题了  发表于 2010-8-24 11:09
目前任务:学习
目前进度:没有
最新说明:MUD嘛~~自由度~

原来泥巴更容易挖坑
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
61
在线时间
24 小时
注册时间
2008-8-5
帖子
1924
25
发表于 2010-8-20 14:21:05 | 只看该作者
确实和 DirectSound 有关,我的现象是在 VX 里,用程序自带的音乐测试,所有 BGM 和 ME 一律卡 4-6 秒;在 XP 中音乐测试不会卡,但实际执行 Audio.bgm_play 等函数的时候却会卡 4-6 秒
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
385 小时
注册时间
2007-7-27
帖子
4106

开拓者

26
发表于 2010-8-21 03:18:05 | 只看该作者
win7,关了UAC,音乐测试不卡
但是开游戏也要10s-_-

点评

是的  发表于 2010-8-21 16:48
你是否用控制面板关的UAC?  发表于 2010-8-21 05:09
吸吸
回复 支持 反对

使用道具 举报

Lv1.梦旅人

炎发灼眼的讨伐者

梦石
0
星屑
50
在线时间
1707 小时
注册时间
2007-8-4
帖子
904
27
发表于 2010-8-21 05:30:48 | 只看该作者
win7 vx和xp差不多都是1-2秒~~ ><
RMXP&amp;RMVX通用Web化完成- -|||
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
7 小时
注册时间
2010-8-16
帖子
114
28
发表于 2010-8-24 10:32:41 | 只看该作者
本帖最后由 木马惊魂 于 2010-8-24 10:43 编辑
  1. def start
  2.     super
  3.       load_newdatebase                  # 载入预设数据库
  4.     check_continue                    # 判断继续是否有效
  5.     create_title_graphic              # 生成标题画面图像
  6.     create_command_window             # 生成指令窗口
  7.     play_title_music                  # 播放标题画面音乐
  8.     create_game_objects               # 生成游戏对象
  9.     load_database                     # 载入数据库
复制代码
load_newdatebase在下面def load_newdatebase载入时候只载入$data_system        = load_data("Data/System.rvdata")
而load_database不载入$data_system        = load_data("Data/System.rvdata")
是不是会好点啊我是xp电脑比较不出来 我意思就是不管别的先显示出界面 从眼睛看见界面 视觉神经传导冲动 中枢神经处理 进大脑再支配手按键盘 怎么也得0.5秒吧 这时间再载入别的数据应该够吧
我脚本仅限看懂窗口坐标 也不知道这想法对不 毕竟载入的时候许多数据在标题界面不用

如果我数完的话......会发生什么?想知道吗?please wait...(编辑中~暂时不会发生什么...)
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
462 小时
注册时间
2007-7-30
帖子
643
29
发表于 2010-8-26 22:40:47 | 只看该作者
其实RM正在建置内部类
DK的方法基本基不了作用的
RGE这万年大坑 啥时填起来@@

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-26 06:54

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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