当前位置:网站首页>[oops-framework] Template project [oops-game-kit] Introduction
[oops-framework] Template project [oops-game-kit] Introduction
2022-08-11 01:56:00 【dgflash_game】
Introduction to Oops Game Kit
Based on the game project development template provided by Oops Framework, the project provides the latest version of Cocos Creator 3.x plug-ins and the general logic for initializing game resources.
Create a game template project
- Download the template project
git clone https://gitee.com/dgflash/oops-game-kit.git
- Download Oops Framework
Installing the framework plugin for the first time
windows
md extensionscd extensionsgit clone -b master https://gitee.com/dgflash/oops-plugin-framework.gitgit pull
mac
mkdir -p extensionscd extensionsgit clone -b master https://gitee.com/dgflash/oops-plugin-framework.gitgit pull
Template project directory structure
res - prefab referenced static resourcesresources - dynamically loaded referenced resourcesaudio - Music resourcecommon - common resourceconfig - configure resourcesgame - Game custom content configuration data sheetconfig.json - Framework default configuration resources (extensible content)content - custom dynamically loaded content resourcegame - core gameplay content resourcegui - interface resourcesloading - the first loading interface of the gamelanguage - Multilingual resourcesscript - Game scriptgame - Game business modulecommon - Game common modulesconfig - Game configurationGameEvent.ts - global event configurationGameUIConfig.ts - UI window configuration (provides configuration data used by the oops.gui module)table - game configuration table object (can be automatically generated by oops-plugin-excel-to-json)initialize - Game initialization moduleSingletonModuleComp.ts - Game singleton business moduleMain.ts - Game entry script
According to the above directory structure, when developing games, resources can be stored in corresponding folders for management.This template project comes with the following essential game features.
- Screen adaptation
- Get game local configuration data
- Getting game address query parameters
- Game initialization business process
- Initial customizable resource loading prompt interface
- Load and realistic first game custom interface
Screen fit
Cocos Creator Menu->Project->Project Settings
Landscape adaptive
Portrait adaptive
After setting, the rest can be handled automatically by the framework. If you have special adaptive needs, you can join the QQ exchange group for discussion.
Game initialization module
Required assets loaded at game startup
initialize/bll/InitRes.ts
This script manages the necessary resources loaded when the game starts. It should be noted here that the resources configured here should be as small as possible, so as to avoid the black screen for too long during the silent loading stage, which will lead to a decrease in the game experience.
- Load public resources
- Load multilingual package (optional)
- Load custom resource (optional)
initialize/view/LoadingViewComp.ts
This script is the control script of the game content resource loading interface. The game content resources are generally large, and there will be a loading progress bar prompt to improve the game experience.After all resources are loaded, the first custom interface of the game will be displayed by executing the following script.
oops.gui.open(UIID.Demo);
边栏推荐
- Ambari迁移Spark2到其它机器(图文教程)
- 阿里亿级并发册 + 机器学习算法 + 面试册 + 优化册 + 代码册 笔记!!!
- 英伟达 GPU 架构简史
- 21. Aliyun oss
- 软件测试面试题:对 RUP,CMM,CMMI,XP,PSP,TSP 的认识?
- [ASM] The relationship between the role of the bytecode operation ClassWriter COMPUTE_FRAMES and visitMaxs
- dump_stack ()
- [The method of calling the child page from the parent page of the iframe] Stepping on the pit: It is the key to use `[x]` when getting elements. You cannot use `.eq(x)`, otherwise it will not be obtai
- 22-7-31
- 项目构建工具-Gradle入门
猜你喜欢
随机推荐
【HFSS学习记录1】实例:宽带非对称多节定向耦合器设计
Data Filters in ABP
std::format格式化自定义类型
隐私计算融合应用研究
两日总结十一
软件测试面试题:Web服务器指标指标?
软件测试面试题:测试用例与测试脚本?
22. Inventory service
颠覆性创新招商,链动2+1是个怎么样的制度模式?
基于 HPSO 与多核 LSSVM 的网络入侵检测
The iterator and generator
请讲一讲JS中的 for...in 与 for...of (下)
uni-app实现app和H5调用手机拨号功能
88Q2110 通过C22方式访问C45 phy地址
阿里亿级并发册 + 机器学习算法 + 面试册 + 优化册 + 代码册 笔记!!!
MySQL基础篇【第一篇】| 数据库概述及数据准备、常用命令、查看表结构步骤
Update chromedriver driver programming skills │ selenium
88Q2110 access C45 phy address through C22
【备战“金九银十”】2022年软件测试面试题最新汇总
[GXYCTF2019]BabySQli