Mural (Experimental)
Currently under heavy development, a way much better alpha version is coming soon :D
The project is an experiment which implements CanvasRenderingContext2D using amazing Cinder framework and duktape.
It's designed to be something like Ejecta for Desktop. The ONLY reason that I start from scratch instead of using NW.js is its exported file size. Pack a simple game into a browser and send it to friends sounds crazy and not everyone wants to download another Chromium just for playing a tiny game.
The core part is based on Ejecta, with some extra candy from Cinder. The most important goal of this project is to wrap HTML5 games, but the C++ layer is designed to be clean and independent from any JavaScript VMs which means you can also use it as a C++ game engine. Since Cinder has GREAT power, I'll recommend you to try it yourself.
Features
CanvasRenderingContext2D API
- strokeStyle, fillStyle (color)
- fillStyle (pattern)
- strokeStyle, fillStyle (gradient)
- globalAlpha
- globalCompositeOperation
- save, restore
- beginPath, closePath
- moveTo, lineTo
- rect, arc
- stroke, fill
- strokeRect, fillRect
- strokeText, fillText (stroke text performs the same as fill)
- drawImage
- translate, rotate, scale
- clearRect
- bezierCurveTo
- arcTo
- quadraticCurveTo
- setTrasform
- transform
- createImageData (Surface API is great, no need to create ourselves)
- getImageData
- putImageData
- lineWidth
- lineCap
- lineJoin
- miterLimit
- font
- texAlign
- textBaseline
- measureText
- imageSmoothingEnabled
- createLinearGradient
- createRadialGradient
- createPattern
- shadowBlur
- shadowColor
- shadowOffsetX
- shadowOffsetY
Timers
- setTimeout, setInterval, clearTimeout, clearInterval
- requestAnimationFrame
Progress of developing
I always prefer Trello for project management, the tasks list can be found here Mural at Trello
Build and Run
- Download Cinder latest version (0.9.0) or clone its
master
branch - Create an
apps
folder inside your cinder folder - Clone Mural into the
apps
folder, so you'll haveapps/Mural
- Now open the project file, and have fun
(You can also put Mural to any path and set the CINDER_PATH
config from the project file)
Supported Platforms
Windows and OSX are on the top priority while Linux,
iOS and Android supports are planned (as soon as the master
branch and
Cinder support for Linux/Android are stable enough).
The MIT License (MIT)
Copyright (c) 2014-2015 Sean Bohan
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.