Project1

标题: 新人求教横版的游戏模式是怎么做出来的?不是横版战斗。 [打印本页]

作者: jacklee055    时间: 2017-3-5 17:42
标题: 新人求教横版的游戏模式是怎么做出来的?不是横版战斗。
RT萌新求教,看了像《拆不开的礼物》和《正面反面》这种横版的游戏也是拿RPGMakerVX Ace做出来的,也想做个横板的游戏可是找到的都是说怎么做横版战斗
求dalao教这种怎么做啊,是要脚本么?

003027vmh2emb4m4j2hmfm.jpg (163.43 KB, 下载次数: 24)

《拆不开的礼物》

《拆不开的礼物》

124405f9qg9ow2gjdq6dtd.jpg (107.37 KB, 下载次数: 29)

《正面反面》

《正面反面》

作者: axicc    时间: 2017-3-5 19:02
1:可以用图块把头上事件弄成不可通行
2:使用重力脚本
随便 重力脚本如下
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Game_CharacterBase
  4. #------------------------------------------------------------------------------
  5. #  管理地图人物的基本类。是所有地图人物类的共通父类。拥有坐标、图片等基本信息。
  6. #==============================================================================
  7. =begin
  8.   Hello!大家好
  9.   我是 茄子
  10.   
  11.   很久没有来6R了,现在看见新的编辑器出来不免心动了,又玩起来RMVA来!
  12.   鄙人历来喜欢动作类游戏,希望这个脚本能给大家一点好的用处!
  13.   这是一个简单的【跳跃+重力脚本】
  14.   使用方法很简单
  15.   (1)
  16.    大家根据范例里的每个事件的设置看吧!
  17.   (2)
  18.   修改角色跳跃高度 建议取值 1-5
  19.   $game_player.g_height = 5 # 基本值为5 越低则越高
  20.   (3)
  21.   让所有角色能发动跳跃请打开跳跃开关即可跳跃1次!
  22.   比如让主角跳跃1次
  23.   $game_player.jump_start = true
  24.   比如让事件1号跳跃1次
  25.   $game_map.events[1].jump_start = true
  26.   范例在Scene_Map中按下空格键即可让主角跳跃一次!
  27.     if Input.trigger?(:C)
  28.       $game_player.jump_start
  29.     end
  30.    当然让事件跳跃只要在事件的【移动路线】里面的【脚本】使用jump_start
  31.    就可以让事件跳跃了!
  32. =end
  33. #==============================================================================
  34. class Game_CharacterBase
  35.   #--------------------------------------------------------------------------
  36.   # ● 全局开关
  37.   #--------------------------------------------------------------------------
  38.   $gravity_key = true
  39.   #--------------------------------------------------------------------------
  40.   # ● 定义实例变量
  41.   #--------------------------------------------------------------------------
  42.    attr_accessor :g_speed_down
  43.    attr_accessor :g_speed_up
  44.    attr_accessor :g_key
  45.    attr_accessor :isDown
  46.    attr_accessor :isUp
  47.    attr_accessor :g_height
  48.    attr_accessor :jump_key
  49.    attr_accessor :jump_number
  50.    attr_accessor :gravity_key
  51.    attr_accessor :double_key
  52.   #--------------------------------------------------------------------------
  53.   # ● 初始化对象
  54.   #--------------------------------------------------------------------------
  55.   def initialize
  56.     init_public_members
  57.     init_private_members
  58.     @g_speed_down = 0.098
  59.     @g_speed_up = 0.5
  60.     @g_height = 3 # 越低跳的越高
  61.     @jump_number = 0
  62.     @g_key = true
  63.     @isDown = false
  64.     @isUp = false
  65.     @jump_key = false
  66.     @gravity_key = true
  67.     @double_key = false
  68.   end
  69.   #--------------------------------------------------------------------------
  70.   # ● 总判断
  71.   #--------------------------------------------------------------------------
  72.   def start_can?
  73.     # 如果行走图为空则无【跳跃重力】
  74.     return false if @character_name == ""
  75.     # 如果重力开关关闭则无【跳跃重力】
  76.     return ($gravity_key == false or @gravity_key == false)
  77.   end
  78.   #--------------------------------------------------------------------------
  79.   # ● 起跳
  80.   #--------------------------------------------------------------------------
  81.   def jump_start
  82.     if jump_can?
  83.     @g_speed_up = 0.5
  84.     @jump_key = true
  85.     @isDown = false
  86.     @g_key = false
  87.     @jump_number += 1
  88.     return
  89.     end
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ● 可否再跳
  93.   #--------------------------------------------------------------------------
  94.   def jump_can?
  95.     if @double_key
  96.       return @jump_number <= 1 # 1则为最高跳跃2次,可自行修改如4则可跳跃5次
  97.     else
  98.       return @jump_number <= 0
  99.     end
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # ● 更新画面
  103.   #--------------------------------------------------------------------------
  104.   def update
  105.     update_animation
  106.     update_gravity
  107.     update_real_jump
  108.     return update_jump if jumping?
  109.     return update_move if moving?
  110.     return update_stop
  111.   end

  112.   #--------------------------------------------------------------------------
  113.   # ● 跳跃效果
  114.   #--------------------------------------------------------------------------
  115.   def update_real_jump
  116.       # 如果重力开关关闭则重力失效
  117.       if start_can?
  118.          return
  119.        end
  120.       # 如果不在下落时
  121.       if @jump_key == true && @isDown == false
  122.         @g_key = false
  123.           if passable?(@x, @real_y.floor, 8) and @y > 0
  124.              if @g_speed_up > 0
  125.                @g_speed_up -= @g_height*0.01
  126.                @y -= @g_speed_up
  127.                @real_y = @y
  128.              else   
  129.                @jump_key = false
  130.                @real_y = @real_y
  131.                @y = @real_y
  132.                @g_key = true
  133.              end
  134.            else
  135.                @jump_key = false
  136.                @real_y = @real_y
  137.                @y = @real_y
  138.                @g_key = true
  139.           end     
  140.       end
  141.   end
  142.   #--------------------------------------------------------------------------
  143.   # ● 重力效果
  144.   #--------------------------------------------------------------------------
  145.   def update_gravity
  146.       # 如果重力开关关闭则重力失效
  147.       if start_can?
  148.          return
  149.       end
  150.       # 如果下落开关打开的话
  151.       if @g_key == true
  152.        if passable?(@real_x.round, @y, 2) and @y <= $game_map.height
  153.          @g_speed_down += 0.01
  154.          my = get_down_pos(@y)
  155.          dt = my - @y
  156.          if dt > @g_speed_down
  157.            @y += @g_speed_down
  158.          else
  159.            @y += dt
  160.          end
  161.          @real_y = @y
  162.          @isDown = true
  163.        else
  164.          @jump_number = 0
  165.          @real_y = @real_y.floor
  166.          @y = @real_y
  167.          @g_speed_down = 0.098  
  168.          @isDown = false
  169.        end
  170.       end
  171.     end
  172.   #--------------------------------------------------------------------------
  173.   # ● 取得上一个障碍点的
  174.   #--------------------------------------------------------------------------
  175.   def get_up_pos(sy)
  176.       my = sy.floor
  177.       while(true)
  178.          if passable?(@x, my, 8) == false
  179.            return my
  180.          else
  181.            my -= 1
  182.          end
  183.       end
  184.   end
  185.   #--------------------------------------------------------------------------
  186.   # ● 取得下一个障碍点的
  187.   #--------------------------------------------------------------------------
  188.   def get_down_pos(sy)
  189.       my = sy.floor
  190.       while(true)
  191.          if passable?(@x, my, 2) == false
  192.            return my
  193.          else
  194.            my += 1
  195.          end
  196.       end
  197.   end
  198.   #--------------------------------------------------------------------------
  199.   # ● 判定是否移动中
  200.   #--------------------------------------------------------------------------
  201.   def moving?
  202.     if start_can?
  203.     @real_x != @x
  204.     else
  205.     @real_x != @x || @real_y != @y
  206.     end
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # ● 径向移动
  210.   #     d       : 方向(2,4,6,8)
  211.   #     turn_ok : 是否可以改变方向
  212.   #--------------------------------------------------------------------------
  213.   def move_straight(d, turn_ok = true)
  214.        if start_can?
  215.          if d == 2 or d == 8
  216.            return
  217.          end
  218.        end
  219.        @move_succeed = passable?(@x, @y, d)
  220.        if @move_succeed
  221.           set_direction(d)
  222.           @x = $game_map.round_x_with_direction(@x, d)
  223.           @y = $game_map.round_y_with_direction(@y, d)
  224.           @real_x = $game_map.x_with_direction(@x, reverse_dir(d))
  225.           @real_y = $game_map.y_with_direction(@y, reverse_dir(d))
  226.           increase_steps
  227.        elsif turn_ok
  228.           set_direction(d)
  229.           check_event_trigger_touch_front
  230.        end
  231.   end
  232. end
复制代码

作者: ylylhl    时间: 2017-3-5 19:52
两种办法。
第一种是使用远景图,之后设置一个透明的可通行图块来绘制可以行走的部分:
【遠景床用、スクロール固定スクリプト】
「Creava's Nest」(http://creava.cocolog-nifty.com/blog/
第二种是像【绘心】那样直接用事件显示,把地图背景做成行走图。作者大大超强的,要不是因为汉化不完整所以拆包了我大概一辈子都想不到这个方法orz
游戏在论坛的【翻译游戏发布区】有下载,不知道现在有没有修复汉化不完全的bug(。
https://rpg.blue/forum.php?mod=v ... &extra=page%3D2
作者: 黑雪哲也    时间: 2017-3-10 18:33
如果要簡單做的話,用雙遠景腳本把圖片固定
然後人物行走圖問題 我是用畫比較大的人物做 設定哪裡可以走哪裡不能走可用透明方格設定





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