Posts Tagged ‘2d’
Making 2D games in Unity is getting better with products like RageSpline for making vector like splines to create objects (texturable or color), by far one of the best additions to the Unity Asset Store. The Unity Asset store is a great new place for inspiring products that are excellent, RageSpline shows why.
$50 in the Unity Asset Store but worth it, I hope it is expanded to import many vector formats.
The author is Juha Kiili is the author of this awesome piece of tech and it is seemingly doing well. This could be a full fledged 2d toolkit easily with many import/export capabilities.
Features of RageSpline
- Creating 2D meshes and lines with bézier-based splines.
- Outlining with single color, variable width per control point + natural/sharp switch per point.
- Solid one color fills.
- Linear gradient fills with two colors and GUI-adjustable scale, offset position and rotation.
- Emboss styling with two colors and GUI-adjustable adjustable scale, rotation and smoothness variable.
- Texturing support with GUI-adjustable scale, offset and rotation.
- Automatic physics generator.
- Adjustable vertex count for outline, fill, emboss and physics.
- Example game included: RageCar.
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.
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!
- In the latest Platform Preview we support all Canvas element APIs and most Canvas 2D Context APIs and attributes.
Features Partially Implemented
- 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.
- 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.
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.
Another golden ray of hope is ES5 support in IE9. Again Wow!
Box2D is responsible for inspiring many 2d physics engines including Motor2, Box2DFlashAS3 and others. Box2D the original toolkit is a solid c++ physics engine that has many great examples and features including real collision.
How to use
- Download a zip file and extract it.
- Copy js/ and lib/ directories from the extracted directory to your app directory.
- Copy script tags in the header part of index.html in the extacted directory to your html file where you want to simulate physics.
Because this library does not have a lazy-loading system now, you should load all classes before starting your simulation. To make things worse, each library has a bit complicated dependency each other so that loading libraries in wrong order may cause a fatal error. To avoid such a trouble, it is strongly recommended to copy the header part of this file or `index.html’ including the downloaded zip file.
- Utilizing Box2D APIs, simulate the newton world as you like.
The Box2DJS APIs are completely same as those of Box2DFlashAS3. Please refer information about it.
Video of Box2DJS in Chrome
Video of Box2DJS in FF3
I rarely mention stuff I have worked on here but I got a chance to use APE and AS3 on the online Plinko game at the site for the Price is Right videogame for the famed pink Plinko Board. Who doesn’t love Plinko?
I did the programming on this back when I still worked at emarketing/prizelogic.
I will be featuring a small iteration to APE with draggable particles and how I did it. In the end I didn’t use the draggable particles but they are fun (i ended up changing my collision/border particles after testing). I ended up controlling the drop location by swapping out a wheel particle after they dropped it. So that it got the famous Plinko disc bounce and roll.
Why did I use APE? Well it is the least complex physics engine. I started off with Box2dFlashAS3 and will post that one maybe as well but ended up going with APE mainly for integration it was easier that it was a less intensive codebase. Box2DFlashAS3 can scare non C++ coders with it’s style let alone AS2 coders moving to AS3.
It is slower with all the other animation going on in the site but you can also play on my server here just the Plinko part.
Can you get 10,000?
It is heavily based on Glaze (demos) and Box2D which the Motor2, Glaze and Box2DFlashAS3 physics kits are all based on. Box2D is a great C++ 2D physics engine, it is simple which lended itself to being ported to AS3 quite easily. It is also a testament to AS3 that C++ kits are being ported into the language, not once, but many times. Also C ports like Chipmunk and other signs point to == AS3 is of fun.
2D Physics in Flash and AS3 are extremely hot and can be used for many, many things from game development to promotions to simulations to user interface or visualizations and even modeling natural systems. It is nice to have a port of Box2D and similar to glade capabilities with Chipmunk like Glade has.
A game and physics engine for Flash including:
- Rigid Body Dynamics
- Scene management
- Line of sight
- User Input
Core parts of the physics solver and collision system are based on the C physics engine Chipmunk
Notes about Physaxe:
Physaxe is a 2D Rigid Body Library written in haXe. It’s been highly optimized for the Flash 9 Player, with the best optimizations available.
Physaxe is based on several existing physics engines, mainly :
- Box2D, the reference open source physics engine
- Glaze, an AS3 engine which is a port of Chipmunk, itself based on Box2D
Physaxe features are :
- rigid body consisting in several shapes
- shapes supported are circles, segments (with rounded edges) and arbitrary convex polygons
- customizable broadphase (currently bruteforce and y-sorted list are available)
- island resolution and sleeping (allow ~0 CPU to be spent when groups are sleeping)
- constraint solver based on Box2D sequential impulses
- customizable body properties, such as linear/angular friction and maximized motion
Updated list of physics engines are like this:
AS3 2D Physics Engines (Open Source)
haXe 2D Physics Engines
Get your game on! It is best to get them out early and often. I need to take my own advice.