KLAC is a spatial-word puzzle game with a minimal and elegant design.
Here’re the new features KLAC will include:
KLAC finally is heading to the Mac App Store. KLAC runs smoothly on MacOS and it will support both fullscreen and mini mode.
Thanks to iCloud, all progress are kept in sync among all Apple devices, including iPhone, iPad and MacBook. You can play on a device and hop on another one to continue to play seamlessly.
This update of KLAC is coming soon. This will mark the first release for MacOS. All other platforms will receive the update in the same time frame.
Save the date and keep supporting us.
In the meanwhile you can play the beta for free:
Access the betaYou can know more about KLAC on the game page or devblog.
KLAC is currently in development, stay tuned for more coming in the next days.
RUNA is a spatial-word puzzle game with a minimal and elegant design.
Arrange and spread the light. Irradiate the way up to higher sky.
Set the order, set the route, set the focus. Let the energy flows on the path of the Light.
RUNA is a gorgeous puzzle game with celestial graphics and delicate sounds.
You’ll make use of reasoning, logic, experimentation and research.
RUNA will be available for iOS on 30th January 2019.
On Android (open beta) and Windows Phone later the month after.
Save the date and keep supporting us.
In the meanwhile you can play the beta for free:
Access the betaYou can know more about RUNA on the game page or devblog.
RUNA is currently in development, stay tuned for more coming in the next days.
KLAC is a spatial-word puzzle game with a minimal and elegant design.
KLAC is minimal. It’s hard. It’s wonderful.
Lots of things, we can say…
But, you’ll trust us?
When you KLAC, you - for sure - will.
KLAC will be available for iOS on 3rd October 2018.
On Android (open beta) and Windows Phone later this month.
Save the date and keep supporting us.
In the meanwhile you can play the beta for free:
Access the betaYou can know more about KLAC on the game page or devblog.
KLAC is currently in development, stay tuned for more coming in the next days.
You can download the wallpapers in full quality
Download WallpapersERMO is an ethereal game about harmony and inner peace.
You can get ERMO right now:
Hope you enjoy ERMO and its ethereal world.
ERMO is still in development, stay tuned for more updates.
ERMO now includes a new Special Event: BIOK Mod. Capture creatures, lead cute monsters and enjoy!
We released a new version: v1.3.0. It’s available on all platforms: iOS, Android and Windows.
You can play the Mod for free! You can access the Mod by the settings menu.
Check the monsters and match the targets.
You can beat the Mod in 15 minutes.
Hope you’ll enjoy, and if so, we greatly appreciate if you leave a review.
You can learn more about BIOK on the dedicated page.
ERMO is still in development, stay tuned for the next wave of content we’ll release very soon.
Update 19 Jul 2018
BIOK is now available! Get it from Apple Store
We’re very happy to announce that BIOK is now available for pre-order on iOS.
Head to the Apple Store and get BIOK!
Pre-OrderBIOK is pure strategy and intuition. A board game for the ingenious and the acute minds.
Lead the creatures on the playing field to capture monsters and all kinds of items. Watch the monsters’ eyes and guide them to their preys.
BIOK includes several game modes such as survival and bonus, where you can enjoy different gameplay and new challenges. There’re many creatures with different behavior to make the game always fresh.
Biok is available for iOS
Pre-OrderBIOK will be release soon, stay tuned for more coming next days.
BIOK is a strategic board game of conquests with pure intuition.
You will lead a set of creatures on a board field to capture their enemies.
Collect special items and consult the Monsterpedia to learn all the details about each monster, object and special item. All creatures have a strength and a weakness, a most wanted prey and a fearful hunter.
In the meanwhile you can play the beta for free:
Access the betaBIOK will be available next month for iOS, Android and Windows Phone. About a month later, on widescreens, like Steam and Xbox One.
You can know more about BIOK on the game page or devblog.
BIOK is currently in development, stay tuned for more coming next days.
We released a new version: v1.2.0. It’s available exclusively: iOS.
You can play the Mod for free! You can access the Mod by the settings menu.
Enjoy the immersive full screen experience maxed out on the iPhone X screen.
You can beat the Mod in 15 minutes.
Hope you’ll enjoy, and if so, we greatly appreciate if you leave a review.
ERMO is still in development, stay tuned for the next wave of content we’ll release very soon.
It’s a new gameplay twist you’ll enjoy for sure.
We released a new update: v1.1.0. It’s available on all platforms: iOS, Android and Windows.
Spooky is a lovely guest you’ll find in ERMO. Help him, he’s so hungry!
You can play the Mod for free! You can access the Mod by the settings menu.
You can beat the Mod in 15 minutes.
Hope you’ll enjoy, and if so, we greatly appreciate if you leave a review.
ERMO is still in development, stay tuned for the next wave of content we’ll release very soon.
Update 07/11
ERMO is now available on Early Access! Get it from Steam
We’re so happy to announce that ERMO is coming to Steam.
ERMO will be available for Windows, MacOS and Linux.
ERMO will have a period of early access starting next week (about).
Steam pageERMO has some experimental features to share player designed levels and challenge friends to beat them. With the help of the community, we can adopt what is the best choice to provide that feature.
In addition, ERMO runs fullscreen and in immersive mode. It would be nice to collect feedback on this, and understand if players prefer other modes, like “semi windowed” to play and keep multitasking.
Although ERMO is already well tested, squash bugs and get rid of any platform annoyance would be our top priority.
Actually ERMO includes 4 game modes + 1 Bonus mode and about 100 puzzle level/stages. In addition ERMO includes 1 mod, with a special theme and special gameplay rules.
In the early access period we’ll create more content, to reach about 200 level/stages. We’ll create also 1 more mod, to introduce another special item, new gameplay rules and its related theme.
ERMO can be played in full. All main features are already developed and well tested. The level editor and level creation process, both work very good.
In the Early Access period we’ll introduce the possibility to share levels with friends, and all other features mentioned in previous comments.
In the meanwhile head to the ERMO Steam page, wishlist and engage with us and the community
Steam pageERMO is still in development, stay tuned for the next wave of content we’ll release very soon.
Update 24 Oct 2017
ERMO is now available! Get it from Apple Store
Mark the date! ERMO is soon to be released on iPhone and iPad!
On 24 October 2017 ERMO will be available on iOS world wide!
Prepare yourself to be captured into the ERMO world, carried away by an ethereal atmosphere.
In the meanwhile you can play the beta:
Access the betaERMO is still in development, stay tuned for the next wave of content we’ll release very soon.
We joined the program and we’re very happy we published ERMO. Being a UWP game, ERMO runs nicely on any Windows10 device, included the Xbox One.
Now we want to share our experience with the Xbox Live SDK and write a detailed How-To showing all the steps required to deal with the Xbox Live API. In other words, lots of monospace characters will follow.
UWP supports many languages to code with, but mostly C++, C# and Javascript.
Because ERMO is written (mostly) in Typescript, a superset of JS, all snippets included in this post is written in Javascript. It’s very easy to adapt them to C# or C++. Maybe the promise stuff isn’t directly translable, just use the async paradigm in C# or create_task
in C++.
At least, we hope you will get the core idea behind the code.
Actually, under the banner of the Creators Program, a developer can leverage the following Xbox Live features:
Other features, like basic presence and social feed, are automatically managed by the service, with no keystroke by the developer. The full list on the documentation.
In this post, we focus on features developers have to actively code against the SDK, the subset available with the Creators Program.
Like all Windows based development, NuGet is the way to go to import SDKs, libs and any other dependency. The easiest way is to use the integrated NuGet interface in Visual Studio. A free version of Visual Studio is available as Community Edition.
To import XboxLive SDK, right click on the References
node under the project root and chose Manage NuGet Packages...
. It’s available under the Project
menu too.
Pick the Microsoft.Xbox.Live.SDK.WinRT.UWP and install it. Then wait for the huge download to complete.
At the time of this post, the latest SDK version is 2017.8.x. All code examples and API calls refer to that version.
The mandatory first step to access all XboxLive services is to authenticate the user to the XboxLive system.
There’re a couple of options, but the most straightforward and effective is to use signInAsync
.
1 | var xbox = Microsoft.Xbox.Services, |
2 | user = new xbox.System.XboxLiveUser(); |
3 | |
4 | /** |
5 | * Returns a Promise that resolves when the sign in process completes |
6 | */ |
7 | function signIn() { |
8 | return new Promise(function(resolve, reject) { |
9 | user.signInAsync(null).then(function (r) { |
10 | if (r && r.status === xbox.System.SignInStatus.success) { |
11 | resolve(); |
12 | } else { |
13 | reject(); |
14 | } |
15 | }, reject); |
16 | }); |
17 | } |
Once the user is authenticated, you can load its profile with all info associated like the gamertag, score and picture.
We need a XboxLiveContext
to query the profile service and get the data we looking for.
In the following snippet, some utility functions are introduced to make the code cleaner.
1 | /** @type {Microsoft.Xbox.Services.Social.XboxUserProfile} */ |
2 | var userProfile; |
3 | |
4 | /** |
5 | * Returns a Promise with the userProfile |
6 | */ |
7 | function getPlayerProfile() { |
8 | if (userProfile) { |
9 | return Promise.resolve(userProfile); |
10 | } |
11 | |
12 | return loadPlayerProfile(user.xboxUserId).then(function (profile) { |
13 | userProfile = { |
14 | playerId: user.xboxUserId, |
15 | playerName: user.gamertag, |
16 | playerScore: user.gamerscore, |
17 | playerImage: profile.gameDisplayPictureResizeUri.rawUri |
18 | }; |
19 | return userProfile; |
20 | }); |
21 | }); |
22 | |
23 | function loadPlayerProfile(userId) { |
24 | return getContext().profileService.getUserProfileAsync(userId); |
25 | } |
26 | |
27 | /** @type {Microsoft.Xbox.Services.XboxLiveContext} */ |
28 | var context; |
29 | function getContext() { |
30 | if (!context) { |
31 | context = new xbox.XboxLiveContext(user); |
32 | } |
33 | return context; |
34 | } |
Leaderboards and statistics are another services the XboxLive provides. You can define up to 20 of them through the dev center. You need also to localize them in any language your game supports.
Developers under the Creators Collection program don’t get the full leaderboard features, but the service is limited to just player stats.
Key difference is that a leaderboard is composed by multiple stats, like multiple columns in a table where each row is a player entry. Instead, a stat is a simply a list of players and their score (it can be anything), in other words, it’s the common scenario where the game UI displays the score list.
In this post, we stick to stats as they’re enough to make a chart with the player scores.
It’s introduced the StatisticManager
by which we can send scores. Because StatisticManager
is a singleton instance, we reference directly it while the XboxLiveContext
is created. In addition, StatisticManager
needs to know on which players it will operate, thus we add the current player to its users.
1 | /** @type {Microsoft.Xbox.Services.Statistics.Manager.StatisticManager} */ |
2 | var statManager; |
3 | |
4 | /** |
5 | * Submit a score to the XboxLive service |
6 | * @param {string} leaderboardId |
7 | * @param {number} value |
8 | */ |
9 | function submitScore(leaderboardId, value) { |
10 | statManager.setStatisticIntegerData(user.xboxUserId, leaderboardId, value); |
11 | statManager.requestFlushToService(user.xboxUserId); |
12 | } |
13 | |
14 | //create statManager while creating context |
15 | function getContext() { |
16 | if (!context) { |
17 | context = new xbox.XboxLiveContext(user); |
18 | statManager = xbox.Statistics.Manager.StatisticManager.singletonInstance; |
19 | try { |
20 | statManager.addLocalUser(user); //add actual user |
21 | } catch (e) { } |
22 | } |
23 | return context; |
24 | } |
In the above snippet, it’s assumed the score is an integer value, but you can use other supported data types(Integer, Numeric, String) and change the call accordingly.
submitScore
is a fire and forget function, you won’t receive any value, as the StatisticManager
processes all things in background when you use requestFlushToService
.
If you send too many scores in a short time interval, XboxLive services will begin to throttle all your calls. Official documentation states to flush scores at most once every 5 minutes or so.
To limit this side effect and to avoid throttling, you can submit a batch of scores with one call.
1 | /** |
2 | * Submit a batch of scores |
3 | * @param {Array.<{leaderboardId: string, score: number}>} scores |
4 | */ |
5 | function submitScores(scores) { |
6 | for (var a = 0; a < scores.length; a++) { |
7 | var entry = scores[a]; |
8 | statManager.setStatisticIntegerData(user, entry.leaderboardId, entry.score); |
9 | } |
10 | |
11 | statManager.requestFlushToService(user); |
12 | } |
As mentioned earlier, here for leaderboards we intend stats, as we use them to send and get player scores.
Because the StatisticManager
works in the background, the process of getting the data isn’t straightforward like a single call, but requires a more elaborate flow.
The process involves polling the StatisticManager
for events and, when ready, processing the results.
In Javascript to perform the polling we use setTimeout
to delay each call by 100ms. In other contexts or engines you should poll on any frame, thus bounding the call to the frame execution.
1 | /** |
2 | * Returns a Promise with leaderboard entries |
3 | * @param {string} leaderboardId |
4 | * @param {number} maxItems |
5 | */ |
6 | function getLeaderboardScores(leaderboardId, maxItems) { |
7 | var query = new xbox.Leaderboard.LeaderboardQuery(); |
8 | query.maxItems = maxItems; |
9 | |
10 | statManager.getLeaderboard(user, leaderboardId, query); |
11 | return startPollingStatManager(leaderboardId); |
12 | } |
13 | |
14 | function startPollingStatManager() { |
15 | return new Promise(function (resolve, reject) { |
16 | pollStatManager(resolve, reject); |
17 | }); |
18 | }); |
19 | |
20 | function pollStatManager(resolve, reject) { |
21 | try { |
22 | var events = statManager.doWork(); |
23 | for (var a = 0; a < events.length; a++) { |
24 | if (events[a].eventType === xbox.Statistics.Manager.StatisticEventType.getLeaderboardComplete) { |
25 | var result = events[a].eventArgs.result; |
26 | if (result) { |
27 | resolve(processLeaderboardResult(result)); |
28 | } else { |
29 | resolve([]); |
30 | } |
31 | return; |
32 | } |
33 | } |
34 | } catch (e) { |
35 | reject(); |
36 | } |
37 | |
38 | //poll again after 100ms |
39 | setTimeout(function() { |
40 | pollStatManager(resolve, reject); |
41 | }, 100); |
42 | } |
43 | |
44 | /** |
45 | * @param {Microsoft.Xbox.Services.Leaderboard.LeaderboardResult} result |
46 | */ |
47 | function processLeaderboardResult(result) { |
48 | var entries = [], |
49 | profiles = []; |
50 | |
51 | for (var a = 0, l = result.rows.length; a < l; a++) { |
52 | var row = result.rows[a], |
53 | value = row.values[0]; |
54 | |
55 | profiles.push(row.xboxUserId); |
56 | |
57 | entries.push({ |
58 | playerId: row.xboxUserId, |
59 | playerName: row.gamertag, |
60 | playerImage: undefined, //we need to load it later |
61 | rank: row.rank, |
62 | //assumes score is an integer value |
63 | score: !isNaN(value) ? value : parseInt(value, 10) |
64 | }); |
65 | } |
66 | |
67 | return entries; |
68 | } |
The flow isn’t the most linear in the field, but it works nicely when you call just the surface area of the snippet.
1 | var leaderboard = "ermo-highscore-itinerary", |
2 | maxItems = 10; |
3 | getLeaderboardScores(leaderboard, maxItems).then(function(entries){ |
4 | //here we can cycle and show the entries to the screen |
5 | }); |
To complete the Retrieve leaderboard scenario, the last step is to load all players’ picture. As we did for the user logged in, the profile service comes handy to get all player profiles.
We have to pass the user-id list to get the pictures we want.
1 | /** |
2 | * Returns a Promise with an array of player profiles |
3 | * @param {Array.<string>} userIds |
4 | */ |
5 | function loadPlayerProfiles(userIds) { |
6 | return getContext().profileService.getUserProfilesAsync(userIds); |
7 | } |
With the Xbox Live SDK available for the UWP platform is pretty easy to take advantage of the Xbox Live services. Due to large amount of features, the Xbox Live SDK is huge and the API surface area can be confusing sometimes.
With this HowTo, we hope we eased the integration task for any developer willing to put some efforts on the UWP platform.
Keep coding.
If you want you can stay in touch:
The release is tagged with version: v0.7.5. It’s available only for Android. iOS, Windows and other platform will come soon.
We’re really glad of the feedback received. Thanks to anyone who send us hint, bug reports and any other advice.
Here the highlight of the v0.7.5
This release brings stable gameplay and many improvements we hope you enjoy.
You can download ERMO right now.
Try ERMO now! We’re really looking forward your any advice and suggestion to make a better game.
ERMO is still in development, stay tuned for the next wave of content we’ll release very soon.
Creators Collection is a brand new category of the Windows/Xbox store featuring self-publushed games usually made by indie developers like us.
And ERMO got a special space there. ERMO is included in the first wave of games as the Creators Collection launched just a day ago.
You can read the full statement at Xbox Blog.
ERMO now include a Xbox Live integration with auto-signign, gamertag display and a large set of leaderboards tracking highscores and special statistics.
You can download ERMO for Windows and Xbox One, from the windows store
ERMO is still being update with a big new feature coming soon.
The update is pretty big with a lot of features. Due to some breaking changes into many internal stuff, players having the game installed will have the progression state been reset.
The update is tagged with version: v0.6.0. It’s available on all platforms: iOS, Android and Windows Phone.
If you hadn’t a chance to join to the beta testing, you can do it now.
Access the betaHere the highlight of the v0.6.0
Now, the player earns experience points and progress through levels.
Experience points can be obtained by collecting tiles or by completing some goals available for the current player level.
Player level is useful to unlock game content or some special feature.
The gameplay now involves multiple game modes. The “classic mode” is now named Itinerary Mode. In the Itinerary mode you will progress through a journey of hand-crafted level to discovery the full atmosphere of ERMO.
The second mode available is the Procedural mode where ERMO generates levels and stages according your choice.
By playing procedural mode, you can face very tough levels requiring all your mental and reasoning skill. Be ready to get very demanding challenges.
More game mode coming soon. Actually we’re working on a “designer mode” where you can set up your own level and play against it or challenge friends to beat it
In this update, we’re introducing a new king of stage: Augmented. This stage involves special items to deal with in several ways.
The first special item is the Ring. A ring block the column color alignment. Move two rings close to remove them from the stage.
A second special item is the Bomb. Don’t let them be close otherwise they explode.
While playing any mode you can face Bonus stages where a group of circle squares surround one or more color targets in the center.
Bonus stages grant a reward for any target matched. In this way, you can get some energy or skill to use further on in the game.
ERMO now integrates with game services provider by the platform:
Achievements are unlocked through the game and each one rewards some energy depending on its difficulty. You can access Achivements, see the full list, the status and claim your rewards in the main menu in the title screen.
Leaderboards provide a chart to several highscores and some stats all players perform playing ERMO. You can check Leaderboards and see your rank.
Now ERMO supports an immersive interface suited for wide screens like tables or desktop monitors.
Here’s a screenshot with a full background and an adapted menu on the right.
More details and support for more non-mobile platform in a next dedicated post.
This release has lot of new feature and gameplay improvements we hope you enjoy. You can download the beta version:
Try ERMO now! We’re really looking forward your any advice and suggestion to make a better game.
ERMO is currently in development, stay tuned for more coming next days.
UWP offers this chance through a fairly simply API. When the window launches, you can set your desired size and attempt to enter in full screen mode.
Before the Activate
call, you can specify the preferred display mode - which is kept over restarts. Then you can try to go full screen.
1 | var appView = Windows.UI.ViewManagement.ApplicationView; |
2 | appView.preferredLaunchWindowingMode = Windows.UI.ViewManagement.ApplicationViewWindowingMode.fullScreen; |
3 | var view = appView.getForCurrentView(); |
4 | view.tryEnterFullScreenMode(); |
If you adopted HTML/JS as your the technology stack of choice and you render the game using a canvas or any HTML element, it happens the EDGE engine will draw an ugly and utterly annoying dotted border all along the window perimeter.
The issue lays on the default focus style of some elements. And, of course, you can override the style and set your own.
In order to get rid of the inaesthetic border, CSS is your friend. Just refine the focus style of the affected elements.
In our games, since there’s a main canvas element, it’s enough to use the following rule:
1 | body:focus, canvas:focus { |
2 | outline: 0 |
3 | } |
This will remove the border and give a clear looking background.
Hope it helps some of you, easing one of the many hassles that enrich our days.
Keep coding.
]]>As you can imagine, we’re working hard to improve the game according your comments.
We released a new update: v0.5.0. It’s available on all platforms: iOS, Android and Windows Phone.
If you hadn’t a chance to join to the beta testing, you can do it now.
Access the betaHere the highlight of the v0.5.0
As requested by many, ERMO now features a colorblind settings as long with the WEB version. You can access it by the settings menu in the level screen.
Once activated, each color will be decorated with a unique symbol to easier distinguish blocks. In the bar, symbols are in black to contemplate both empty and matched target (filled by color).
We improved the retry experience by adding a “Play Again” button. In this way, you can play again the same level with out the need to go back to the main screen.
A message clearly states that the score will be reset.
Now ERMO features a challenge engine by which some tasks are available to the player to earn some reward.
By this tool, now you can unlock Themes by completing a challenge.
The challenge engine is quite flexible, we plan to use it in several ways. This is just to scratch the surface.
There’re a lot more still to come.
You can download the beta version:
Hope you enjoy ERMO and its ethereal world.
ERMO is currently in development, stay tuned for more coming next days.
ERMO is a puzzle game with a very minimal gameplay. Shift the tiles to align the columns.
That’s it! Yeah, it sounds poor, but you’re be overwhelmed by the deep dynamics that arise from just the basic levels.
Featured with an ethereal graphic, ERMO favors calm and peace, while keep your head on the puzzle.
There are several game modes, also. But, to not spoil too much and let you discover the world of ERMO, we end here for now.
Oh, there are some beautiful landscapes too…
ERMO brings you in a place far away from where you can isolate your mind and reach inner peace.
You can read more about ERMO on the game page or devblog.
ERMO is currently in development, stay tuned for more coming next days.
This update push forward both the story and game content with new puzzles and challenges.
This updated is tagged by version: v1.2.0. It’s available on all platforms: iOS, Android and Windows Phone.
As this is the first major update of the game, we wanted to put our best efforts to create beautiful scenes and enjoyable puzzles, balancing the difficulty with fresh content.
A curated list of the main new features and changes of this update:
This update comes with new four full featured episode. Each one introduces new elements, charaters and sidequests to challenge your logic reasoning and action reflexes. Let us introduce the episodes:
The journey of the Marked continues through an arid land. Overcame new obstacles and dangers, let the hero pass thanks to your skills.
A swamp and a rainy weather can not stop the hero to proceed to the next temple. New encounters will put new concerns and tasks to accomplish.
As the swamp became thinner, you have to lead the hero across plagued waters. Here the hero will take some rafting for the first time. Keep focus as the next temple is closer.
The second sacred temple. New gems to collect. A new ritual to complete to clear the deep and wide desolation.
In some levels, Jolly the collector asks you to gather some tiles. With them, you will play a new logic minigame: Terrazze.
The goal is to put all tiles in columns of the same color. More about this game in a future dedicated blog post.
This minigame is quite challenging on higher level. Hope you enjoy it.
The Aedo keeps to tell the story. In this update, you will know how the curse of the Mark is born. The Aedo introduces a character from a distant and forgotten past, the first King and his deep darkness.
Follow the story of the Marked and let him accomplish the destiny! Test you smartness and challenge yourself with puzzles, minigames and logic reasoning.
We dind’t finished yet. We’re keeping to develop Aedo Episodes with more content and to complete the story. Stay tuned.
Drop us your toughts, your hints and suggestions. Thanks for all your invaluable feedbacks.
]]>Here’s a little trick to draw a circle and fill it. It’s fast and very effective as it doesn’t add any draw calls. It just exploits some not-exposed internal members of the canvas rendering wrapper.
1 | var node = new cc.DrawNode(); |
2 | node.drawCircle(center, radius, ...other params); |
3 | //workaround to fill the circle |
4 | var lastElement = node._buffer[node._buffer.length - 1]; |
5 | lastElement.isFill = true; |
6 | lastElement.fillColor = cc.color.WHITE; // the fill color |
If you’re in the need to use this function often, thanks to javascript prototype feature, you can enrich the cc.DrawNodeCanvas.prototype
with this operation.
1 | /** |
2 | * @param {cc.point} center - x and y coord of the circle center |
3 | * @param {number} radius - circle radius length |
4 | * @param {cc.color} color - circle fill color |
5 | * @param {cc.color} [borderColor] - Optional circle border color. |
6 | * @param {number} [borderWidth] - Optional circle border width. |
7 | * @param {number} [segments] - Optional circle segments, aka definition. (default 24). |
8 | */ |
9 | cc.DrawNodeCanvas.prototype.drawSolidCircle = function (center, radius, color, borderColor, borderWidth, segments) { |
10 | this.drawCircle(center, radius, 0, segments || 24, false, borderWidth || 0, borderColor || color); |
11 | //set the fill mode and color |
12 | var lastElement = this._buffer[this._buffer.length - 1]; |
13 | lastElement.isFill = true; |
14 | lastElement.fillColor = color; |
15 | } |
Put the code right after the cocos-js script import and you can call drawSolidCircle
function in your own game code as it was part of the framework.
1 | var node = new cc.DrawNode(); |
2 | node.drawSolidCircle(center, radius, color); |
Hope this trick make your life easier.
Keep coding.
Discaimer
As stated this snippet works only in canvas mode. For WebGL you should use standard cocos-js API.