TilemapKit: what’s next?

The TilemapKit port to C++/Cocos2d-x is mostly complete, with only some fringe features missing. I’m confident that by early November TilemapKit v1.0 will be released. Then what?

First things first

I’m currently porting the Objective-C (SpriteKit, Cocos2D-SpriteBuilder) model classes to use the C++ model classes instead. This should be a transparent change, besides having to add another linker flag (-lc++) and adding a couple more source files.

Even though the model code includes C++ code users will not have to change file extensions from .m to .mm and all the issues associated with that.

Next Stop: ECS

I will add an Entity Component System to TilemapKit.

Not the one in GameplayKit, mind you. It’s been criticised for not being a “true” ECS as it follows the classic Scott Bilas’ ECS model where each entity updates its components in the order they appear in the entity’s components list.

However the Adam Martin ECS is far more popular among professional game developers. Here, a component system updates all components of the same type in sequence. Entities aren’t “updated” per se, they are merely containers (or database rows) for components which in turn only contain data. The core logic that works on this data is implemented by the component system.

Here’s a comparison of ECS models as pseudo-code.

Although you can implement a Martin ECS with GameplayKit, for TilemapKit I need one that’s cross-platform and preferably in C++. The candidates are entityXanax and Artemis. Since entityX seems more popular than anax you may be interested what the differences are in anax’ ECS.

Personally I’m leaning towards anax since it seems to get more love (commits, issues) than entityX, while Artemis’ C++ port hasn’t been updated in 2 years and purposefully doesn’t use C++11. Regardless of which one I’ll choose I will add an ObjC interface.

Oh an if you have a personal preference please leave a comment and explain why you like (or prefer) one ECS library (or design) over another.

Then: An ECS Example Game

Next, I will implement an example game using TilemapKit and the ECS in such a way that there’s only very little engine-specific code. Everything about the game world comes from TilemapKit with dynamic processing performed by the ECS and only at the very end of a frame update the entity transform component is applied to a visual node.

Of course you’ll be able to place objects in Tiled and specify the kind of visualization they should have (sprite, multiple sprites, particles, label, etc) as well as a list of components and initial data.

Which kind of game? Most likely a platformer according to roadmap votes. The runner-up (turn-based strategy / combat) would be a nice second example with which I can test pathfinding integration (again: not using GameplayKit but rather recast & detour or similar).

Later: Entering The Third Dimension?

The platformer game on an orthogonal map viewed from the side would also provide a great use case for adding the 3rd dimension to TilemapKit. How?

By porting the renderer to SceneKit and Cocos2d-x’ 3D nodes and generating cuboids from tiles, basically extruding tiles into the 3rd dimension (vote for this here).

I’m not giving a guarantee just yet but I’m positively surprised by the number of votes in such a short time. It would also allow games built with TilemapKit to truly stand out, with proper 3D camera and lighting, even 3D physics and who knows, perhaps even voxel characters.

I’m personally excited about doing this, it just seems awesome to be able to make a 3D game out of 2D tools and not having to work with a full-blown game framework such as Unity, or a complex 3D modelling program such as Blender.

Kickstarting Us

Okay, enough talking, back to programming. I wish I could just set marketing on autopilot but alas, I have to do that (this thing right here) as well. You can of course help me with that by tweeting and sharing this post, or just about anything related to TilemapKit.

Also, would you consider supporting me (actually: us) via Patreon?
Leave a comment or send us an email …

Patreon would mainly be a voluntary thing for TilemapKit enthusiasts as a way of helping us spend more time on TilemapKit. It would also serve as an ongoing Kickstarter, and reduce the need of having to do contract work on the sides. Maybe there’ll be an angle in terms of rewards too, although I admit I haven’t given this any thought yet.

Also, if you know someone who’s working in one of those secret human cloning facilities … please get in touch with us asap!


Loading Facebook Comments ...

Leave a Reply

Your email address will not be published. Required fields are marked *