当前位置:网站首页>[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);
边栏推荐
猜你喜欢
SQL statement--get database table information, table name, column name, description comment, etc.
【oops-framework】模板项目【oops-game-kit】使用简介
Construction inspection, no rules and no square
Matlab矩阵(数组)元素过滤常见方法详解
SyntaxError: invalid syntax
【Video】Report Sharing | 2021 Insurance Industry Digital Insights
第二课第一周第4-6节 医学预后案例欣赏+作业解析
R language multiple linear regression, ARIMA analysis of the impact of different candidates in the United States on the economic GDP time series
络达开发---串口日志&日志过滤
从键入网址到网页显示的详细过程
随机推荐
请讲一讲JS中的 for...in 与 for...of (下)
88Q2110 access C45 phy address through C22
#yyds Dry Goods Inventory#[Yugong Series] August 2022 Go Teaching Course 008-Integer of Data Types
The iterator and generator
Please talk about for...in and for...of in JS (below)
leetcode 739. Daily Temperatures 每日温度(中等)
隐私计算融合应用研究
MySQL中的DDL常规操作总结
ora-00001违反唯一约束
14.cuBLAS开发指南中文版--cuBLAS中的Level-1函数nrm2()和rot()
Experiment record of Shengxin (part3)--scipy.spatial.distance_matrix
软件测试面试题:性能测试工作?
This Thursday evening at 19:00, Lesson 5 of the sixth phase of knowledge empowerment丨OpenHarmony WiFi subsystem
Oops Framework模板项目新手引导
Summary of DDL routine operations in MySQL
0图中等 LeetCode565. 数组嵌套
MSTP - Multiple Spanning Tree (Case + Configuration)
两日总结九
C# string与stream的相互转换
HCIP-R&S By Wakin自用笔记(3)OSPF之引入外部路由、Forwarding-Address、汇总、特殊区域