Alessandro Pignotti’s project looks to be the start of something good to come. Lightspark Open Source Flash Player [github]has some really nice features that should influence the Flash Player and maybe even draw some interest from Adobe? Maybe it can be like the Moonlight player for Silverlight only broader.
One such awesome feature is OpenGL GLSL hardware rendered shaders for elements of flash. Flash has Pixel Bender which is pretty nice but having GLSL shaders and the use of OpenGL directly is great.
Features
- JIT compilation of ActionScript to native x86 bytecode using LLVM
- Hardware accelerated rendering using OpenGL Shaders (GLSL)
- Very good and robust support for current-generation ActionScript 3
- A new, clean, codebase exploiting multithreading and optimized for modern hardware. Designed from scratch after the official Flash documentation was released.
A sweet engine for getting started with Android game development is the andengine 2D OpenGL ES engine. This is very simple and compares with cocos2d-iphone for iOS development in 2D with OpenGL ES. They both support a wide range of 2d techniques with an OpenGL renderer. Some great videos are posted on the andengine google code page showing a box2D example, multiplayer example and more.
Mobile games are on slower hardware, similar to later 90′s computers so native is a great way to go for 3d and 2d game development because of this limitation at the current time and well into the next few years. Take this time to learn you some native gamedev. andengine isn’t native directly as it is Java based but compiled with the Dalvik JIT virtual machine. Another way to go native on Android is the Android NDK which allows C and C++.
- andengine download at google code
- andengine examples at google code
- andengine blog
- Mercurial repository at google code
- cocos2d-android port of cocos2d-iphone with BSD license
- rokon android is another BSD licensed android game engine
The engine also has extensions that can be easily added and some great ones exist already.
Unity is a great and agile company that responded to the iOS4 changes with something very nice, a C++ option to develop with the Unity engine on the iOS. They will implement this if using Mono is barred which so far hasn’t happened. I have to say I wish this was an option for the Unity Engine all the time and hope they implement it anyways. For now Joachim Ante on the the Unity blog says this:
We continue to be excited about the iPhone, iPod touch and iPod as platform targets for Unity developers. While we don’t think C++ is the best language to write game code , using C++ as a scripting language has memory and performance advantages on low-end devices. This is a great feature to have for developers who want to squeeze the last ounce of memory & performance out of their games.
We still can’t believe Apple will force developers into choosing a specific language for development. And as mentioned, Apple is still approving every Unity-based game we know of. In case the situation changes, rest assured that we are working this Plan B.
We’ll be ready to talk more about this as well as share some time-line information with you soon, while of course waiting to find out if any of this will actually be necessary.
The Unity Plan B is that the C++ engine code that mimics as closely as it can to the Mono .net C# or Javascript code. From the samples on the blog the C++ and Mono (javascript in this case) samples are really similar.
Many current engines are legacy or have lots of bloat, unless you write your own, or maybe even still then. Though this is looking really clean for C++ game engine code, at least in comparison to current industry leaders for indie engines.
It would be a beautiful C++ library to use even if Apple doesn’t require it. Compared to the other indie game engines out this would be a sweet C++ engine for indies and hope they do this no matter. C++ can be written cleanly and with influence from a simplified C#/Javascript engine and clean API it makes for a killer C++ engine that makes sense. Right now native is really attrctive on embedded for some years to come.
A very basic comparison from their blog:
Javascript Sample
function Update(){ //Spin the object around the world origin transform.RotateAround(Vector3.zero, Vector3.up, 20 * Time.deltaTime); }
C# Sample
using System.Collections; using UnityEngine; public class Example : MonoBehaviour { void Update(){ //Spin the object around the world origin transform.RotateAround(Vector3.zero, Vector3.up, 20 * Time.deltaTime); } }
C++ Sample
#include "UnityEngine.h" class Example : public MonoBehaviour { public: void Update() { transform.RotateAround(Vector::zero, Vector3::up, 20 * Time::GetDeltaTime()); } };
Things I am wondering…
- Will this help porting to Android versions if they use the NDK?
- How much smaller will my app be if I use the C++ version (attractive feature since the mono dlls are pretty big – even though I really dig mono)?
- Wouldn’t a C++ version be a better base with pluggable scripting in C# if you want? Maybe an option for Lua with a similar API signature for all? Ok maybe over-engineering there…
Wow. IE9 just set it in motion.
Canvas 2D is now really on the horizon for all browsers. IE9 preview now supports the <canvas> tag and all canvas element APIs and most Canvas 2D context APIs and attributes!
Features Available
- Canvas
- In the latest Platform Preview we support all Canvas element APIs and most Canvas 2D Context APIs and attributes.
Features Partially Implemented
- Canvas
- globalCompositeOperation
- The latest Platform Preview does not include support for the globalCompositeOperation attribute.
- DOM Exceptions
- The latest Platform Preview does not include support for Canvas 2D Context DOM Exceptions.
- drawFocusRing()
- The latest Platform Preview does not include support for the drawFocusRing() Focus management API.
This is pretty amazing even though it has been hinted at by other news (previously from AMD). Why should we care what Internet Explorer is up to? Well the dream of standards across web browsers seems to be materializing for html5 and more importantly, canvas 2d.
Even with Silverlight Microsoft has decided to join the party and upgrade the web on some great standards to build even more innovative platforms on top of. Some may see this as a death knell for Silverlight, Flash etc but I do not see it that way. I see <canvas> as a competing interactive technology but many times technologies bind together for a better experience, they also drive one another to innovate.
Much like Silverlight pushed Flash, and Silverlight was created because of Flash, those two technologies brought on canvas 2D and more graphical capabilities for the web in the interactive, game and application space. As javascript execution has sped up so has the graphical capabilities of browsers now. What is not to like about that if you are an interactive developer?
Canvas, Flash, Silverlight are all for the most part still software/CPU accelerated. The question is who will start the hardware acceleration of canvas and competing technologies even further to bring us closer to OpenGL ES/WebGL in the browser?
Ars Technica states that IE9 will have hardware accelerated canvas in addition to SVG but that doesn’t seem to be officially stated anywhere by Microsoft yet that I can find. AMD has hinted at it and previous news about SVG being hardware acclerated. Time will tell and it will be a HUGE boost to the browsers that do, of course we need all of them to do it to be worthwhile for mainstream content.
Ars on the hardware accelerated canvas support:
What does come as a surprise is canvas support. Microsoft has been promoting Internet Explorer 9′s support of SVG, which provides vector graphics capabilities within the Web browser, but thus far has kept quiet when asked if it would support the canvas bitmap graphics specification. Not only is canvas being supported, it is also being hardware accelerated, continuing Microsoft’s efforts to give Web applications the ability to exploit the extensive hardware capabilities of modern PCs.
Of course we should tread carefully here, there is still a big chance that portions of the canvas 2d spec will not be implemented exactly the same or some browser may have missing features much like CSS and javascript evolution. For instance the “most Canvas 2D Context APIs and attributes” is something I hope is addressed in the final IE9. If you are gonna spend the time implementing a standard, do it fully and right, don’t try to break it (an old Microsoft tactic). But this step was needed to again push interactive web technologies to more closely compete with desktop graphic technology which adds some really exciting times ahead.
Another golden ray of hope is ES5 support in IE9. Again Wow!
Google has decided to put weight behind WebGL and stop actively developing O3D as a plugin, rather they will make O3D a Javascript library on top of WebGL. This will focus the 3D plugin development efforts from Google into just WebGL on top of the OpenGL ES 2 spec, which in turn runs in the html5 <canvas> tag.
WebGL is pretty exciting offering browser based OpenGL and hardware rendered graphics. When this becomes mainstream this will change up gaming and interactive on the web immensely. Unity 3D and Flash 3d engines add lots of immersive environments and WebGL will be just as exciting, if all browsers adopt it (canvas/webgl).
At Google, we’re deeply committed to implementing and advancing standards, so as of today, the O3D project is changing direction, evolving from its current plug-in implementation into a JavaScript library that runs on top of WebGL. Users and developers will still be able to download the O3D plug-in and source code for at least one year, but other than a maintenance release, we plan to stop developing O3D as a plug-in and focus on improving WebGL and O3D as a JavaScript library.
About WebGL
WebGL is a cross-platform, royalty-free web standard for a low-level 3D graphics API based on OpenGL ES 2.0, exposed through the HTML5 Canvas element as Document Object Model interfaces. Developers familiar with OpenGL ES 2.0 will recognize WebGL as a Shader-based API using GLSL, with constructs that are semantically similar to those of the underlying OpenGL ES 2.0 API. It stays very close to the OpenGL ES 2.0 specification, with some concessions made for what developers expect out of memory-managed languages such as JavaScript.
WebGL brings plugin-free 3D to the web, implemented right into the browser. Major browser vendors Apple (Safari), Google (Chrome), Mozilla (Firefox), and Opera (Opera) are members of the WebGL Working Group. “It feels like, someone’s missin-ing”
A new Javascript 3D Engine that can render to Canvas and SVG has been released by mr. doob.
Mr. doob is a well known Flash developer that has added many great experiments and cool contributions without being stuck to one technology, making some great interactive projects in javascript, chrome experiments and html5 (canvas/svg) in addition to the work in Flash with toolkits like Papervision 3D. Recently the Harmony html5/javascript sketching project generated lots of interest for an html5 sketching app.
Three.js is great because it is a 3d engine built with renderers in SVG and Canvas makes to a really good base for modular, cross platform 3d engine right now (as soon as IE9 joins the party). For a while a good javascript rendering library will need to support multiple renderers for browser differences in performance and supported dependencies like canvas, svg and webgl. Three.js has that reality as part of the design.
Currently the engine only supports particles and triangles/quads with flat colors. The aim is to keep the code as simple and modular as possible.
At the moment the engine can render using <canvas> and <svg>. WebGL rendering would come at a later stage but feel free to fork the project and have a go.
Although this allows 3D for iPhoneOS and Android platforms the performance on these devices is not too good.
Sample Code:
var camera, scene, renderer; init(); setInterval(loop, 1000 / 60); function init() { camera = new Camera(0, 0, 1000); scene = new Scene(); renderer = new CanvasRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); for (var i = 0; i < 1000; i++) { var particle = new Particle( new ColorMaterial(Math.random() * 0x808008 + 0x808080, 1) ); particle.size = Math.random() * 10 + 5; particle.position.x = Math.random() * 2000 - 1000; particle.position.y = Math.random() * 2000 - 1000; particle.position.z = Math.random() * 2000 - 1000; particle.updateMatrix(); scene.add( particle ); } document.body.appendChild(renderer.viewport); } function loop() { renderer.render(scene, camera); }
iTween is a tweening kit for Unity that is in the same style as TweenLite, Tweener and others in the tween format that is common for flash tween libraries in Actionscript 3. This library is available in javascript and C# for Unity 3d Projects and is quite fast and solid.
iTween is a simple one file drop in for some great scripted animation and easing that is very reminiscent of Flash using Penner equations and common libraries so it is easy to get started. It works for web player, desktop and iPhone Unity (however long that lasts).
Some sample code looks like this:
private GameObject go; private GameObject cam; void Awake() { go = gameObject; cam = Camera.main.gameObject; } private void Start() { iTween.rotateFrom(go, 1.5f, 0, null, 90, null, iTween.EasingType.easeInExpo); iTween.moveFrom(go, 1.5f, 0, null, 3.5f, null, iTween.EasingType.easeInExpo); iTween.colorTo(go, .3f, 1.5f, 3, .5f, 1.2f); iTween.shake(cam, .8f, 1.5f, null, .3f, null); iTween.scaleTo(go, 2, 2.3f, null, 2, null); iTween.rotateBy(go, null, 4.3f, .5f, null, null); iTween.moveTo(go, null, 4.6f, null, 1.2f, null); iTween.moveTo(go, null, 5.8f, null, 0, null, iTween.EasingType.easeInExpo); iTween.shake(cam, .8f, 6.8f, null, .3f, null); iTween.colorTo(go, .5f, 7.6f, .165f, .498f, .729f); iTween.scaleTo(go, null, 7.6f, null, 1, null); }
- Download Javascript iTween by Bob Berkebile (pixelplacement.com)
- Download C# iTween by Patrick Corkum (insquare.com)
UPDATE: Due to retractions it cannot be entirely confirmed that IE9 will support <canvas> of html5 spec. They are the last browser and they must support it for it to be a real, valid solution for 2d animation. GPU supported <canvas> would be a huge innovation but would also most likely kill Silverlight for animation, unless they integrate <canvas>. Standards are such a tough bet, ask Adobe with the ES4 bet. Since standards are so tough to get through and are design by committee many times, plugins still have a huge advantage of changing easily. We’ll keep an eye on IE9 to see if the <canvas> revolution will happen soon or if it will be years off. It will most likely be years off for mainstream at any rate.
Could it be that Microsoft is innovating again? IE9 will supposedly be largely hardware accelerated for all graphical elements and possibly <canvas> and <video> html5 tags? IE9 test drive preview available here.
It appears Microsoft has been enjoying the Apple, Adobe, Google smackdowns on each other, got lost in the dust kicked up and just done what many developers want: hardware acceleration. Firefox 3.7 also has hardware acceleration coming down the pike.
Specifically, IE9 will take advantage of the underlying hardware in different ways, both from a visual perspective as well as code execution perspective:
- The MSHTML rendering layer has been enhanced to use Direct2D and DirectWrite instead of GDI. Direct2D enables GPU accelerated 2D graphics and text, and allows sub-pixel positioning. In addition, the GPU is used for scaling (bitmaps are mapped to textures), which is ideal for zooming and moving images around the screen. This GPU support translates directly into improved readability of pages, more precise placement of text and images, and smooth scrolling and zooming.
- JavaScript performance is greatly improved from older versions of Internet Explorer, and should be competitive if not better than competing browsers. In the past, JavaScript in IE was interpreted and not compiled into native processor instructions. The JavaScript engine now includes a JIT compiler which emits x86 instructions and compiles the code before it runs, resulting in a dramatic performance uplift. Instruction generation can also be tailored to the underlying processor to take full advantage of the underlying platform.
- IE9 is more standards compliant than previous versions, with new support for HTML5 elements such as <video>, CSS3 support, and SVG support. All graphic elements will be accelerated on the GPU and will enable hardware accelerated rendering contexts for application development, improving visual display, reducing CPU usage, and improving power usage.
There is no excuse in this age where most people have at least a 32MB cards even on the lowly intel OEM cards to not take some advantage of hardware rendering/acceleration for aspects of web content including video, 2d, games and even 3d.
There are lots of other areas of browsers and tech that is hardware accelerated such as plugins like Unity (and Director waaay before that), video, and new tools like WebGL/O3D. Firefox 3.7 is also aiming for hardware acceleration. This idea of browser graphical elements not just in a plugin or video player being hardware accelerated is something that might spark some very interesting and innovative experiences.
I applaud this effort and hope there is truth in it beyond just a preview that has features cut. I also hope more browsers and plugins start doing the same besides just IE9 and Firefox. This entire blog has pretty much had an underlying hardware rendering/acceleration slant. I have been pushing this for sometime and I believe the time is coming soon that web developers will be equipped with the power that native and game developers have for graphics soon, mainly for applications, games and experiences.
The best news is that IE9 will support html5 and <canvas>, <video> tags and ensures the new functionality that web developers will be able to use. We’ll all have to wait for 2-3 years probably before it is something that is 90% saturated and usable in the mainstream market but it is good to know great times lie ahead.
I can’t believe I just wrote about IE possibly innovating ahead of others.
Unity is showing no signs of slowing down in making a consolidated, easy pipeline for game developers and creators to bring their wares to the masses on the top platforms. Already Unity 3D is the best 3d web browser plugin at the current time with export paths to web, desktop (mac and PC), iPhone/touch and Wii. But now we will see support for PS3, iPad (obvious as it is a iPhone/touch) and Android (most likely with the help of the C++ NDK rather than the Java SDK). XBOX 360 support was announced last year.
This is pretty huge even for such a small and innovative company. I guess it means it will be time to buy an upgrade soon. Unity so far has been giving feature after feature for free for current license holders, this one seems big enough to justify a major version increase.
Gamasutra comments on other great features:
This third iteration will also incorporate Umbra Software’s occlusion culling product, which is designed help performance for games with large, open scenes and complex geometry. The platform’s top-end version, Unity Pro, will include both Umbra and Beast at no additional cost.
Unity Technologies updated its Unity iPhone for version 3.0 to include streaming audio support for smaller build size, Bluetooth multiplayer support, faster in-game GUIs”, and a 2D sprite engine. Furthermore, the company’s iPhone product will offer performance improvements that promise to provide faster frame rates.
The company says that with its new platform support for PlayStation 3, iPad, and Android, it offers developers an opportunity to target a larger install base than any other game engine. Unity’s game engine currently can produce games for Windows, Mac, iPhone, and Wii, with support for Xbox 360 announced last October.
- Pretty sweet web server called Cherokee, newer and seems to run just about everything (django, rails, mono.net etc): http://bit.ly/bYJDoo #
- If the US wins I predict a one month hockey fad, maybe less. #
- see ya in four years hockey! #
- Looks like the next Winter Games will be in Сочи, Россия: http://bit.ly/b5TyEJ location: http://bit.ly/9wTcZT #
- SLARToolkit, Augmented Reality library for Silverlight: http://bit.ly/9Dz6V6 #
- RT @rww: Google Acquires Online Photo Editor Picnik http://bit.ly/bW8fhK – well done flash based app scores #
- RT @hodapp: Valve games for the Mac? Let me in on that. http://j.mp/boWXhY (via @jesterxl) – explains moving to webkit in steam #
- RT @migueldeicaza: OH: "fantastic advantage of having laptops with only intel graphic cards: am not tempted to play any game on a computer" #
- PHP MVC framework DooPHP: http://bit.ly/dlAhON #





