Project1

标题: 我找到了RMXP真3D的(重要!)脚本达人分享(有视频真相! [打印本页]

作者: robot凯恩    时间: 2012-4-10 22:02
标题: 我找到了RMXP真3D的(重要!)脚本达人分享(有视频真相!
本帖最后由 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之间

想走也很流畅的


作者: 纷纷雪    时间: 2012-4-10 22:10
看看,,,,,,,,,,,不会有
作者: 宾少    时间: 2012-4-13 11:11
我晕,这效果...这流畅度...但是用来做虾米呢
作者: oobuluo    时间: 2012-4-13 13:10
本帖最后由 oobuluo 于 2012-4-13 13:10 编辑

我只能说,我表示我不知道该用啥素材,是先用3DMAX建模?然后导入xp文件夹?????
希望解答&……
作者: 李梦遥    时间: 2012-4-13 16:38
的确好强大的样子!不过,还是很不完善。
作者: lanyaolove    时间: 2012-4-13 21:35
我会告诉你这是API的外部引擎么。。。。 RM只作为一个显示窗口而已
作者: end55rpg    时间: 2012-4-13 22:11
这是rm(人吗;人做的吗)吗
作者: 夏侬    时间: 2012-4-13 22:16
这应该还是需要调用其他外置程序来完成吧,你发的脚本里面的东西都没有在RM里面看到相关定义。
作者: 熊喵    时间: 2012-4-14 13:01
求范例 = = 这脚本看起来忒复杂
作者: fux2    时间: 2012-4-14 13:35
本帖最后由 fux2 于 2012-4-14 13:35 编辑

无非是劫持了RM的窗口而已,这已经不算是RM了,凭什么算RMXP的真3D?这个3D系统难道利用到了RM的任何一个功能?
作者: 哥是传说    时间: 2012-4-14 13:55
鲁大妈的3D显卡测试画面
作者: lianran123456    时间: 2012-4-26 20:24
哥是传说 发表于 2012-4-14 13:55
鲁大妈的3D显卡测试画面

+1                                                 .
作者: 1370528656    时间: 2012-6-8 17:17
请求 原发布地址范例工程,我想研究下!
谢谢!
作者: ♂雨    时间: 2012-6-8 17:35
LZ发个附件
作者: R-零    时间: 2012-6-8 17:58
真3D可以借用irrlicht,关于这个,柳之一在很久以前应该有研究过。
作者: Fracture    时间: 2012-8-17 15:58
唔 好像某电脑软件的游戏性能测试
作者: 1584927450    时间: 2012-8-18 17:24
你确定这是RM?这?连阿尔西斯都木有偶额的说,而且,看上去像某种3D游戏的说,各位的3D游戏梦早就被这种类似的脚本打死了的说。
作者: 1733450036    时间: 2012-8-18 17:48
这地图我见过,以前用360检测机子系统时就是这个地图
作者: x水管修理工x    时间: 2013-7-5 00:38
这有点像穿越火线啊
作者: 请叫我丶戴波    时间: 2013-7-5 14:53
怎么有点锤子的感觉呢,好吧我不应该拿锤子和它相提并论~
我去,再怎么修改脚本也不至于搞出3D的效果吧~
我感觉楼上的几位朋友已经正解了~
作者: tseyik    时间: 2013-7-6 16:52
這是叧一個3D引擎(irrlicht)做的

RM只是像放影片般的存在

作者: 秋寒    时间: 2013-7-19 09:30
好多dll啊。。。不过感觉还好,LZ把范例传到网盘上吧
作者: 开关关    时间: 2013-7-19 12:21
fux2 发表于 2012-4-14 13:35
无非是劫持了RM的窗口而已,这已经不算是RM了,凭什么算RMXP的真3D?这个3D系统难道利用到了RM的任何一个功 ...

似乎用到了rgss。
作者: gqhondafit    时间: 2013-7-19 13:19
看起来很好,不过按照RMXP自带的地图是不能拼接成这样的吧?
希望楼主能把范例发出来看看。
作者: c248611    时间: 2013-7-20 11:57

作者: 张咚咚    时间: 2013-7-22 15:53
呵呵,你们还真信了他的两个脚本了?这两个脚本只是其中一部分而已
作者: 丿梁丶小柒    时间: 2013-7-28 11:09
为啥我感觉这里面的地图跟柳柳的那个3D游戏《梦想世界》的地图是一样。
作者: c248611    时间: 2013-7-28 15:41
怎么用呀?
作者: minyang2    时间: 2014-2-4 13:56
脚本放在脚本编辑器的哪个地方
作者: 落月小天魔    时间: 2014-3-13 20:07
求范例下载,看视频是调用dll程序了。
作者: phpnacl    时间: 2014-3-17 13:53
求範例 大俠 感恩囉
作者: 赛露休斯    时间: 2014-3-31 17:05
他这个已经超越了RM的范畴了
作者: 许俊兴    时间: 2014-6-18 09:17
啊啊啊啊啊,为什么会这样!C:\Documents and Settings\Administrator\桌面\360软件小助手截图20140618091532.png
作者: 许俊兴    时间: 2014-6-18 09:22
为什么会出错?
作者: zeldafd    时间: 2014-6-18 15:08
你們看看片中他有多少個DLL吧...
一看就知道用兩個腳本根本沒可能把RM改成3D...
請各位用一下腦子...

還有...根本已經不是RM了...倒不如用UE更實際...
雖然你的標題是沒騙人...是在RM的窗口運行...但很多人也不知道實際上為什麼會這樣...就真的信了RM能做3D了...
作者: bobcaocheng    时间: 2014-6-18 20:38
说实话,这个脚本的原工程我有。但是的确调用了5个dll,但是伟大之处有两个:
1。这个可以用rm地图编辑器来编辑地图与贴图。
2。这个3d引擎基于像素扭曲,也就是完全自主的3d引擎。绝不是dirext3d或opengl
作者: 【法克鱿】    时间: 2014-7-10 17:27
那视频,似曾相识!
鲁大师里用来测试电脑屏幕刷新率的东西!!
---------------------------------------------------------------------万恶的验证码
作者: xiaorang    时间: 2015-4-29 16:45
让人头晕的3D游戏真的好么?真的吸引人么?
作者: szcszc156    时间: 2015-5-5 07:59
不错只是好奇怎么让NPC3D
作者: 卡奥尼特    时间: 2015-8-11 23:52
没有范例工程,视频内也没有什么NPC。感觉很假...
(=゚ω゚)=
作者: 1745236314    时间: 2015-8-27 19:10
end55rpg 发表于 2012-4-13 22:11
这是rm(人吗;人做的吗)吗

你的QQ堂同人还更新吗
作者: 搞事    时间: 2020-1-18 11:52
视频呢?我怎么看不见
作者: skydugy    时间: 2022-6-30 18:11
3D的话,比较复杂吧




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1