new resource: map_loader

未关闭
#697 7 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
json, lua
领域
backend

调研方向

Start by reading the existing MTA map loading behavior referenced in the issue, including meta.xml <map/> nodes and loadMapData, then review the author's proposed map loader resource approach. The issue asks for opinions on replacing or deprecating the current loader and adding broad capabilities, but does not identify files, tests, or a settled scope; a clear done state would need to be agreed on first.

由索引模型根据 Issue 内容生成。

描述

enhancement

Is your feature request related to a problem? Please describe.
In short, MTA Map Loading system (through meta.xml <map/> nodes or loadMapData (probably nobody uses this feature) has limitations:

  • It's server-side and uses element data (inefficient)
  • Maps exported by map editor even require a mapEditorScriptingExtension_c.lua script to do removeWorldObject and LODs!!! This duplicates a lot of code.
  • It doesn't support createBuilding
  • It doesn't support new models, which are incredibly popular since the addition of engineRequestModel
  • It doesn't support custom textures, which servers since shaders were invented
  • ...

Describe the solution you'd like
I believe the solution is not to expand the MTA Map Loader in C++ (mtasa-blue code), but instead to remove it (deprecate nodes etc) and create a map loader resource (official) that does everything the current system does + all the nice fun features we can add.
The idea is that new official resource will be included in the default resources pack, allowing any server to use it to load their maps through:

  • File drag & drop
  • Custom exported functions
  • etc

Additional context
Honestly I've already created a map loader for fun and for several servers in the past, it's pretty simple.
A map is just a list of elements to spawn at certain positions with certain properties.
The list can be stored on any popular format like JSON, then just use Lua functions to spawn the elements and set their properties.
We can even use the new glob features (<file src="maps/**/*.json"/>) if useful.

Tell us your opinion about this.

主要语言
Lua
星标
185
派生
180
平均合并
5 天 13 小时
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

multitheftauto/mtasa-resources 的其他 Issue

查看 multitheftauto/mtasa-resources 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。