tekkenbasara.mobi creator là 1 công núm để phát triển game trên căn cơ tekkenbasara.mobi2dx sử dụng ngôn ngữ java script. tekkenbasara.mobi creator là công cụ bao gồm nhiều tính năng hỗ trợ trọn gói cho quá trình làm trò chơi từ việc thiết kế ui, kiến thiết component, kiểm thử, build sản phẩm... Nhờ đó tekkenbasara.mobi creator được phần đông game deverloper mếm mộ platform tekkenbasara.mobi2dx sử dụng.Bạn hoàn toàn có thể download tekkenbasara.mobi creator tại đường link: http://www.tekkenbasara.mobi2d-x.org/download
Sau phía trên mình sẽ trình làng tổng quát tekkenbasara.mobi creator tới những bạn.
Bạn đang xem: Cocos2dx là gì? phát triển công nghệ làm game mobile 2d
Editor view

Scene view

Assets view

Component inpector

Timeline View

Component
tekkenbasara.mobi creator góp lập trình theo phía component, các đối tượng được tạo thành nhiều các component, từng component gồm thuộc tính và chức năng riêng xây dựng bằng javascript. Một trong những component thịnh hành có sẵn trong tekkenbasara.mobi creator như Node, Wi
Widget, Sprite, Button... Một số trong những component deverloper đề nghị tự xây dựng để phù hợp với từng game riêng.Thêm new 1 component


Build sản phẩm
Để build sản phẩm chúng ta chọn Project->Build... Một hộp thoại build setting hiện nay ra

tekkenbasara.mobi creator là một editor tương đối hoàn thiện để phát triển game 2D đối chọi giản. tekkenbasara.mobi creator giúp cho việc lập trình hướng component trở nên đối kháng giản. điểm yếu của tekkenbasara.mobi creator là chỉ cung cấp ngôn ngữ javascript, số lượng các component tất cả sẵn không được phong phú. tekkenbasara.mobi creator là 1 phiên phiên bản Unity của tekkenbasara.mobi2d-x. Hi vọng trong tương lai tekkenbasara.mobi creator cải cách và phát triển hơn nữa với sẽ cung ứng cả về 3D.
Assets Hot Update TutorialPreface
In current tekkenbasara.mobi Creator version, assets hot update workflow has not been fully integrated into the editor. But the engine itself has complete tư vấn for hot update system, so with some of the external script & tool the workflow is complete.
The sample project for this document is available from Git
Hub Repo.

Usage scenarios & design ideas
Game developers are very familiar with the pattern that the trò chơi has been released in app market but each time user launch the trò chơi it will automatically look for updates from the server, to lớn keep the client always updated. Of course, there are some other usage scenarios for hot update, but are not related khổng lồ what we discuss here. We will mainly discuss how khổng lồ implement hot update system in tekkenbasara.mobi Creator.
Hot update in tekkenbasara.mobi Creator comes mainly from the Assets
Manager module in the tekkenbasara.mobi engine. It has a very important feature:
Server and client both keep a full menu of the trò chơi asset (manifest), during hot update process, by comparing server and client asset manifest, the client should know what to tải về to get the latest content. This can naturally support cross-version updates, such as when client version is A, remote version is C, then we can directly update the assets from A khổng lồ C. We vì not need khổng lồ generate A to lớn B và B to C update package. Therefore, when we push new asset version to server, we can save new version files discretely on server, and during update the client will download each file needed separately.
Please be aware that hot update system is for native games only, since webgame would always request assets from website server. So Assets
Manager class exists only in the native namespace, please check runtime environment before implement these API.
Manifest file
For different versions of file-level differences, Assets
Manager uses a manifest tệp tin for version control. The client & server manifest files each contains an asset file list và version for each file. This allows comparing the version of each file to determine whether a file should be downloaded.
The manifest file contains the following important information:
The root path of remote assetsRemote manifest file url
Remote version file url (optionally)Major version number
File list: index of tệp tin paths, including file version information. We recommend using the tệp tin md5 as the version number
List of search path.
Xem thêm: Tổng hợp 6 cách chơi avatar nhanh giàu, đang được quan tâm
The version tệp tin can be part of the contents of the manifest file and do not contain a các mục of files. But the manifest file may be large, each time client need to tải về the whole tệp tin for checking version update. So developer can provide a very small version tệp tin for version check only. Assets
Manager will first kiểm tra the version number provided by the version tệp tin to determine if it is necessary to continue downloading the manifest file và update it.
Implement hot update in the tekkenbasara.mobi Creator project
In this tutorial, we will provide a hot update workflow for tekkenbasara.mobi Creator project. We have also opened Downloader Java
Script interface in tekkenbasara.mobi2d-x engine, so users are free to develop their own hot update solution.
Before starting lớn explain in detail, developers can take a look at the directory structure of published native version of any game in tekkenbasara.mobi Creator. Creator published directory structure and tekkenbasara.mobi2d-x JS project directory is exactly the same. For tekkenbasara.mobi Creator, engine scripts will be packaged into the src directory, và other assets will be exported khổng lồ the assets directory.
Based on this project structure, the hot update process in this tutorial is simple:
Generate the local manifest tệp tin based on the assets and src directories in the native published directory.Create a component script to be responsible for the hot update logic.After release of the game, if you need to lớn update the version, you need khổng lồ generate a phối of remote asset versions, including the assets directory, src directory & manifest file. Then deploy these files khổng lồ your server.When the hot update script detects that the server manifest version does not match local version, the hot update startsTo show the hot update process, the example project used in the tutorial has a full version with 1.1.0 information saved in the remote-assets directory, and the mặc định build of the project generates version 1.0.0. At the beginning of the trò chơi it will kiểm tra whether there is a version of the remote update, if you find a remote version the user is prompted khổng lồ update. When update is complete, the user re-enter the game và see the version 1.1.0 information.

Note: the project contains remote-assets is for debug mode, the developer must use the debug mode when building the chạy thử project, otherwise the release mode jsc tệp tin priority will be higher than remote-assets in the assets & cause the script to fail.
Use the version generator to lớn generate the manifest file
In the example project provided, version_generator.js is a script file, which is a Nodejs script for generating the manifest file. Use it as follows:
> node version_generator.js -v 1.0.0 -u http://your-server-address/tutorial-hot-update/remote-assets/ -s native/package/ -d assets/The following is a mô tả tìm kiếm of the parameters:
-v Specifies the major version number of the manifest file.-u Specifies the url of the hệ thống remote package, which needs khổng lồ be the same as the remote package url of the manifest tệp tin in the original release version, otherwise the update can not be detected.-s local native published directory relative khổng lồ the current path.-d the path of the output đầu ra manifest file.Hot update component script
In the example project, the implementation of the hot update component is located at assets/hotupdate/Hot
Update.ts, the developer can refer to lớn this implementation, but also không lấy phí to modify according lớn their own needs.
In addition, the sample project is also equipped with a Scene/Canvas/update node for prompting khổng lồ update & display the progress of the update.

Deploy to lớn remote server
In order to allow the game to detect remote versions, it is possible khổng lồ simulate a remote hệ thống on the machine, there are a variety of server solutions (such as Simple
HTTPServer for Python). We will not discuss detail here, developers can use their own preferred way. Once the remote vps is up, modify the following places lớn allow the game to successfully find the remote package:
Url, remote
Manifest
Url & remote
Version
Url in the client manifest tệp tin of the gameremote-assets/project.manifest: package
Url, remote
Manifest
Url & remote
Version
Url in the manifest file of the remote packageremote-assets/version.manifest: package
Url, remote
Manifest
Url và remote
Version
Url in the remote package's version file
Publish the original version
After downloading the sample project, use tekkenbasara.mobi Creator to xuất hiện the project directly. Mở cửa Build panel, build for native platform, choose Windows/Mac as the target to lớn test.
Note:
Do not kiểm tra MD5 Cache when building, otherwise it will cause the hot update khổng lồ be invalid.Make sure khổng lồ import editor plugin hot-update into the extensions folder (the demo project has imported the plugin).The editor plugin automatically adds the search path súc tích and fix code khổng lồ main.js every time we build a successful native version:
// showroom the following code at the beginning of main.js(function () if (typeof window.jsb === 'object') var hot
Update
Search
Paths = local
Storage.get
Item('Hot
Update
Search
Paths'); if (hot
Update
Search
Paths) var paths = JSON.parse(hot
Update
Search
Paths); jsb.file
Utils.set
Search
Paths(paths); var file
List = <>; var storage
Path = paths<0> )();Note: file
Utils is located in the traditional jsb namespace instead of native, and currently, the script compile system only supports importing native objects via import in Type
Script.
This step must be done because the essence of the hot update is lớn replace the files in the original trò chơi package with a remotely downloaded file. tekkenbasara.mobi2d-x tìm kiếm path just meet this demand, it can be used khổng lồ specify the remote package tải về url as the default tìm kiếm path, so the game will run the process of downloading a good remote version. In addition, the search path is used in the last update process using local
Storage (which conforms khổng lồ the website standard Local Storage API) lớn store on the user's machine. The Hot
Update
Search
Paths key is specified in Hot
Update.js, and the name used for the save và read process must match.
In addition, if encountering this warning during the opening of the project, ignore: loader for <.manifest> not exists!.
Run the example project
If everything is alright, run the native version of the sample project. A new version will be detected, suggesting that the update will automatically restart the game after the game, then enter the table scene.

Conclusion
The above is a hot update solution, tekkenbasara.mobi Creator in the future version to provide more mature hot update process, directly integrated into the editor. Of course, the underlying Downloader API will also be provided lớn allow users khổng lồ freely implement their own hot update scheme & to build a complete visual workflow in the editor through the plug-in mechanism. This tutorial & sample project is for your reference & we encourage developers to customize their own workflows. If you have questions & communication also welcome feedback to lớn Forum.