Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


30. April 2012

image

 

 

 

Research in Motion, of Blackberry and Playbook fame, recently released Gameplay 1.2, a cross-platform 3D game programming library aimed at Indie developers.  As a game maker, it is easy to ignore RIM these days, especially with their CEO making comments like:

 

"We plan to refocus on the enterprise business and capitalise on our leading position in this segment,"

 

That doesn’t exactly give you the warm and fuzzy about the future of RIM consumer devices now does it?

 

That said, ignoring GamePlay would be a foolish thing to do.  Why?

 

Well first off, it’s free.  I like free.  As in, I really like free.

 

Second and perhaps most amazingly, it is cross platform.  You can target Mac OS, Windows, iOS 5.0 or higher devices, Android 2.3 or greater devices in addition to Blackberry Tablet OS 2.0 and Blackberry 10 devices ( when they arrive ).

 

Third, it’s IDE agnostic, except when required otherwise ( aka, compiling for iOS ).  I can work in my preferred Visual Studio environment.  You however have the choice between Visual Studio, XCode or Momentics IDE ( an Eclipse based IDE Rim inherited from QNX ).

 

Fourth, it’s open source and hosted on GitHub.

 

Here is a screen shot from a demo game in development:

 

 

I have to say, it looks impressive to me.

 

 

Oh, did I happen to mention it’s C++ based?  I think I just heard half of you cheer, while the other half swore! Winking smile

 

 

I do have to say, the folks at Marmalade probably aren’t pleased.  They both fill the same niche… but gameplay is free.  Now the question is, how good is it?

 

Feature-wise, here is what you can expect:

 

Current features in gameplay
  • Written completely in C++ and well documented using doxygen.
  • Solution and workspaces for Visual Studio 2010, XCode 3.2.1 and Momentics IDE’s.
  • Platform-Game abstraction layer separating all operating system code from game engine code.
  • Input system support for Mouse, Keyboard and Touch.
  • Full vector math library with classes for Vector2/3/4, Matrix, Quaternion, Ray, Plane. Also Frustum and BoundingBox/BoundingSphere classes for object culling.
  • Solid OpenGL 3.2+ (for Desktop) and OpenGL ES 2.0 (for Mobile) based rendering system with classes for RenderState, FrameBuffer, Mesh, Material, Effect, Pass and Techniques.
  • Easy-to-use and efficient Font and Sprite classes.
  • Scene-graph components such as Scene, Node, Light, Camera and Model.
  • Binary encoding tool for creating optimized bundles for loading TTF fonts and 3D game assets supporting both COLLADA and FBX formats.
  • Extensible animation system with classes for Animation, AnimationClip and Curve with built-in AnimationTarget’s on Transform and MaterialParameter’s classes.
  • Complete 3D audio system with additional support for compressed audio using OGG and supporting HDMI gaming.

 

New features in gameplay v1.2
  • Newplatforms now supporting:
    • BlackBerry Tablet OS 2.0 and BlackBerry 10 ready!
    • Apple iOS 5.1 for iPhone and iPad
    • Google Android 2.3+
    • Microsoft Windows 7
    • Apple MacOSX
  • New shader-based material system with built-in common shader library.
  • New declarative scene binding.
  • New declarative particle system.
  • Improved physics system with rigid body dynamics and constraints.
  • New character physics and ghost objects.
  • Improved animation system supporting animated skeletal character animation.
  • New declarative user interface system with support for declartive theming and ortho, and 3D form definition with built-in core control classes such as Button, Label, TextBox, Slider, CheckBox, RadioButton. Also includes Layout classes such as Absolute/Vertical and FlowLayout.
  • New cross-platform new game project wizard scripts.
  • New game developer guide.
  • New game samples and tutorials.

 

 

With the following coming soon:

 

The ‘next’ feature branch for v1.3, v1.4, v1.5
  • Optimizations and Performance improvements
  • Shadows
  • Terrain and Sky
  • Gamepad input for Wii, Xbox 360 and Bluetooth® HID controllers
  • Scoreloop Social integration
  • Editor

 

 

Editor hmm?  Wonder what that means?

 

 

I am going to download and play with the SDK, and if I get some time ( something I am chronically short of lately ) I may post a walk around and possibly a tutorial or two.  Has anyone out there been playing with this technology?  Any opinions?

 

 

If you are interested, check out the announcement blog post as well as the source on GitHub.  Oh and perhaps most impressive of all for an open source gaming product… there is actually documentation. The documentation is available here including this development guide[direct pdf link].

 

I have to say, congratulations to Sean Paul Taylor and Steve Grenier on this impressive release!

General , , , ,

blog comments powered by Disqus

Month List

Popular Comments

Phaser HTML5 Game Dev Library release version 2.3
Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


29. March 2015

 

The popular HTML5 library Phaser have just released 2.3.  It’s not a huge new functionality release, but it’s got some major architecture changes that will affect you greatly if you are a Phaser user.  First off, they went down a more modular approach leading to fewer god classes.  This is aPhaser 2.3.0 good thing™.  Then thanks to this redesign, they also made the Phaser build process different, allow you to disuse unneeded portions.

 

From the release notes:

 

Significant Updates

 

GAME OBJECTS AND COMPONENTS

All of the core Game Objects have received an important internal restructuring. We have moved all of the common functions to a new set of Component classes. They cover functionality such as 'Crop', 'Physics Body', 'InCamera' and more. You can find the source code to each component in the src/gameobjects/components folder of the repo.

All of the Game Object classes have been restructured to use the new component approach. This puts an end to the "God classes" structure we had before and removes literally hundreds of lines of duplicate code. It also allowed us to add features to Game Objects; for example Bitmap Text objects are now full-class citizens with regard to physics capabilities.

Although this was a big internal shift from an API point of view not much changed - you still access the same methods and properties in the same way as before. Phaser is just a lot leaner under the hood now.

It's worth mentioning that from a JavaScript perspective components are mixins applied to the core game objects when Phaser is instantiated. They are not added at run-time or are dynamic (they never get removed from an object once added for example). Please understand that this is by design.

You can create your own custom Phaser classes, with your own set of active components by copying any of the pre-existing Game Objects and modifying them.

 

CUSTOM BUILDS

As a result of the shift to components we went through the entire source base and optimised everything we could. Redundant paths were removed, debug flags removed and new stub classes and hooks were created. What this means is that it's now easier than ever to "disable" parts of Phaser and build your own custom version.

We have always included a couple of extra custom builds with Phaser. For example a build without P2 Physics included. But now you can strip out lots of additional features you may not require, saving hundreds of KB from your build file in the process. Don't use any Sound in your game? Then you can now exclude the entire sound system. Don't need Keyboard support? That can be stripped out too.

As a result of this work the minimum build size of Phaser is now just 83KB (minified and gzipped).

Please see this tutorial on how to create custom builds.

 

ARCADE PHYSICS

We've updated the core of Arcade Physics in a number of significant ways.

First we've dropped lots of internal private vars and moved to using non-cached local vars. Array lengths are no longer cached and we've implemented physicsType properties on Game Objects to speed-up the core World collideHandler. All of these small changes have lead to a nice improvement in speed as a result, and also allows us to now offer things like physics enabled BitmapText objects.

More importantly we're now using a spacial pre-sort for all Sprite vs. Group and Group vs. Group collisions. You can define the direction the sort will prioritize via the new sortDirection property. By default it is set to Phaser.Physics.Arcade.LEFT_RIGHT. For example if you are making a horizontally scrolling game, where the player starts on the left of the world and moves to the right, then this sort order will allow the physics system to quickly eliminate any objects to the right of the player bounds. This cuts down on the sheer volume of actual collision checks needing to be made. In a densely populated level it can improve the fps rate dramatically.

There are 3 other directions available (RIGHT_LEFT, TOP_BOTTOM and BOTTOM_TOP) and which one you need will depend on your game type. If you were making a vertically scrolling shoot-em-up then you'd pick BOTTOM_TOP so it sorts all objects above and can bail out quickly. There is also SORT_NONE if you would like to pre-sort the Groups yourself or disable this feature.

Another handy feature is that you can switch the sortDirection at run-time with no loss of performance. Just make sure you do it before running any collision checks. So if you had a large 8-way scrolling world you could set the sortDirection to match the direction the player was moving in and adjust it in real-time, getting the benefits as you go. My thanks to Aaron Lahman for inspiring this update.

 

PHASER.LOADER

The Phaser.Loader has been updated to support parallel downloads which is now enabled by default (you can toggle it via the Loader.enableParallel flag) as well as adding future extensibility points with a pack/file unified filelist and an inflight queue.

There are no known incompatibilities with the previous Loader. Be aware that with parallel downloading enabled the order of the Loader events may vary (as can be seen in the "Load Events" example).

The parallel file concurrency limit is available in Loader.maxParallelDownloads and is set to 4 by default. Under simulated slower network connections parallel loading was a good bit faster than sequential loading. Even under a direct localhost connection parallel loading was never slower, but benefited most when loading many small assets (large assets are more limited by bandwidth); both results are fairly expected.

The Loader now supports synchronization points. An asset marked as a synchronization point must be loaded (or fail to load) before any subsequent assets can be loaded. This is enabled by using the withSyncPoint and addSyncPoint methods. Packs ('packfile' files) and Scripts ('script' files) are treated as synchronization points by default. This allows parallel downloads in general while allowing synchronization of select resources if required (packs, and potentially other assets in the future, can load-around synchronization points if they are written to delay final 'loading').

Additional error handling / guards have been added, and the reported error message has been made more consistent. Invalid XML (when loading) no longer throws an exception but fails the particular file/asset that was being loaded.

Some public methods/properties have been marked as protected, but no (except in case of a should-have-been-private-method) public-facing interfaces have been removed. Some private methods have been renamed and/or removed.

A new XHR object is created for each relevant asset (as there must be a different XHR for each asset loaded in parallel). Online searches indicated that there was no relevant benefit of XHR (as a particular use-case) re-use; and time will be dominated with the resource fetch. With the new flight queue an XHR cache could be re-added, at the cost of some complexity.

The URL is always transformed through transformUrl, which can make adding some one-off special cases like #1355 easier to deal with.

This also incorporates the fast-cache path for Images tags that can greatly speed up the responsiveness of image loading.

Loader.resetLocked is a boolean that allows you to control what happens when the loader is reset, which happens automatically on a State change. If you set resetLocked to true it allows you to populate the loader queue in one State, then swap to another State without having the queue erased, and start the load going from there. After the load has completed you could then disable the lock again as needed.

Thanks to @pnstickne for vast majority of this update.

 

PIXI V2

We are now using our own custom build of Pixi v2. The Pixi project has moved all development resources over to Pixi v3, but it wasn't ready in time for the release of Phaser 2.3 so we've started applying our own fixes to the version of Pixi that Phaser uses.

As a result we have removed all files from the src/pixi folder that Phaser doesn't use, in order to make this distinction clearer. This includes EventTarget, so if you were relying on that in your game you'll need to add it back in to your local build.

We've also removed functions and properties from Pixi classes that Phaser doesn't require: such as the Interaction Manager, Stage.dirty, etc. This has helped us cut down the source code size and make the docs less confusing, as they no longer show properties for things that weren't even enabled.

We've rolled our own fixes into our version of Pixi, ensuring we keep it as bug-free as possible.


You can read the entire release notes here.

Programming, News ,

blog comments powered by Disqus

Month List

Popular Comments