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

Project1

 找回密码
 注册会员
搜索
查看: 27394|回复: 57

[转载] 我找到了RMXP真3D的(重要!)脚本达人分享(有视频真相!

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
59 小时
注册时间
2012-3-10
帖子
36
发表于 2012-4-10 22:02:16 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 robot凯恩 于 2012-4-10 22:49 编辑

是在外国网站找到的

先放几个脚本

你们研究下


游戏范例我也有


我做个视频你们看看 绝对震撼

  1.   DF_GameWindow.set_dimensions(0,0,0,0)
  2.   device = DF3DDevice.new(Video::EDT_DIRECT3D9, [800,600], 32, false)
  3.   smgr = device.scene_manager
  4.   driver = device.video_driver
  5.   camera = smgr.add_camera_scene_node_FPS
  6.   camera.set_position(-100,300,-100)
  7.   camera.set_target(0,0,0)
  8.   $data_tilesets      = load_data("Data/Tilesets.rxdata")
  9.   $data_common_events = load_data("Data/CommonEvents.rxdata")
  10.   $game_map = Game_Map.new
  11.   $game_map.setup(1)
  12.   
  13.   for i in 0...20
  14.     for j in 0...15
  15.       for k in 0...3
  16.         if $game_map.data[i,j,k] != 0
  17.           node = smgr.add_cube_scene_node(64)
  18.           node.set_position(i * 64, k * 64, j * 64)
  19.           node.set_material_flag(Video::EMF_LIGHTING, false)
  20.           texture_name = ($game_map.data[i,j,k] - 383).to_s + ".png"
  21.           node.set_material_texture(0, driver.get_texture(texture_name))
  22.         end
  23.       end
  24.     end
  25.   end
  26.   
  27.         
  28.   
  29.   lasttime = Time.now
  30.   while device.run
  31.     DF_Input.update
  32.    
  33.     if DF_Input.trigger?(DF_Input::KEY_F)
  34.       p driver.get_fps
  35.     end
  36.    
  37.     time = Time.now
  38.     if time - lasttime > 5
  39.       Graphics.update
  40.       lasttime = Time.now
  41.     end
  42.     driver.begin_scene(true, true, [255, 160, 160, 255])
  43.     smgr.draw_all
  44.     driver.end_scene
  45.   end
  46.   
  47.   device.drop
复制代码
另外一段
  1. #First, let's move the 2D window out of the way:
  2.   DF_GameWindow.set_dimensions(0,0,0,0)
  3.   #next, let's create out device. The parameters are:
  4.   #Driver type, screen size (in an array), bits per pixel, and fullscreen
  5.   #This device is the central point of the 3D engine. Absolutely everything
  6.   #can be accessed through this device.
  7.   device = DF3DDevice.new(Video::EDT_DIRECT3D9, [800,600], 32, false)
  8.   #Now, let's get our scene manager. The scene manager does stuff like adding nodes
  9.   #and cameras
  10.   smgr = device.scene_manager
  11.   #Now, let's get our driver. The driver handles actually rendering.
  12.   driver = device.video_driver
  13.   #Let's get our mesh! (Note that you should probably add error handling here.
  14.   #smgr.get_mesh will return nil if it can't find the file so make sure you
  15.   #always check that the mesh was actually created. I didn't do any error handling
  16.   #but a simple check for nil would suffice)
  17.   mesh = smgr.get_mesh("sydney.md2")
  18.   #Let's create an animated scene node from the mesh. Again, normally you
  19.   #want to check for errors.
  20.   node = smgr.add_animated_mesh_scene_node(mesh)
  21.   #now, let's add a camera to the scene node! Camera are how you view everything
  22.   #in the scene. Note that it is possible to have more than one camera and
  23.   #you can switch between them, or even have them render to different parts
  24.   #of the screen.
  25.   camera = smgr.add_camera_scene_node
  26.   #move our camera, since both the camera and scene node are at the same, default
  27.   #position right now. (Which is (0,0,0)) Note that the parameters here are x, y, z.
  28.   #when your camera is at (0,0,0) and has no rotation, x is sideways, y is up,
  29.   #and z is forwards/backwards
  30.   camera.set_position(100,100,100)
  31.   #Rememeber how I said that the default position is 0,0,0? Well, since we never moved
  32.   #our node, it is at 0,0,0 right now. So, Let's tell the camera to look there:
  33.   camera.set_target(0,0,0)
  34.   
  35.   lasttime = Time.now
  36.   while device.run #check if our device is still running
  37.     #begin rendering the scene. I will not explain what these parameters are yet
  38.     #it's not important right now, and it's kind of complicated XD
  39.     driver.begin_scene(true, true, [255, 160, 160, 255])
  40.     smgr.draw_all #draw all of the scene nodes
  41.     driver.end_scene #finish rendering the scene
  42.     #this junk is just so Graphics doesn't whine.
  43.     time = Time.now
  44.     if time - lasttime > 5
  45.       Graphics.update
  46.     end
  47.   end
  48.   
  49.   #Now, alway always always remember to drop your device when you are done.
  50.   #The device is something you should only drop at the end of your game, after
  51.   #the device no longer runs.
  52.   device.drop
复制代码
这个是我刚用范例做的视频 忘记调清晰度了

有点不清楚

不过这绝对是真3D

鼠标控制视角

方向键行走

FPS在150-230之间

想走也很流畅的

点评

那个视频看得头晕晕的(3D眩晕症)  发表于 2012-4-15 21:01
转载内容请附上原发布地址。请尊重他人劳动成果。  发表于 2012-4-14 13:43
请注明源地址,谢谢支持。  发表于 2012-4-13 22:45

Lv1.梦旅人

梦石
0
星屑
50
在线时间
40 小时
注册时间
2012-3-31
帖子
78
发表于 2012-4-10 22:10:41 | 显示全部楼层
看看,,,,,,,,,,,不会有

点评

你不是那个最美的?  发表于 2014-2-11 23:11
注意内容,不要灌水,囧。  发表于 2012-4-10 22:43

评分

参与人数 1星屑 -2 收起 理由
无双sxa -2 灌水的说~

查看全部评分

全国最好的RPG论坛
44rpg.uueasy.com
回复 支持 反对

使用道具 举报

Lv1.梦旅人

欠扁头像持有者

梦石
0
星屑
114
在线时间
16 小时
注册时间
2005-10-22
帖子
423
发表于 2012-4-13 11:11:54 | 显示全部楼层
我晕,这效果...这流畅度...但是用来做虾米呢

点评

完成很多人的3D梦吧,尽管不一定成功但因为爱好还是可以试试。  发表于 2012-4-13 12:57
水兵土星--死亡之星!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
45
在线时间
138 小时
注册时间
2011-11-15
帖子
216
发表于 2012-4-13 13:10:42 | 显示全部楼层
本帖最后由 oobuluo 于 2012-4-13 13:10 编辑

我只能说,我表示我不知道该用啥素材,是先用3DMAX建模?然后导入xp文件夹?????
希望解答&……

点评

这么做岂不是很麻烦3D建模是很费精力和时间的- - 估计以这个游戏的视角你建立一个透明的角色就成了  发表于 2014-7-15 02:03
回复 支持 反对

使用道具 举报

Lv1.梦旅人

神仙

梦石
0
星屑
69
在线时间
596 小时
注册时间
2007-5-14
帖子
1289
发表于 2012-4-13 16:38:04 | 显示全部楼层
的确好强大的样子!不过,还是很不完善。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
94
在线时间
648 小时
注册时间
2009-2-3
帖子
238
发表于 2012-4-13 21:35:16 | 显示全部楼层
我会告诉你这是API的外部引擎么。。。。 RM只作为一个显示窗口而已

评分

参与人数 2星屑 +22 收起 理由
化螺耕 + 10 感觉很高端。。。。。
@冷剑少侠 + 12 没错

查看全部评分

回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
681
在线时间
791 小时
注册时间
2011-10-20
帖子
2394

开拓者

发表于 2012-4-13 22:11:07 | 显示全部楼层
这是rm(人吗;人做的吗)吗
欢迎点此进入我的egames.wink.ws,有RMQQ堂等

[url=http://rpg.blue/thread-317273-1-1.html]短篇八-赶选

http://yun.baidu.com/share/link?shareid=2158225779&uk=169642147&third=0


历险ARPG赢回你的疆域新的战斗模式?…………点击这里:[宋乱贼狂 for QQ堂]
http://rpg.blue/group-368-1.html
programing ....?
[url=http://rpg.blue/thrd-234658-1-1.html]
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
43
在线时间
233 小时
注册时间
2012-3-4
帖子
986
发表于 2012-4-13 22:16:15 | 显示全部楼层
这应该还是需要调用其他外置程序来完成吧,你发的脚本里面的东西都没有在RM里面看到相关定义。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
49
在线时间
539 小时
注册时间
2012-1-15
帖子
1234
发表于 2012-4-14 13:01:16 | 显示全部楼层
求范例 = = 这脚本看起来忒复杂

点评

嘛我知道到了各种伪3D...  发表于 2012-4-14 13:50
范例暂时没有,可以看看其他的帖子,还有各种3D。  发表于 2012-4-14 13:12
骑鹿走歧路,路不平鹿颠行,人心难安定。

男儿志兮天下事,但有进兮不可止,言志已酬便无志

黑夜穿梭幽灵影,白色骷髅形似马,郎唤南宫名带恨,君扬怒眉杀天下
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (管理员)

老黄鸡

梦石
0
星屑
39544
在线时间
7482 小时
注册时间
2009-7-6
帖子
13482

开拓者贵宾

发表于 2012-4-14 13:35:12 | 显示全部楼层
本帖最后由 fux2 于 2012-4-14 13:35 编辑

无非是劫持了RM的窗口而已,这已经不算是RM了,凭什么算RMXP的真3D?这个3D系统难道利用到了RM的任何一个功能?

点评

理论上讲这不算是RM 但是没有RM这个程序还是没法运行的(不创建新程序的情况下)  发表于 2014-7-15 02:05
头像很带感。。。  发表于 2014-3-5 19:55
对话功能=w=  发表于 2013-7-28 07:58
RGDirect - DirectX驱动的RGSS,点我了解.
RM全系列成套系统定制请联系QQ1213237796
不接受对其他插件维护的委托
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 06:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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