Forum Time!

We’ve finally got a forum!

You can check it out at forum.playcraftlabs.com.

Not a lot else to say really, so here’s a picture of a kitten:

4626549119_6c524ace61

 

0.5.6 Released

Update: we’ve pushed a 0.5.6a release with some minor bug fixes (mostly related to the demo games).

Happy days! We’ve released 0.5.6.

Whilst we’ve been busy on 0.6, we came across a few too many issues to let things lie much longer, so 0.5.6 has been released. You can grab the new version from the downloads section.

The highlights: IE9+ support, Isometric and Hex tile maps (simple support for now), better touch support and device orientation.

Here’s a big list of things we’ve changed:

  • hex tile maps now supported using (pc.HexTileLayer)
  • spritesheets can now have frame relative draw offsets
  • all components now have an active flag which disables a component, without having to remove it (e.g. entity.getComponent(‘fade’).active = false)
  • new input type DEVICE_ORIENTATION added to input.js (thanks natchiketa)
  • yourgame sample project now demonstrates how to do multiple scenes and a simple menu system
  • yourgame sample project is more organized (moving towards it being a template)
  • a compatibility fix was added for IE9+ (property clones required init’s — still working on tracking down the issue)
  • fixed IE not wanting to load base64 encoded XML (i.e. levels in Scrollia)
  • fixed the timer function for non-animation frame browsers (IE)
  • components now use a static type naming, rather than dynamic this.Class.shortName to avoid inheritance typing issues
  • a new demo: customcomponent added to show a simple example of a mousehover (thanks Leandro)
  • MOUSE_LEFT_BUTTON and MOUSE_RIGHT_BUTTON are now MOUSE_BUTTON_LEFTUP, MOUSE_BUTTON_LEFT_DOWN etc (thanks Leandro)
  • fixed pc.SpriteSheet image option left out of the API call docs
  • you can now set the friction and linear damping of physics components at runtime (setFriction and setLinearDamping)
  • pc.Image.resize exposed in the API. setScale has some better docs on how to scale to a particular pixel size
  • fixed bug in entity.removeTag
  • fixes for scaling (thanks David)
  • fixed fade component not correctly looping infinitely (when loops:0 used)
  • when adding a scene you can now specify to not make it active – addScene(scene, false);
  • loader will now correctly call onLoaded callback if no resources are being loaded
  • fixed a bug in pc.Point.dirTo not returning correct angles in some cases

0.5.5 and Open Public Beta

We’ve been busy. The latest release, 0.5.5 is now live for download. It includes a bunch of bug fixes, as well as support for arbitrary polygons mixed into tile maps. This lets you create hills, slides and angled tiles. Lots of fun.

Here’s a full list of what’s in the update:

  • fixed scrollia demo level1.tmx not loading correct tileset path
  • pc.Poly shape class added to math.js
  • Slopes for tile maps – Tiled integration support arbitrary polygons (Scrollia has a demo of this)
  • physics.setLinearVelocity and setAngularVelocity now also wakes up the physics body
  • added device iPod and iOS detection (pc.device.isiPod and pc.device.isiOS)
  • sound is by default disabled on iOS devices (we’re working on methods to help with sound on mobile safari)
  • pc.Sprite and pc.SpriteSheet API docs were not linked in the API list
  • fixed a bug when loading resources that have mixed case resource names (thanks Jett)
  • fixed pc.systems.EntitySystem API docs (and added it to the API list)
  • fixed bug in togglePauseResume (thanks Jett)
  • fixed pc.DataResources not loading on some Firefox versions
  • scrollia demo is now organized into separate files/folders
  • fixed add/sub color bug in pc.Color (thanks Eemeli)

Here’s a quick video on how to integrate slopes:

The second big piece of news is we’re now in open, public beta. Feel free to invite fellow developers to jump in and give Playcraft a try.

We’d like to thank all of you awesome developers who have contributed so much during the private beta. Lots more to do, but we appreciate the help, encouragement, suggestions and bug fixes.

Now on to 0.6 (modules and multiplayer!)

 

Playcraft Engine 0.5.4

We’ve released the 0.5.4 update. Here’s the quick summary of what’s changed:

  • Spin effects added (pc.components.Spin)
  • Scale effects added (pc.components.Scale)
  • Input component actions bug fixes
  • Spatial and physics are now synced (in testing)
  • pc.Tools.arrayRemove fixed if multiples of the same element exist (thanks im007boy)

The Spin and Scale components are new additions you can use to create some cool effects. We’ve made a video showing how this works you can check out:

Check the new docs for details:

Playcraft Engine 0.5.3

We’ve released the 0.5.3 update. Here’s the quick summary of what’s changed:

  • onResize fixed
  • input components can now take an optional ‘target’ entity, where states and actions will be set/sent.
  • minor fixes to touch input handling
  • Scrollia demo updated to show how to implement touch controls
  • Polygon drawing component added – pc.components.Poly
  • Circle drawing component added – pc.components.Circle

And in more detail…

onResize
We found some issues with onResize (well, Andrew D. did), and it’s all been fixed up. Scenes, layers and the layout system will now properly pass down onResize events if the browser window changes size. The debug panels will also adjust themselves dynamically. If you want to catch resize to adjust your own manually placed entities/etc just override the onResize method of any scene, layer or system.

Input Targets
pc.components.Input now gets a funky new target option. Use this to specify where actions and states are sent when an input control is activated. The Scrollia demo shows off how this works. You can also check out a video we posted walking through this, as well as the basics of input handling.

Poly and Circle Components
We added two new drawing components: pc.components.Poly and pc.components.Circle. They do the incredibly obvious — draw circles and polygons. You can see examples in the input controls added to the Scrollia demo game.

The new version is available for download in the developer section.

Updates and What’s Next

Lots of activity on the beta recently as we once again expanded the number of developers. We’re working our way through the list, however if you have an immediate project, email us or message us through twitter or facebook to request a code.

We’re about to push 0.5.2, the major change being we’ve removed all the dependencies on jQuery. Originally we made life a little easier by relying on some nice jQuery tools, like extend for gamecore.class. This was a nice way to start, but we would prefer to have as few dependencies as possible.

Thankfully, nothing in the API has changed, though you might see some changes to the basic structure. In particular, gamecore.js:

  • gamecore.js is now the first file loaded
  • class.js is second, and sets up the class structure, then
  • base.js (a new file) sets up the gamecore.Base class (aka pc.Base)

These changes are automatically handled by the playcraft.js script loader.

There are no changes to the API. However, if you’re using jQuery and were relying on it being packaged, you’ll need to now include it yourself.

The nice side benefit is the minified code pack dropped by 100k!

One of the things that pushed us to remove jQuery was that it included DOM related code. The iOS acceleration framework (dubbed the “Accelerator”) implements the canvas API, but not most of the DOM, so jQuery was becoming a nuisance in that environment. We’ll post updates on the Accelerator soon.

Now that’s out of the way, we’ll be pushing for 0.5.3, which contains mostly updates to the effects system: things like pop, explode and spin effects. As well as demos on how to use layers and scenes to create menu transitions.

 

TechCrunch Disrupt SF & Demo Games Updates

It’s been a while since our last update – things have been busy! There are two major things that we would like to let you all know about that we have been working hard on and are excited to share.

First, we’re thrilled to announce that we will be a part of TechCrunch Disrupt SF Monday (September 10th), through Wednesday, September 12th! This is a huge opportunity for us as it is one of the most anticipated technology conferences of the year. You can catch me doing an interview at the conference here.

We will be showcasing the engine technology as well as three of our demo games at the conference. This gives us a great chance to get Playcraft known in the marketplace. The exposure will be invaluable to our success as a startup.

Playcraft is also very pleased with the progress of three of our demo games. The first of three demo games that our own Colin Pyle has been working on is Angry Cannons, which shows off physics and rendering features (it’s like Angry Birds but with guns), Plasteroids, a basic asteroids clone showcasing how to use code to rebuild an old classic and lastly Scrollia, a complex game showing off layered tiling, parallax backdrops, animation and combat physics – all the basics for a great side scrolling action/adventure game.

You can see videos showing off the demos on the new Playcraft Labs channel on YouTube.

We’re excited to update you after TC Disrupt SF with a bunch of new engine updates, and yes, we’ll be expanding the beta once again.

Array pooling

Buildnewgames.com was kind enough to feature another article of mine on garbage collection and object pooling.

Amidst a ton of great feedback, Kevin Gadd pointed out that using linked lists may not be as performant as a plain array for object pooling. Which is true (mostly).

I originally developed gamecore’s object pooling on the assumption that in a typical game you would want to know both entities that were free (available in the pool) as well as in use, aka the “used” pool. This made it essentially an entity management and pooling system combined. Combining these two things together into a single double-linked list had some performance advantages over an array, especially around handing an item back from the used pool to the free pool (it’s faster to remove an item from a linked list than an array).

There are however plenty of use-cases where you want to plugin object pooling and already have you’re own entity management (keeping track of whats in use in your game), so I went ahead and added an array based pool.

Since this is the best performant option, I made the array based pooling the default. If you want to keep the linked list version going, extend gamecore.DualPool, instead of gamecore.Pool.

Update are available in github.

 

Gamecore.js updates: pool tracing, class typing and more stats

We’ve released a pretty big update to gamecore.js today. The new features include pool tracing, stats, class typing and a bunch of other goodies. Here’s a quick run down.

Class Typing
Classes are now automatically populated with three type related components:

  • _types: a variable that contains an array of types of this class (essentially the extends history)
  • _fullTypeName: a string representation of the extends hierarchy
  • isA(string): a function you can call which will return true if the class is of a given type string.

So now you can do cool things like:

 

Pool Stats
Use pool stats to dump the number of free and used objects in pools.

This will dump stats for all currently created pools.

Pool stats are enabled by default (and have very little overhead).

Pool Tracing
Tracing is useful for tracking down where you’ve forgotten to release an object back into the pool. By turning on tracing for a pool, the system will track every acquire request with the source code file and line number. You can run your game with tracing on, and then dump the stats to see where acquire calls are being made in your code. The output is in the form of:

For example:

Tracing is SLOW, so only turn it on for the pools you’re debugging.

To enable tracing, grab the pool class you’re interested in and set tracing to true.

You can stop the tracing by calling:

And dump the traces (along with the pool stats) by calling getStats().

If you want to enable tracing at the start of your code, you may want to manually force a pool to be constructed, for example:

 

Hope you like the changes! You can grab the code on github.

If you’re building a game, consider using the playcraft engine! You can sign up for the beta now.

Update on the Beta

Well, it’s been a crazy few weeks. Playcraft Labs beta launch has stirred a lot of interest in the game engine; thousands of you have signed up! We’re very excited by the interest and want to thank each of you.

Since the launch, Playcraft Labs has been working hard on incorporating feedback, especially around porting the rest of the API over to the Entity Systems framework. Stay posted, because we’re almost done.

If you have signed up for the beta but have not yet received a key, we’ll get to you soon! We’ll be including a little present for your patience, so keep an eye out for the key.

To answer a few questions in the meantime:

Q: Is the game engine really free?
A: Yes. We’re game developers, so we know what game development is like. Our job is to give you tools and services to help you succeed making games — the kind of thing we could have used. We think we can only really succeed if we’re helping you succeed. The best way to do that is to get you started easily, quickly and cheaply.

Q: How do you make money?
A: We’ll be providing a range of services like ad and payment integration, multiplayer hosting and update streaming. We’ll win when you win.

Q: Where can I download the beta?
You can download the SDK from the developer site. This is available only to people who have been emailed a beta key. If you haven’t yet received a key, we apologize for the delay. We’re working on it!

Q: Are you component-based?
A: Yes and no. We use a newer kind of architecture called an Entity System. There are still components, but they are purely data. “Systems” take on the role of executing what a component means for an entity. The end result is the power of components without a lot of the issues, and for larger projects, or across multiple games, a lot more flexibility and reuse of code.

Q: Is the engine 3D?
A: Right now we’re focused on 2D, because that’s what you can practically deliver using HTML5 right now.

Q: Are you planning on doing 3D?
A: Yes, definitely.

Q: Are there any demo games I can see?
A: Playcraft has demo games in the beta, but none are public yet. We will let you know as soon as you can access them!

Got a game project that really needs to start soon? Drop us a line and tell us about it.