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

Project1

 找回密码
 注册会员
搜索
查看: 27508|回复: 57
打印 上一主题 下一主题

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

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
59 小时
注册时间
2012-3-10
帖子
36
跳转到指定楼层
1
发表于 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之间

想走也很流畅的

Lv1.梦旅人

梦石
0
星屑
130
在线时间
7 小时
注册时间
2021-9-19
帖子
1
58
发表于 2022-6-30 18:11:09 | 只看该作者
3D的话,比较复杂吧
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
136
在线时间
7 小时
注册时间
2020-1-18
帖子
12
57
发表于 2020-1-18 11:52:02 | 只看该作者
视频呢?我怎么看不见
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
100 小时
注册时间
2014-10-22
帖子
161
56
发表于 2015-8-27 19:10:21 | 只看该作者
end55rpg 发表于 2012-4-13 22:11
这是rm(人吗;人做的吗)吗

你的QQ堂同人还更新吗

开一个坑,废一个坑
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2599
在线时间
2367 小时
注册时间
2012-3-1
帖子
739
55
发表于 2015-8-11 23:52:49 | 只看该作者
没有范例工程,视频内也没有什么NPC。感觉很假...
(=゚ω゚)=
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
251 小时
注册时间
2010-7-22
帖子
88
54
发表于 2015-5-5 07:59:52 | 只看该作者
不错只是好奇怎么让NPC3D
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
66 小时
注册时间
2009-7-16
帖子
164
53
发表于 2015-4-29 16:45:12 | 只看该作者
让人头晕的3D游戏真的好么?真的吸引人么?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
49
在线时间
23 小时
注册时间
2014-7-7
帖子
15
52
发表于 2014-7-10 17:27:53 | 只看该作者
那视频,似曾相识!
鲁大师里用来测试电脑屏幕刷新率的东西!!
---------------------------------------------------------------------万恶的验证码
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
2
星屑
165
在线时间
169 小时
注册时间
2013-1-1
帖子
166
51
发表于 2014-6-18 20:38:55 | 只看该作者
说实话,这个脚本的原工程我有。但是的确调用了5个dll,但是伟大之处有两个:
1。这个可以用rm地图编辑器来编辑地图与贴图。
2。这个3d引擎基于像素扭曲,也就是完全自主的3d引擎。绝不是dirext3d或opengl
?????
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
52
在线时间
704 小时
注册时间
2011-12-27
帖子
941
50
发表于 2014-6-18 15:08:31 | 只看该作者
你們看看片中他有多少個DLL吧...
一看就知道用兩個腳本根本沒可能把RM改成3D...
請各位用一下腦子...

還有...根本已經不是RM了...倒不如用UE更實際...
雖然你的標題是沒騙人...是在RM的窗口運行...但很多人也不知道實際上為什麼會這樣...就真的信了RM能做3D了...

点评

你说的太绝对啦  发表于 2014-6-18 20:39
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-6 17:21

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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