Million Tile Engine Beta Release

One impetus for the engine rewrite I’ve been working on is that people have wanted the option of using Corona’s native transitions and translations for moving sprites around. One reason people want this is because the native functions are faster than MTE’s movement functions. I did not think this would be the case, but I quickly saw that it is. While you could use transitions in MTE 0v956, design decisions in the culling system made it a tricky prospect. The next release, coming in January, has a totally redesigned culling system and other changes to make Corona transitions the default, recommended way to move sprites. 

Here is an example of the performance disparity. The first segment of the video shows MTE 0v956 moving 200 sprites around using mte.moveSpriteTo(). The second segment shows MTE 0v980, again there are 200 robots, but they’re moving by Corona native transitions. The third segment shows MTE 0v980 again, but this time there are 400 robots. The FPS is displayed in the top left corner; the first segment averages about 27 fps, the second segment achieves double that at about 55 fps, and the third segment hums along at 34 fps even though there are twice as many robots as the first.

[media]http://www.youtube.com/watch?v=LItGIWTt55k[/media]

The new engine rewrite also fully supports graphics 2.0. Corona’s new API for deforming display objects allows for some interesting new effects. In this example a heightMap (a table of values- not an image) is applied to a layer. Both the contents of the layer and the contents of the heightMap are generated by MTE’s new Perlin Noise function.

[media]http://www.youtube.com/watch?v=Oi6NFqxMwds[/media]

All examples are running an a Samsung Galaxy Tab 10.1, powered by the old Tegra 2.

MTE 0v957 - https://gum.co/staO
 
Million Tile Engine 0v957 is an incremental upgrade to 0v956.

-Fixed a bug causing isometric maps with an odd number of columns and rows to display with the middle row missing.

-Optimized the code responsible for moving and updating sprites; performance is improved by up to 40% when large numbers of non-physics sprites (100+) are active on an orthographic map.

The engine rewrite is still in progress and still on track for completion in January. All MTE customers will receive the new engine rewrite as an update, at no additional cost.

Happy Holidays!

I figure a status update is probably in order! I have been quiet over the past two weeks only because I have had nothing specific to report or show off, but I have indeed been hard at work on the rewrite.

The new culling algorithm is finally coming together, and quiet nicely too. The new algorithm responds immediately to changes in scale and rotation as applied to the masterGroup; you can change the xScale and yScale and rotation on a frame by frame basis and let the engine cull and render new tiles as necessary to fill the screen.

The library will now support multiple instances of MTE’s engine. For example you could create mte1instance and mte2instance( or 3 or 4 or 5, limited by memory and performance, named whatever you like), load different maps into each of them, move each instance’s camera independently of the others, and so on. 

Hi Dyson - can you refresh my memory re adhoc images with MTE.  What I’d really like is for Tiled to support adding adhoc images (not tiles) to the image layer, position them where you want/scale etc, and then for MTE to pick up the details and place these.  Not sure that Tiled is up to this yet however.  I see there’s a “Level Director” product but it’s on windows, which looks like it might be basically Tiled with added features for image placement too…wondering if you’ve looked into this?

Last time I looked at LD it was basically just a raw level formatting tool. There was very little resembling a tile engine and it had no ability to load/unload contents from memory, meaning the size of levels you can build is limited by device power and memory. Cool if you want WYSIWYG level construction, but nothing approaching Tiled for structure.

oh ok - so ultimately would be good if Tiled could just get upgraded to best support image flexible adhoc image placement 

Tiled has some rudimentary support for precisely positioning images, but it could be better.

Tiled allows per-pixel placement of tiles on a map’s Object Layer. You can add a levelWidth and levelHeight property to the object in Tiled to override its display size in MTE. You could load the images you want as individual “tilesets”, each containing a single tile, to be placed in this manner. This is a sort of roundabout way of doing things though, and MTE 0v956 does not cull Tiled Objects (though this will be available in the rewrite).

How is everyone’s experiences of MTE with graphics 2.0?  

We use MTE in the game we are currently developing, and since switching to graphics2.0 we’ve noticed that the frame rate has dropped dramatically (approx 1/2 of what it was before).

I’m not saying that MTE is necessarily the cause but I wondered Dyson122, whether you have found any need to optimise for g2.0 in your own tests?

Hell Alan,

My tests in CastleDemo 0v956 show no performance difference between g1.0 and g2.0. What MTE features are you using and what device are you testing on? I would also double check the config.lua’s fps parameter, just in case.

I hope everyone enjoyed their holiday! Mine was short and hectic, as it always is! 

I’m feeling quite confident in a late January release of the engine rewrite. Progress has been steady and quick, if not swift. I’m wrapping up work on the physics implementation over the next few days and moving on to re-enable Isometric support. From there I’ll add in a few of the nifty new features I’ve teased, and get everything ready for release. 

The new release will have an arbitrary version number below 1.0 until I’m confident we’ve hammered out the bugs, but it will essentially be the release candidate. No new features will be added after that point is reached and I will be diverting all my attention to coming up with some nicely written, thorough tutorials. 

Rewrite news aside, I do have a minor update to the current code for all of you:

MTE 0v958 - https://gum.co/staO

This minor update fixes a bug in the sprite sorting algorithm and adds an optional onComplete parameter to the function moveCameraTo(). You can try out the new functionality by opening the Lighting 0v958 sample and uncommenting the code block at line 201 in main.lua.

[media]http://www.youtube.com/watch?v=MuMKrG7T1jY[/media]

 

Thanks for the update.

Looking forward to your new rewrite.

Happy 2014. 

One impetus for the engine rewrite I’ve been working on is that people have wanted the option of using Corona’s native transitions and translations for moving sprites around. One reason people want this is because the native functions are faster than MTE’s movement functions. I did not think this would be the case, but I quickly saw that it is. While you could use transitions in MTE 0v956, design decisions in the culling system made it a tricky prospect. The next release, coming in January, has a totally redesigned culling system and other changes to make Corona transitions the default, recommended way to move sprites. 

Here is an example of the performance disparity. The first segment of the video shows MTE 0v956 moving 200 sprites around using mte.moveSpriteTo(). The second segment shows MTE 0v980, again there are 200 robots, but they’re moving by Corona native transitions. The third segment shows MTE 0v980 again, but this time there are 400 robots. The FPS is displayed in the top left corner; the first segment averages about 27 fps, the second segment achieves double that at about 55 fps, and the third segment hums along at 34 fps even though there are twice as many robots as the first.

[media]http://www.youtube.com/watch?v=LItGIWTt55k[/media]

The new engine rewrite also fully supports graphics 2.0. Corona’s new API for deforming display objects allows for some interesting new effects. In this example a heightMap (a table of values- not an image) is applied to a layer. Both the contents of the layer and the contents of the heightMap are generated by MTE’s new Perlin Noise function.

[media]http://www.youtube.com/watch?v=Oi6NFqxMwds[/media]

All examples are running an a Samsung Galaxy Tab 10.1, powered by the old Tegra 2.

Hi,

I just purchased MTE a few days ago, and today I was reading the documentation and I see in the FAQ that “MTE does not mesh with Box2D or other black box physics systems. Integrated physics functionality may come in a later release, but not anytime soon.”  I’ve seen samples where physics has been implemented with MTE, so I’m not sure I understand the limitation mentioned in the FAQ. Could you please expand a bit more?

Thanks in advance

Hector

The FAQ is outdated - MTE has been working well with Box2D for quite some time…

Apologies, some of the documentation is pretty badly outdated. The most up-to-date elements are the API and the Reserved Properties lists. The whole of the documentation will be overhauled after the rewrite is complete, towards the 1.0 release.

MTE does indeed support physics and has for some time, as SegaBoy stated. The Platformer - Angled PHYSICS 0v958 sample project makes extensive use of Corona’s Box2D physics implementation.

Great, thanks very much I’m getting started with MTE and it looks fantastic

Regards

Hector

MTE 0v957 - https://gum.co/staO
 
Million Tile Engine 0v957 is an incremental upgrade to 0v956.

-Fixed a bug causing isometric maps with an odd number of columns and rows to display with the middle row missing.

-Optimized the code responsible for moving and updating sprites; performance is improved by up to 40% when large numbers of non-physics sprites (100+) are active on an orthographic map.

The engine rewrite is still in progress and still on track for completion in January. All MTE customers will receive the new engine rewrite as an update, at no additional cost.

Happy Holidays!

Hi, can I pay you using PayPal?

Thank you in advance!

Of course, egruttner. What I do in these situations is send a paypal invoice for the cost of MTE. When the invoice is paid I generate a 100% sale code to use on the Gumroad sales page. Using the code will reduce the price on Gumroad to $0 and prevent Gumroad from asking for payment information. The reason I do it this way is to make sure all my customers are represented in the Gumroad customer database, so that I can easily send updates out to all of them. If this will work for you please send me your paypal-registered email address in a personal message and we can get started.

I have good news and bad news. The good news is that it is the end of January and the MTE rewrite is nearly complete! The bad news is that it is the end of January and the MTE rewrite is nearly complete. Trying to predict the challenges of programming something this complicated is tricky. I’m pleased that I was not far off, however not far off is still off. What went wrong? Nothing went wrong, really, but some unexpected difficulties reared their ugly heads when I moved into rewriting Isometric support. Orthographic maps match the coordinate system provided by the Corona SDK, however for Isometric maps MTE must work in an arbitrary, imaginary coordinate system managed internally by the engine. Whenever you have multiple viewports not all of which conform to “reality” you introduce the potential for real mind-boggling and difficult-to-debug display problems. 

As of today I’m pretty sure those are behind me. I’ve said that before, of course, and that is why I choose to qualify the statement. My plan as of today is to get something out to all of you in two weeks. That gives me a week to finish up some of the things that fell by the wayside during my battle with Isometry, such as perlin noise and heightmaps. The second of the two weeks will be for updating and fleshing out the documentation. 

Will that be version 1.0? Yes and no. It will be the feature-complete engine. However I’m going to wait a little while after releasing the update for bug reports to come in. I’d hate to move MTE out of Beta while there are still bugs lurking. More documentation and examples will also filter out during that time. 

I apologize for these delays. I know some of you have apps waiting on the rewrite optimizations or the 1.0 release, and I am committed to getting these things out to you in a timely manner.