Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
27. September 2019


Cocos2D-x, a popular open source cross platform C++ powered game framework, just released the first release candidate of Cocos2D-x 4.0.  Highlight features of RC0 over that last Beta 0 release include:

  • optimize Sprite creation speed
  • add some documentations
    • migration from v3 to v4 or using using v4 with cocopod can refer to this doc 4
    • new concept of v4 can refer to the docs 6
    • API changes doc is here 1
    • some examples can be found here 2
  • update luajit to latest 2.1
  • update GLFW to 3.3
  • remove tiff
  • Webview and VideoPlayer adapt to iOS 13
  • fix system font issue on macOS 15
  • fix memory leak on mac
  • many bugs fixed

Cocos2D-x 4 RC0 is available for download here.  If you are interested in learning Cocos2D-x, we have a 3.x based tutorial series available here.

GameDev News


30. April 2019


When Cocos Creator 2 was released, a major new feature was the new 3D renderer under the hood.  The 2.1.1 release starts to take advantage of that new functionality with a new 3D scene editor, a game preview panel, new lighting and 3d primitive support and more.  If you are interested in learning Cocos Creator, be sure to check out our tutorial series available here.


Details of the release from the Cocos Creator forum:

Cocos Creator v2.1.1 released!

Since the release of Cocos Creator 2.1.0, we have received a lot of valuable suggestions from users. Based on previously announced plans, we will continue to speed up the iteration of the v2.1 series to implement user suggestions as quickly as possible. At the same time, in order to prevent these changes from affecting the stability of old projects, we only recommend upgrading projects with 3D requirements to v2.1. Other projects can continue to use v2.0, and wait until v2.2 is released before upgrading. This v2.1.1 upgrade mainly supports 3D scene editing, camera preview, lighting system, and also incorporates the latest 2.0.x changes.

What’s New

Support 3D scene editing

The Scene Editor allows you to switch to 3D editing mode with one click, making it easy to edit 3D objects, cameras, and lights. See the 3D Scenes document 4 for details.

Add game preview panel

A separate preview panel has been added to visually preview the images seen by the camera during scene editing. Panel Open: Main Menu → Panel → Game Preview, the preview panel can be placed in a separate window or dragged into the main editor window.

s_4A04B2733C58C3785BF9DAB70F7114F68401A06E2E8478F24E9A8254F94C36DB_1553237527640_image

s_4A04B2733C58C3785BF9DAB70F7114F68401A06E2E8478F24E9A8254F94C36DB_1553237527640_image.png985×427 40.6 KB

Add 3D lighting and shadows

A Light component has been added to lay out lights in the scene, and a shadow effect can be set in conjunction with MeshRenderer. See the Light Source Component Reference 2 documentation.

s_4A04B2733C58C3785BF9DAB70F7114F68401A06E2E8478F24E9A8254F94C36DB_1553235837568_image

s_4A04B2733C58C3785BF9DAB70F7114F68401A06E2E8478F24E9A8254F94C36DB_1553235837568_image.png1100×746 307 KB

Upgraded EditBox component

Now, developers can set the Text Label, Placeholder Label and Background nodes separately, making them more flexible, simple, and more in line with the component development. See the EditBox Component Reference documentation.

Add text shadow rendering component

A new LabelShadow component has been added to add a shadow effect to the Label component, similar to the LabelOutline usage. See the Label Component Reference documentation.

Support for dynamically creating 3D Primitive models

Added cc.primitive module to dynamically create 3D models at runtime, including: box, cone, cylinder, plane, etc. See the Basic 3D Objects documentation.

Integrated Material System (Beta)

Added support for material systems, allowing users to create Material and Effect (Shader) resource types. It should be noted that the current material system is mainly provided to the internal use of the engine and is only for developer preview. We plan to upgrade the material system in v2.1.2, however it will not be back-ported to this version.

Improved features

Editor improvements
  • Added shortcut Ctrl/Cmd + Shift + F to align the currently selected node to the perspective of the scene editor.

  • When you click in the scene editor, you can hold down Ctrl/Cmd for multiple selections at the same time.

  • Improve fault tolerance processing for custom engines to avoid editor startup failure

  • Improve the search performance of the resource manager under very large projects

  • Add menu File -> Open project in new window to support simultaneous opening of multiple projects on Mac

  • Hide the component’s enabled checkbox when the component does not define the enabled associated lifecycle function

  • Upgrade the TypeScript version to 3.3.3333

Engine improvements
  • Make cc.Vec3 compatible with related APIs of cc.Vec2

  • Improved Label positioning accuracy in the editor and on different browsers (thanks to “Dacheng Xiaopeng” for advice)

  • Optimization 3D skeletal animation performance and volume

  • The cc.macro.CLEANUP_IMAGE_CACHE flag is enabled by default on the native platform to reduce texture memory usage

  • Native platform automatically verifies the maximum supported texture size of the current device

  • Add WeChat Mini game XMLHttpRequest support for timeout event [#87]

  • Added cc.sys.HUAWEI_GAME enumeration to determine if it is currently Huawei’s fast game platform

  • Optimized Android 5 system’s WebView compatibility

  • Allow iOS browser to play automatically when VideoPlayer is muted

Bug Fixes

Editor Fix List
  • Fixed an issue where BuildResults.getNativeAssetPath might not get the texture path

  • Fixed removal animation editor error message caused by the Animation Clip being edited

  • Fixed an object already destroyed warning that appears when you repeatedly enter Prefab edit mode

Engine Repair List
  • Fixed an issue where enabledInHierarchy is always false when the component does not define onEnable

  • Fixed an issue where ToggleGroup is not fully disabled when the active node is false

  • Fix Label’s opacity is not working

  • Fix Slider’s anchor settings will affect clicks [#4163]

  • Fix Particle System after playing, hide the node and display the problem of residual particles [#4243] 1

  • Fixed a memory leak issue that could be caused by too many particles in the particle system [#4256]

  • Fix native platform resources Download, XMLHttpRequest, WebSocket, SocketIO possible crash after request [#1721] [#1716]

  • Fix native platform XMLHttpRequest may crash due to timeout [#1724]

  • Fix native platform loading via IPV6 under the telecom network (WeChat avatar) file may fail [[#1713]] (https://github.com/cocos-creator/cocos2d-x-lite/pull/1715)

  • Fix native platform OpenGL draw error #4017

  • Fix native platform Label there may be black border issues when rendering system text [#130]

  • Fixed an issue where the audio file on the Android platform could not be loaded when it was not in OBB[#1611]

  • Fixed an issue where the Android platform received a touch event before the engine initialization was completed could cause a crash [#1715]

  • Fix Windows platform window may report an error when minimizing restore [#129]

  • Fixed Windows platform error when opening window [#1732]

  • Fixed an issue where the volume setting to 0 is invalid on Browser

  • Fix 3D Project incompatibleWeChat game Open Data Domain issue

  • Fix 3D model bone penetration problem [#4188]

Removed

  • Removed the creation entry for the CoffeeScript script. CoffeeScript scripts can still be created manually, and we plan to remove full support for CoffeeScript in v3.0.

See the new 3D functionality in action in the video below.

GameDev News


30. November 2018


Cocos Creator has just taken the jump into the world of 3D with the release of Cocos Creator 2.1.  While still a 2D game engine, the underlying renderer is fully 3D.  This release adds a new 3D node, a new renderer component, a new animation node, a new 3D camera as well as the ability to load 3D content in FBX file formats.  This release also marks a bit of a fork in Cocos Creator development, with the existing 2D only game engine staying on the 2.0.x versioning scheme, while the new 2.1.x will develop more rapidly in the future.  This hopefully will fix some of the bad backward compatibility changes they have made in the past, but it will be interesting to see how much development both branches receive.  If you are interested in learning Cocos Creator, be sure to check out our comprehensive tutorial series available over on DevGa.me.

Full release note details of the 2.1 release:

What’s New

3D Node
In v2.1, newly created Node objects are still 2D by default. When needed, you only need to click the 2.5D button at the top right of the Node to switch to 3D mode. After switching, you can edit the z axis. See 3D Node 8.

3D Camera
Like Node, Camera is also divided into two modes. When you add a Camera component to a normal 2D node, it becomes a 2D Camera. When you switch Node to 3D mode, Camera will also enter 3D mode, and then you can edit Camera's FOV and other parameters in 3D mode.

3D model import
Currently, Cocos Creator supports importing 3D model formats for a very wide range of .fbx files. .fbx is the de-facto standard in 3D modeling software. The process of importing is very simple, just drag the .fbx model into the Explorer and wait a few moments for the import to complete. After the import is completed, you can see that the imported model is a folder that can be expanded in Explorer. When importing the model, the editor will automatically parse the content of the model and generate a Prefab, a Grid, a Bone Animation and other resources. See Import Models 1

Mesh Renderer Component
Mesh Renderer is used to draw grid resources. See Mesh Renderer 1.

Bone Animation Component
The Skeletal Animation component inherits from the Animation component. The Skeletal Animation component is not much different from the Animation component. The exception is the Skeletal Animation component uses a clip that can only be a Skeletal Animation clip. The Skeletal Animation component is automatically added to the model’s Prefab when it is imported. See Bone Animation Component for details.

For more 3D instructions, please consult the documentation 3D System 1.

Optimize automatic gallery build speed
v2.1 greatly optimizes the speed of auto-atlas construction. If the atlas has not changed, the results of the last build are used.

Further improve rendering performance
Between v2.0 compared to v1.x, there are some cases where the engine does not render batches, resulting in an increase in draw calls. v2.1 re-optimized these conditions. If the previous color or opacity cannot be batch processed, sliced and non-sliced share the same texture and cannot be batched. The problem that the opacity 0 node still occupies the draw call is solved.

Add simulator debugging function
In the Project Settings -> Preview Run Panel, the Open simulator debugger panel option and the Wait for debugger connect option have been added. The purpose of the Open simulator debugger panel option is to automatically open the debug window when the simulator previews the project. The Wait for debugger connect option is used to suspend the boot process until the debugger connection is complete for debugging the load process.

Texture Auto Compression
The compression required by the texture can be set directly in the editor, and Cocos Creator will automatically compress the texture when the project is published. Exporting multiple image formats simultaneously on the web is supported. The engine will automatically download the appropriate format according to the different browsers. See Compressed Textures 4 for details.

Enhancements

Editor
  • Dashboard is closed when the project is opened, and automatically opened when the project is closed.
  • Dashboard will automatically record the last created project path.
  • Optimize the preview of the Button under the editor.
  • Optimize the way Button Click Event indexes components, avoiding the loss of indexes after scripts are renamed.
  • QQ light game construction allows direct packaging of zip files for uploading servers.
  • The new plug-in mall automatically prompts the user to install after the plug-in download is completed.
  • When building a WeChat mini-game main domain project, the subdomain will not be emptied again.
  • Modify the API Level selected by default when building the Android platform to the current highest level (Target API Level).
  • The node path bar in the scene editor is removed, and the node path can be obtained through the node right-click menu of the hierarchy manager.
  • The animation editor defaults to Constant curves for values ​​of type cc.Enum and cc.Integer, without interpolation.
  • Animation editor key frame addition and deletion experience optimization.
  • The optimization engine automatically compiles the experience.
  • Added a series of other experience optimizations.
Engine
  • [UI] Added the affectedByScale property to the Layout component. If the developer wants the scaling of the Layout subnode to affect the layout, you can turn it on manually.
  • [UI] supports fnt files in XML format.
  • [UI] The Content Size of the node will be refreshed immediately when the Label node is onEnable.
  • [UI] When the target of Button is not defined, the current node will be used by default.
  • [UI] ToggleContainer adds a checkEvents event property similar to Toggle, which fires only when Toggle’s isChecked state becomes true.
  • [Action] Added support for four actions of cc.Rotate3DTo, cc.rotate3DTo, cc.Rotate3DBy, cc.rotate3DBy.
  • [Native] Rejoined WebView and VideoPlayer support removed in v2.0.0 on iOS and Android platforms.
  • [Native] The Mac native platform switches to the V8 engine. If you need to use JSC, you need to manually modify the macro. For details, see #1515.
  • [Native] Add the missing key and length properties of the native platform LocalStorage, see #1371 1.
  • [Native] Adopts Pinyin input behavior unified with Android on iOS native platform, does not retain input of unfinished pinyin.
  • [Android] Upgrade Android compilation to NDK r16+ Clang, and compile Android pre-compiled library with Clang.
  • [Android] Upgrade the Android build tool to configure Gradle to 4.4, plugin to 3.1.4. (Gradle 4.6 has a known issue that will cause resource packaging to fail).
  • [Android] Optimize Android input box experience.
  • [Android] Squeeze Android empty package body, the minimum package body is reduced from 7.0MB to 6.3MB.
  • [Web] Increase transparency support for WebView on the web platform.
  • [Web] Optimized display position of WebView components.
  • [Web] Optimizing the performance of VideoPlayer on the X5 browser.
  • [Wechat] Supports getting the res and referrerInfo parameters passed to the platform when responding to the cc.game.EVENT_SHOW event on WeChat games.
  • [VideoPlayer] Optimized the performance of VideoPlayer full-screen playback.

Bug Fixes

Editor
  • Fix an issue where the animation editor node list may not be updated.
  • Fix the problem of selecting the RichText subnode in the scene editor.
  • Fixed an issue where the error code always returned 0 when building a project using the command line, whether or not an error occurred.
  • Fixing the background of the mesh in the scene editor will penetrate above some translucent images, causing some differences in color and runtime.
  • The editor will report an error when repairing an external drag resource to an invalid location in the resource manager.
  • Fixed remote server ip getting error when publishing Android Instant platform.
Engine
  • [Core] Problem with activeInHierarchy being true after fixing node destroy.
  • [Core] Fix filter in RenderTexture, premultiply alpha setting is invalid.
  • [Core] Fixed an issue where the scene introduced by the plugin could not be loaded.
  • [Web] Fixed a problem with white afterimages on Chrome 69, 70. (Since 2.0)#3357 1.
  • [UI] Fix Button may have some state invalidation when multiple states are superimposed on each other.
  • [UI] Fix LabelOutline setting invalid color problem.
  • [UI] Fixed an issue where setting Toggle.isChecked to be invalid in the start method.
  • [UI] Fix the problem that the LabelOutline component is not synchronized when the state is modified.
  • [Animation] Fixed an issue where the parameters of AnimationState might be parsed as a string type.
  • [QQPlay] Fix the problem that QQ light game does not respond to the background background switching event.
  • [QQPlay] Fix the problem that the font will become very small if you use italics on QQ light games.
  • [QQPlay] Fix the problem that the QQ light game can’t replay when the lock screen re-enters or the front and back switches.
  • [QQPlay] Fixes the problem of the ended event after the audio setCurrentTime is fixed #3373.
  • [Native] Fix native platform connection socket.io server may report Bad Request error.
  • [Native] Fix iOS and Android can’t detect gravity sensor.
  • [Native] Fix iOS call cc.game.restart Restart the game and then enter text will crash.
  • [Native] Fixing the problem that the opacity attribute of Label on Windows native platform does not work.
  • [Native] Fixed an issue where Android could not listen to onKeyUp.
  • [Native] Fix the problem that the Android phone will fail to load if the built-in SSL certificate expires.
  • [Native] Fixed an issue where server redirection was not supported when downloading images from Android native platform #PR.
  • [Physics] Fixed an issue where MouseJoint failed to respond to touch cancel.
  • [Spine] Fixes the problem that textures may be lost when Spine is reloaded under Mask.


GameDev News


7. August 2018


Cocos Creator 2.0 was just released.  Cocos is a free to use cross platform 2D game engine with a full game editor, scripted using JavaScript, TypeScript or CoffeScript.  If you want to learn more about Cocos Creator, be sure to check out our complete CocosCreator Tutorial Series over on DevGa.me.  The upgrade to Cocos Creator 2.0 includes a new underlying renderer, streamlined APIs, an improved Camera component, a better start-up experience and more.


Details of 2.0 from the Cocos Creator forum:

Editor
  • Implemented premultiply alpha, filter mode, wrap mode configuration of Texture
  • Abstract the mixed mode configuration into the RenderComponent component base class, all render components can be configured
  • Camera component upgrade, as a direct rendering entry, you can configure various base rendering parameters
  • With Quick Compile integration, the custom engine only needs to use the menu’s developer options -> compiler engine to compile quickly in a matter of seconds
  • Open the WeChat game open data domain as a publishing platform with a separate publishing panel
Engine
  • Add a new renderer based on the 3D engine
  • Render component is fully upgraded
  • Remove the render tree completely, assemble the render data directly and submit the render by the render component
  • Streamlined cc namespace API
  • Streamline Director API
  • Camera component upgrade
  • Start process upgrades, user scripts and plugin scripts can more easily interfere with engine initialization
  • Platform-specific startup code is separated and easier to customize
  • Event system optimization, distinguishing between system events dispatched by the capture bubbling mechanism on the node tree and normal events directly dispatched
  • Fit Width & Fit Height is also compatible with the WeChat game platform.
  • The RenderTexture resource type has been officially added to save the rendered content captured in the camera.
  • Simplify TiledMap functionality to pave the way for subsequent upgrades
  • Physical engine upgrade, performance optimization

You can download Cocos Creator for Windows right here, while the Mac version is available here.  The reference materials have been updated to 2.0 as well.

GameDev News


3. August 2018


Cocos Creator 1.10.0 was just released.  Cocos Creator is a 2D game engine with a full editor scripted using TypeScript, CoffeeScript or JavaScript.  If you are interested in learning more about Cocos Creator be sure to check out our complete tutorial series available on our sister site DevGa.me.  The 1.10 release dealt with many under the hood features and contains several small improvements and fixes.

Details from the Cocos Creator announcement:

What’s New
Editor
  • Greatly optimize the size of the settings.js file after the release
  • Added script subcontracting settings in the property inspector for the folder
  • Allow each project to set a custom engine separately
  • Add a node lock function in the hierarchy manager. When the mouse is moved to the node, there will be a lock button on the left side. After the node is locked, the node cannot be selected in the scene editor.
  • Added an “Optimization Policy” option in the Property inspector of the Prefab resource file to optimize Prefab creation time. See [Prefabricated Resources: Setting Optimization Strategies] (http://docs.cocos.com/creator/manual/en/asset-workflow/prefab.html#设置�% BC%98%E5%8C%96%E7%AD%96%E7%95%A5)
  • Optimize the main menu under Windows
  • Add auto-refresh to the list of scenes in the build panel
  • When publishing to the native platform, it also supports adding MD5 to file naming for hot update
  • Script compilation will automatically skip all .d.ts files to avoid TypeScript error reporting
  • The Console panel adds a Clear on Play option to automatically clear the log before the game previews
  • Adjust the text font and color of the Console panel
  • Added search option button in the search bar of the hierarchy manager and explorer
  • Added plugin management feature in the plugin store
  • Allow changes to custom control icons in the control library
  • Resource Manager adds recognition of aac and pcm extension audio files
  • Supports direct search of compressed uuid format when Explorer searches for uuid
  • Allow the right mouse button to drag and drop the timeline of the Timeline editor
  • Added exit menu on Dashboard’s system tray icon
Engine
  • Support game script subcontract loading, see [Code Subcontract Loading] (http://docs.cocos.com/creator/manual/zh/scripting/subpackage.html)
  • The align mode attribute is added to the Widget component. When set to ON_WINDOWS_RESIZE, it will be automatically refreshed when the window size changes.
  • Official support for [text] (http://docs.cocos.com/creator/manual/zh/asset-workflow/text.html) and [JSON] (http://docs.cocos.com/creator/manual /zh/asset-workflow/json.html) Loading of resource types
  • The native platform adds [cc.sys.getBatteryLevel] (http://docs.cocos.com/creator/1.10/api/zh/classes/sys.html?h=getbatterylevel) and cc.sys.getNetworkType interface for getting device power and network status
  • When the native platform is hot updated, it will actively delete the old version of the resource file.
  • VideoPlayer adds volume adjustment and mute function
  • Added DragonBones native platform binding interface getSlots, replaceSlotDisplay and Slot.name (thanks @feijing566)
  • TiledMap supports rendering and cropping of ortho maps in any direction on the web platform
  • Layout component will only typeset active nodes
  • Retina rendering enabled by default on Android UC browser
  • Enable Webgl on UC browser version 11 or higher
  • Increased recognition of UCBS browsers
  • Gravity sensing is adjusted to only get when the developer has a registration event
Bug Fixes
  • [Editor] Fixes the settings when setting SpriteFrame in the collection
  • [Editor] Fix simulator configuration save related issues
  • [Editor] Fixed an issue where the error message output from the emulator to the console was displayed in white.
  • [Editor] Fix the error when the resource export tool encountered the same parent folder name
  • [Editor] Fixed an issue where copying the automatically synchronized Prefab subnode under the editor may be wrong
  • [Editor] fixes the problem that the fragment texture in the automatic map set will be reported incorrectly if it is directly referenced by other resources.
  • [Editor] Fixed plugin script not correctly parsing CC_WECHATGAME and CC_QQPLAY keywords
  • [Engine] Fixed an issue where the animation may not stop playing when the scene is switched or the node is destroyed.
  • [Engine] [Wechat] Fix some versions of WeChat games to get the problem of each frame interval
  • [Engine] [Wechat] Fix RenderTexture related issues on Android WeChat games
  • [Engine] [QQPlay] Fix QQ Play and play resources will be downloaded repeatedly
  • [Engine] Fixed an issue where the slider of the Slider component might not be right when dragged
  • [Engine] Fixed an issue where the audio load event could be triggered repeatedly
  • [Engine] Fixed a problem where the user changed the level while dectivating the node without any error.
  • [Engine] Fix issues that WebView can’t hide in Safari browser on some platforms (iOS 9/10 or Mac)
  • [Engine] Fixed native platform BMFont rendering pitch problem
  • [Engine] Fixed an issue where the button’s touch area would be offset when Canvas was unchecked Fit Width and Fit Height


GameDev News


AppGameKit Studio

See More Tutorials on DevGa.me!

Month List