大家好,

我是一名即将毕业的游戏工程专业学生,目前完成最后一个学期的学习期只有三个月时间。刚刚,我完成了一个自定义C++/OpenGL引擎的开发(所有内容都利用Lua脚本实现,呈现完全依赖于文本/ NerdFonts图标)。

技术基础非常稳固(状态机、事件钩子、路径寻找都正在工作中)。您可以在这里看到游戏的总体视觉效果和当前基本游戏玩法:https://youtu.be/mhBfEaBOvSY

我的问题:由于我没有接受过官方的游戏设计教育,为了即将到来的展览,游戏需要成为一个非常具有挑战性的,高燃的20分钟演示。我的目标是让陌生玩家能够尽快进入“成流”状态。

建造、建筑(包括世界生成)和单位都是利用高级lua脚本API定义的,非常容易改变:

  • 例如,这是关于城堡建筑的定义:

    -- 町镇中心建筑配置
    -- 该建筑是可以生产村民和储存资源的主要建筑

    icon = “🏛️”
    description = "中央建筑可以生产村民和储存资源"
    health = 500
    max_health = 500

    render = [[
    ╭─────╮
    │ 🏛️ │
    ╰─────╯
    ]]

    collision = [[
    XXXXX
    XXXXX
    XXXXX
    ]]

    build_cost = {
    wood = 10,
    money = 20,
    }

    build_time = 0

    color_palette = {
    b = "building_border",
    i = "building_civic",
    }

    color_grid = [[
    bbbbbbb
    b..i..b
    bbbbbbb
    ]]

    -- 骑兵军团可以生产村民
    produces = {
    villager = {
    cost = {
    food = 50
    },
    time = 4.0
    }
    }

    -- 升级
    upgrades = {
    {
    id = "faster_training",
    name = "更快的训练",
    description = "减少骑兵军团训练时间50%",
    cost = {
    wood = 100,
    money = 50,
    },
    on_purchase = function(building, world)
    local current = building:get_modifier("training_speed", 1.0)
    -- 2.0x速度 = 50%时间减少
    building:set_modifier("training_speed", current * 2.0)
    end,
    },
    {
    id = "cheaper_villagers",
    name = "更便宜的村民",
    description = "减少村民成本50%",
    cost = {
    wood = 150,
    money = 100,
    },
    on_purchase = function(building, world)
    local current = building:get_modifier("unit_cost", 1.0)
    building:set_modifier("unit_cost", current * 0.50)
    end,
    },
    }

    -- 钩子
    hooks = {
    -- 当村民被生产时触发
    on_unit_produced = function(building, world, ctx)
    -- ctx.unit 是刚刚被创建的单位
    -- ctx.unit_type 是"村民"
    local unit = ctx.unit
    if unit then
    -- 将单位的团队设置为建筑的团队
    unit:set_team(building:get_team())
    -- 在村落附近创建 unidad
    local building_pos = building:get_position()
    local spawn_offset = world:find_spawn_position(building_pos, 2.0)
    unit:set_position(spawn_offset)
    end
    end,
    -- 当资源被存放到军团中心时触发
    on_resource_deposited = function(building, world, ctx)
    -- ctx.unit 将存放资源的单位
    -- ctx.resource_type 将存放资源的类型
    -- ctx.amount 将存放的资源数量
    end,
    }

我对当前无法想出一些酷的建筑、单位和结构概念的设定方式倍感困扰。截至现在,我只有一个RTS游戏是Age of Empires。

我想利用我开发的引擎的灵活性并从低成本的设计和迭代中获益。

任何反馈、概念或只是随机的思想都是非常感谢的!