Skip to main content

· 5 min read
Brandon

Release Logo

Cocos2D-Mono 2.5.0 is out now! Go check out the release notes to see what's change...or just read below.

There's also a lot of news to take a look at too!

What's Changed

- Upgrade to .NET 8
- Support for MonoGame 3.8.2
- Linux platform support
- macOS platform support
- Removal for UWP platform
- Support for iOS 18
- Support for Android 34
- Fixes for DesktopGL crashing when using System Label for Linux & macOS
- Null reference check in CCNode.Visit()
- CCDrawManager reset width & height on Init
- Remove early config init during CCLabel init
- Add method to set atlas texture size for CCLabel

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.8...2.5.0

NuGet Packages:

Visual Studio Project Template Extension

Major Changes

There are a few significant changes that comes with this release.

The following is a breakdown of these changes and the impact that comes with it.

.NET 8 is here!

A little late but it's finally here. Cocos2d-Mono is officially on .NET 8 and with that comes some big changes...some good and some bad but all to drive the library forward.

Upgraded to Latest MonoGame

Cocos2d-Mono is now officially running on the latest MonoGame, 3.8.2.

Introducing SkiaSharp

For some time now the DesktopGL platform had issues where it would crash when trying to draw any system level fonts (CCLabel specifically).

These issues only existed on Linux & macOS and mainly due to System.Drawing.Common no longer being support on non-Windows platforms at the start of .NET 7. You can read up more about it here.

So in order to move forward with supporting system level fonts again on Linux & macOS, DesktopGL has to be reworked and introduced a new CCLabel partial class that now works with SkiaSharp. More info on SkiaSharp can be found here.

Linux & macOS Platforms

While work went on to improve support for Linux & macOS using DesktopGL by introducing implementations like SkiaSharp, it became clear that this may just be the beginning of the diverging needs.

So in an effort to better support specific platforms, like Linux and macOS, and make maintaining those platform specific concerns easier, there are now new platforms just for Linux and macOS!

Introducing Cocos2d-Mono.Linux and Cocos2d-Mono.macOS. This is a very exciting update as this will allow these specific platforms to take better advantage of the platforms they run rather than holding certain implementations back because perhaps one platform doesn't support a specific library.

These are also great options for those that, for example, may not be interested in building games for Windows or just want to focus on developing on a certain platform and not bring in any other bloat from other platforms.

Going Metal

With the new platforms, specifically macOS, it is now easier to bring support for Metal! That's right! Metal support is coming for both iOS and macOS.

Rather than having a difficult time with intertwining OpenGL implementations with Metal in order to make both macOS and DesktopGL happy, the effort will be more streamlined now bringing Metal for macOS as part of Cocos2d-Mono.macOS, and to Cocos2d-Mono.iOS, and keep the OpenGL implementation separate in DesktopGL.

This also will help pave the way to introduce other libraries like Vulkan on the Linux platform. More on that later this year.

Long Live UWP

Unfortunately, not everything is good news. As I mentioned there is some bad news to add. With the move to .NET 8 and the latest MonoGame it became clear that UWP is no longer a viable platform moving forward and because of that, support for UWP is now dropped going forward. There may still be patch updates for UWP down the line but that's about it. Sad to see it go but Microsoft also stopped supporting it for some time now.

DesktopGL & The Future

For now DesktopGL is not going anywhere. It is very important to me that DesktopGL continues to exist as an all-in-one option for PC platforms, making it easier to build cross-platform for Windows, Linux & macOS.

It's important that I mention, with the introduction of macOS and Linux specific platforms, DesktopGL may fall a little behind in terms of advanced features, like supporting Metal for example.

And with that in mind, DesktopGL is going to be positioned more as the introductory platform, making it easy to get things up and running, as fast as possible. Take an idea and make it a proof of concept on multiple platforms with little to no friction. And if it makes sense for your project, there are the platform specific flavors of Cocos2d-Mono to suit those needs, Windows, Linux and macOS.

I know there is a lot to digest here but my hope is that everyone is as excited as I am for the future of Cocos2d-Mono. This is also a small sneak peak into what is coming down the line for the library, there is much more coming later this year and I hope to have a more official roadmap soon.

Check it out & stay tuned for more to come!

· 2 min read
Brandon

Cocos2D-Mono 2.4.8 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- Support for CCVector2
- Replace GetActionByTag with GetAction
- Replace StopActionByTag with StopAction
- Replace AlignItemsVerticallyWithPadding with AlignItemsVertically
- Replace AlignItemsHorizontallyWithPadding with AlignItemsHorizontally
- Add support for pause all sound effects
- Add support for resume all sound effects
- Fix out of index error for CCSpriteBatchNode
- Fix for recreating static texture for the atlas in CCLabel
- Increase Texture Size for CCLabel
- Static context improvements for CCLabel
- Vertical alignment adjustment for Android Labels
- Fix Font Size not changing immediately
- Lower iOS target version to 16.1
- Improvements for CCLabel textures
- Improvements for CCLabel character spacing
- Reduce character spacing for JA language
- Improve CCLabel Texture Caching
- Upgrade to .NET 7
- Fix vertical spacing for CCLabel
- Fix spacing between CJK characters
- Improved support for CJK characters
- Resolved character spacing issues for CCLabel
- iOS improvements
- Better handling for CCTexture caching
- Improvements for font definitions
- Minor adjustment for font spacing
- Improve texture cache for CCLabel textures
- Add null checks for CCScheduler
- Improve reliability for CCLabel textures
- Improvements reusing TextureAtlas
- Fixes for Create Charater Bitmap Fonts
- Fixes for Creating Fonts
- Fixes for Round Line Cap
- SystemFontSpacing for character spacing
- CCLabel improvements for Android and iOS

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.7...2.4.8

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Cocos2D-Mono.Core.Android Cocos2D-Mono.Core.DesktopGL Cocos2D-Mono.Core.iOS Cocos2D-Mono.Core.Uwp Cocos2D-Mono.Core.Windows

Visual Studio Project Template Extension

Breaking Changes

There are a couple of changes that may cause some minor refactoring. As part of this release the following changes are to be kept in mind:

  • Replace GetActionByTag with GetAction
  • Replace StopActionByTag with StopAction
  • Replace AlignItemsVerticallyWithPadding with AlignItemsVertically
  • Replace AlignItemsHorizontallyWithPadding with AlignItemsHorizontally
GetActionByTag -> GetAction
StopActionByTag -> StopAction

AlignItemsVerticallyWithPadding -> AlignItemsVertically
AlignItemsHorizontallyWithPadding -> AlignItemsHorizontally

You will need to replace these usages but should be very minimal other than function name changes.

Check it out & stay tuned for more to come!

· 3 min read
Brandon

Cocos2D-Mono 2.4.7 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- Fix issue with TextureAtlas Data not purging correctly
- Core libraries!!
- These libraries only contain the MonoGame framework only, the Content Builder Task is not included
- Fix for CCLabel Crashing
- iOS Font Texture Improvements
- Fix for DisplayStats on iOS
- Fix for CCTexture being disposed too early
- Implement Line Break Modes for CCLabelBMFont and CCLabel
- Added support for more delimiters in Labels
- Streamlined usages for RemoveFromParent, RemoveChild and RemoveAllChildren.
- Adjust position to reduce line artifacts on fonts
- Improvements with cleanup and dispose objects

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.6...2.4.7

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Cocos2D-Mono.Core.Android Cocos2D-Mono.Core.DesktopGL Cocos2D-Mono.Core.iOS Cocos2D-Mono.Core.Uwp Cocos2D-Mono.Core.Windows

Visual Studio Project Template Extension

Core Library

This will only have the MonoGame Framework dependency and not the MonoGame Content Builder Task.

The benefits for these Core libraries are speed improvements to compilation and resolves an existing vulnerability that exists within MonoGame.Content.Builder.Task image

The downside to this is assets will need to be built manually prior to compilation, either via command line using the dotnet tool or the MGCB Editor.

CCTextLineBreakMode

Introducing new LIne Break Modes for CCLabelBMFont & CCLabel:

  public enum CCTextLineBreakMode
{
SmartBreak,
WordBreak,
CharacterBreak,
NoBreak
}

Word Break

Break string lines by words

Character Break

Break string lines by characters

Smart Break (Default)

Combination of Word and Character breaks. Makes best determination for line break.

No Break

Line has no breaks. Just one line continuous string.

Note

LineBreakWithoutSpace will be deprecated in a future release.

This release introduces some changes around usages of RemoveFromParent, RemoveChild and RemoveAllChildren.

First RemoveFromParentAndCleanup and RemoveAllChildrenWithCleanup have been removed in favor of simply passing in a cleanup parameter, which is now true by default. This mirrors the same behavior as before but without needing to explicitly call RemoveFromParentAndCleanup and RemoveAllChildrenWithCleanup.

For example, m_plabel.RemoveFromParentAndCleanup(true); would now look like m_plabel.RemoveFromParent();.

You can see that this helps to streamline the usage and cleanup will always be performed unless explicitly necessary by passing in false e.g. m_plabel.RemoveFromParent(false);.

This also reduces any confusion on whether RemoveFromParent or RemoveFromParentAndCleanup should be called. It is simply just RemoveFromParent in every case and just specify if cleanup is needed.

Check it out & stay tuned for more to come!

· 2 min read
Brandon

Cocos2D-Mono 2.4.6 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- Implemented CCTextField for all platforms
- Fixed issue with CCNode Pause and Resume
- Fixed visibility issue with CCSprite
- Enhancements for DrawSegment
- Add DrawLine function
- Additional colors like CCColor3B.DarkGray
- Font improvements for Android and iOS
- Fixes for CCSprite ContentSize setter
- Fixes for CCParallel
- Reset vertex for CCDrawNode on Clear
- Maintain CCSprite Scale on TextureRect changes

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.5...2.4.6

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some great improvements to the library!

Please note that this will be the final update under .NET 6. Updates going forward will be under .NET 7 as .NET 6 is end of life and this will allow better support with those working with .NET 8. .NET 7 allows the library to be on the latest version possible while still being able to support MonoGame.

You can expect the move to .NET 7 will occur as part of the first release for 2024. Following that update, there will also be a roadmap released to show the direction of the library and some of the amazing features that are coming up. 2024 should be a big year for cocos2d-mono and I can't wait to show off why at the start of the year!

That said, once MonoGame makes the move to .NET 8, plans to move to .NET 8 will also be made.

Check it out & stay tuned for more to come!

· One min read
Brandon

Cocos2D-Mono 2.4.5 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- Maintain CCSprite scale when changing SpriteFrame
- Fix BitmapFont not loading in Android Tests
- CCNodeRGBA is officially gone! Use CCNode instead
- Implement IsSwallowTouches for CCTapNode
- Removed CCActionState from certain CCActions and aligned them with existing CCActions

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.4...2.4.5

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some great improvements to the library!

Check it out & stay tuned for more to come!

· One min read
Brandon

Cocos2D-Mono 2.4.4 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- New Test TapTouchTest for CCTapNode
- Fixes for CCTapNode
- Support for initializing CCEaseActions with CCFiniteAction
- Support for initializing CCScale9Sprite with CCSpriteFrame
- Add new constructor for CCTexture2D to support data byte array
- Add TextureFilename property for CCSpriteFrame

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.3...2.4.4

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some great improvements to the library!

Check it out & stay tuned for more to come!

· 2 min read
Brandon

Cocos2D-Mono 2.4.3 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- Support for AddedToScene for CCLayer
- New CCTapNode for supporting TouchOneByOne TouchMode
- Support Dispose function for CCNode, CCSprite, CCLayer
- New CCActionState
- Support Math Operators for CCColor4B
- Support for initializing CCScale9Sprite from existing CCSprite
- Added ContentSize getter for CCSpriteFrame
- Note: OriginalSize will be deprecated in a future release
- Added TextureRectInPixels and SpriteFrame Properties for CCSprite
- Added IsSpriteFrameDisplayed function for CCSprite
- Note: IsFrameDisplayed will be deprecated in a future release
- New IsNear function for CCPoint
- Added LengthSquared and DistanceSquared functions for CCPoint
- Note: DistanceSQ, LengthSQ and LengthSquare will be deprecated in a future release
- New CCActions: CCColorBlendAnimation, CCMoveFrom, CCRotateAnimation, CCSwapAction, CCTargetedAction, CCTimerAction
- Support for UnscheduleAll for CCNode
- Added SystemFont and SystemFontSize property for CCLabel
- Note: FontName and FontSize will be deprecated in a future release
- Added ScaledContentSize and BoundingBoxTransformedToWorld properties for CCNode
- Migrated CCNodeRGBA into CCNode
- Note: CCNodeRGBA will be deprecated in a future release
- Added Lerp and Clamp functions to CCMathHelper
- New Pi properties for CCMathHelper

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.2...2.4.3

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some great improvements to the library!

Check it out & stay tuned for more to come!

· One min read
Brandon

Cocos2D-Mono 2.4.2 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

- Lowered minimum support for Android to API 21
- Lowered minimum support for iOS 11
- Improved support for narrow screen devices
- Fix for ViewPort positioning in Portrait Mode
- Improved development guides
- Create a New Project
- Add Content
- Fixes and improvements for Project Templates & Samples

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.1...2.4.2

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some great improvements to the library!

Check it out & stay tuned for more to come!

· One min read
Brandon

Cocos2D-Mono 2.4.1 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

* Add Support to Align Menu Items Left or Right Vertically
* Fix support for initializing CCSprite with CCTexture2D
* Support Change Text using Property for CCMenuItemFont
* Add support for passing in fontname and fontsize for CCMenuItemFont

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.4.0...2.4.1

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some great improvements to the library!

Check it out & stay tuned for more to come!

· One min read
Brandon

Docusaurus Plushie

Cocos2D-Mono 2.4.0 is out now! Go check out the release notes to see what's change...or just read below.

What's Changed

  • Support for MonoGame 3.8.1
  • Migration to .NET 6
  • Support for iOS development on Apple Silicon
  • CCMenuImage improvements
  • Bumps to dependencies
  • General fixes and improvements
  • Pipeline Improvements
  • Updated documentation

Full Changelog: https://github.com/brandmooffin/cocos2d-mono/compare/2.3.12...2.4.0

NuGet Packages:

Cocos2D-Mono.Android Cocos2D-Mono.DesktopGL Cocos2D-Mono.iOS Cocos2D-Mono.Uwp Cocos2D-Mono.Windows

Visual Studio Project Template Extension

This release sees some major changes and improvements to the library, most importantly, support for developing on Apple Silicon and ARM based devices!

This update also targets .NET 6 which opens up better multiplatform support.

Check it out & stay tuned for more to come!