当前位置:网站首页>Oops novice template Framework project guide
Oops novice template Framework project guide
2022-08-11 01:56:00 【dgflash_game】
Oops FrameworkOpen source has been open for more than a year now,Many students joined the exchange of frameworksQQ群中,Trying to learn and use this framework to develop games.
在这段时间中,Also came into contact with some first tryCocos CreatorStudents who develop games,After seeing the framework code,It feels like there is more content in the frame,Not sure where to start learning.Therefore, in the follow-up maintenance, most modules are further designed to be optional,设计思路与Cocos CreatorThe module culling function in .And these technical points,It is not strongly dependent on the game business,It can be selected after we understand it,This allows for smoother learning,Learn one technical point per project.
Also designed a set of game project templates,After downloading directly, you can develop custom game business logic on it,Save after downloading the demo project,Also manually remove unnecessary demo code.
Oops Framework 介绍
Oops Framework是基于Cocos Creato 3.xgame engine with TypeScriptSet of game boxes for language design.
The framework encapsulates common techniques for game development,Make game development easier,提高开发效率.Let developers focus more on game content and game experience,Thereby improving the quality of the game.
The latest version of the framework is provided as a plugin,The purpose of this design is that subsequent upgrades only need to be performed on the plugin directorygit pullYou can update to the latest version.
The business coupling between framework modules is low,coreThe content under the folder is the core code of the framework,Essential technology for game development;libsFolders are optional technology,Unnecessary content can be customized according to the project situation;moduleThe folder is the general module of the game,可以理解为core或libsspecific applications of the technology.
Plug-in version of the framework source codeDirectory structure and module descriptions
core - Box plus core technology library
common - Game public module
audio - 音频模块
event - 全局事件
loader - 加载模块
log - 日志模块
manager - 时间管理、random management
storage - 本地存储
game - 游戏世界类
gui - 游戏界面类
layer - Multilayer interface、窗口管理
prompt - Common prompt window
utils - A library of tools for games
Oops.ts - Framework function access interface
Root.ts - The frame view layer root node manages components
libs - Optional technology library in the framework
animator - 动画状态机
animator-effect - Animation effects components
animator-move - Animate moving components
behavior-tree - Behavior tree framework
camera - 3D camera control component
collection - Data collection processing
ecs - ECS框架
gui - 界面组件
badge - Red dots suggest components
button - 按钮组件
label - 标签组件
language - 多语言组件
model-view - MVVM框架
network - 网络模块
render-texture - Render texture components
security - 安全组件
module - Game general module
common - 公共模块
config - 配置模块
Create a game template project
- 下载模板项目
git clone https://gitee.com/dgflash/oops-game-kit.git
注:The template project is based onCocos Creator 3.6开发,Please download the latest version of the editor to open the project,点击下载 Cocos Creator 3.6,Subsequent official editions can be directly publishedCocosDashboard中下载.
Install the framework plugin for the first time
windows
md extensions
cd extensions
git clone -b master https://gitee.com/dgflash/oops-plugin-framework.git
git pull
mac
mkdir -p extensions
cd extensions
git clone -b master https://gitee.com/dgflash/oops-plugin-framework.git
git pull
Template project directory structure
res - Prefab referenced static resources
resources - Dynamically load referenced resources
audio - 音乐资源
common - 公共资源
config - 配置资源
game - Game custom content configuration data sheet
config.json - The framework configures resources by default(可扩展内容)
content - Customize dynamically loaded content resources
game - Core gameplay content resources
gui - 界面资源
loading - Game loading interface for the first time
language - 多语言资源
script - 游戏脚本
game - Game business module
common - Game public module
config - 游戏配置
GameEvent.ts - Global event configuration
GameUIConfig.ts - Interface window configuration(提供oops.guiConfiguration data used by the module)
table - Game configuration table object(可通过oops-plugin-excel-to-json自动生成)
initialize - Game initialization module
SingletonModuleComp.ts - Game singleton business module
Main.ts - 游戏入口脚本
根据上面的目录结构,在开发游戏时,Resources can be stored in corresponding folders for management.This template project comes with the following essential game features.
- 屏幕自适应
- Game local configuration data acquisition
- Game address query parameter acquisition
- The game initiates the business process
- Initial customizable resource loading prompt interface
- Load up with a realistic first game custom interface
屏幕自适应
Cocos Creator 菜单->项目->项目设置
Landscape adaptive
Vertical screen adaptation
设置好后,The rest can be handled automatically by the framework.
Game initialization module
A must-have resource to load when the game starts
initialize/bll/InitRes.ts
This script manages the necessary resources that are loaded when the game starts,此处要注意的是,The resources configured here are as small as possible,Avoid prolonged black screen during silent loading phase,Deteriorating the gaming experience.
- 加载公共资源
- 加载多语言包(可选)
- 加载自定义资源(可选)
initialize/view/LoadingViewComp.ts
This script is the control script for the game content resource loading interface,Game content resources are generally large,There will be a loading progress bar prompt to improve the game experience.After all resources are loaded,The first custom screen for the game is displayed by executing the following script.
oops.gui.open(UIID.Demo);
The next step is to develop custom game logic,Module code style can refer toOops FrameworkThe role module implementation in .
学习交流 QQ 群:798575969
边栏推荐
- 《QA离业务代码能有多近?》轻量级单元测试方案
- HCIP-R&S By Wakin自用笔记(3)OSPF之引入外部路由、Forwarding-Address、汇总、特殊区域
- 连流量染色都没有,你说要搞微服务?
- 软件测试面试题:谈谈你对 cmm 和 is9000 的认识?
- 惨遭面试官吊打高并发系统设计,回来学习 2400 小时后成功复仇
- 【iframe父页面调用子页面的方法】踩坑:获取元素的时候需要用 `[x]`是关键,不能用`.eq(x)`否则获取不到。
- C# string与stream的相互转换
- postgresql parameter meaning
- 软件测试面试题:什么是Negative测试?
- 安装dlib库
猜你喜欢
随机推荐
C# WebBrower1控件可编辑模式保存时会提示“该文档已被修改,是否保存修改结果”
Sigma开发注意细节
软件测试面试题:性能测试工作?
Vim take on a window.
2022年PMP报考指南
How to realize the repeatable design of FPGA
数据的存储(下)——浮点型在内存中的存储
21. Aliyun oss
Ambari Migrates Spark2 to Other Machines (Graphic and Text Tutorial)
3342:字符串操作 题解
颠覆性创新招商,链动2+1是个怎么样的制度模式?
软件测试面试题:缺陷等级应如何划分?
软件测试面试题:Web服务器指标指标?
软件测试面试题:验收测试包括哪三种类型?
如何实现FPGA的可重复性设计
微信公众号后台管理
Successfully resolved raise TypeError('Unexpected feature_names type')TypeError: Unexpected feature_names type
年薪30W,BAT抢着要,懂面试技巧的测试人究竟多吃香?
Engineering Design of Single-sided PCB Routing Impedance
[oops-framework] Template project [oops-game-kit] Introduction