Million Tile Engine Beta Release

 WHOA!!!   this is really great !!!

  Is this function release??

Thanks SegaBoy and codingcake!

Not yet, codingcake. There is still much work to do before it is ready for use. I suspect this is going to be the kind of functionality most useful on newer/stronger devices like the iPad2+ or the newest generation of iPod Touch given how demanding it is on the hardware. 

Hey Dyson - quick question. Are you still thinking about incorporating physics into MTE? The reason I ask is that I’m currently working on a top-down game with stealth mechanics and using Box-2D Raycast feature would make calculating line-of-sight a lot easier then what I’m currently trying.

Be interested if you had any opinion on what would be the best way to go - at the moment I’m just confusing myself with trig, Bresenham’s algorithm, etc… :slight_smile:

EDIT

And another question… 

I thought I had this implemented into MTE, but it must have been another tile engine. I’m trying to incorporate A* functionality and in order to do so I need to expose the grid as a 2D array, which I can then check the tile properties (isObstacle). I have tried to use GetMap(), but I can’t seem to locate this data structure?!? Does MTE expose this data structure in any way that I might be able to use?

Got it .world :slight_smile:

Whoa! Just whoa!

s2q.png

Physics integration is a work in progress at the moment. Here we see the player casting rays at his surroundings. Impacted tiles are tinted red.

Dyson, keep up your great work on this. It gets more impressive every week :slight_smile:

Looking good.

I have a quick question about the flipped and rotated tiles. It seems that if a tile is flipped AND rotated MTE isn’t sure what to do with it. Most of my tiles appear as they should, but a few of them are orientated incorrectly.

Have we done something wrong or is this a known problem?

Hey Dyson, loving what you are doing here :slight_smile: I have purchased the Million Tile Engine, but was wondering how I get the updated after purchase?

Thanks in advance.

Jerry

Hello Jerry,

I have Gumroad setup to send notification emails when a new update is available. The update email will contain the direct link to download the updated files from Gumroad. 

I hope you enjoy working with MTE! As you can see a lot is going on and a lot of new features are in the works.

A little line of sight demonstration. Integrating Physics into MTE is proving a lot less complicated than I thought.

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

Hi, I am not sure this is related to the topic here, let’s see

I am using a tile as a background as follows

[lua]

    for i=1, 500 do

        local img=display.newImageRect( backgroundGroup, “assets/images/menuTypeBackground.png”, 320, 2 )

        img:setReferencePoint(display.TopLeftReferencePoint)

        img.x=0

        img.y=i*2

    end

[/lua]

The problem is that it takes a lot of time to generate it.

May this Tile Engine help in achieving that more efficiently?

Thanks, and great work. Looks promising

@AlanPlantPot; Thanks for bringing that to my attention. It seems I left out a few of the flip/rotate commands. I’ll have a new update out to address the problem by the end of the day.

@igenapps; I don’t think so igenapps. Loading 500 individual images will take a certain length of time whether you do it or MTE does it for you. I think you should look at using an imageSheet. Instead of 500 image loads there would be only one, and your loop would merely be loading frames from the imageSheet instead of individual image files. This might speed things up for you.

MTE v0.821 - http://gum.co/staO

Fixes a problem with the detection of tiles which have been both flipped and rotated. Update emails have gone out to all current customers.

@dyson122

Thanks for your help, but I don’t really understand the difference. I thought when an image had been loaded once, it was kept in memory so reusing it should not require the time to load it again. What you suggest is something like:

[lua]

for i=1, 500 do

        local img=display.newImage( imageSheet, frameIndex )

        img:setReferencePoint(display.TopLeftReferencePoint)

        img.x=0

        img.y=i*2

end

[/lua]

I actually tried it and it seems to be a lot faster, but I would like to understand the reason.

Thanks!

I don’t know exactly what is causing the speed difference you’re seeing, but when you think about it, a frameIndex is a number while a filename is a string. In order to load a frame from an imageSheet, Corona need only process numbers, which is easy. In order to load a cached image Corona must compare the filename you gave it to the filename of the image, and comparing strings is much more expensive. There are probably other contributing reasons, but none come to mind. 

That makes sense.

Thanks dyson!

Hi, I just purchased this library. Is it possible to scroll around the map on touch and to do pinch zoom? I want to zoom in slighty on my map and be able to scroll around with my finger and zoom in / out

Just a quick question:

How long does it take MTE to load a large map initially?

  • C

I guess that would depend on the device and your definition of large. Of course the simulator will load a map in no time flat, but as a more realistic example, an iPhone4 will load a map containing 120,000 tiles in 2 seconds. The iPad2 takes 1 second. Unfortunately I don’t have any of the newer devices to test, but I would expect performance to be better or the same.

These load time measurements won’t mean much for long. MTE’s ancestor game had functionality allowing maps to load more or less instantly regardless of size and device performance. It is just a matter of copying the code over and adapting it to MTE.

Sure, you could easily accomplish all of that using a couple multitouch events and MTE’s moveCamera() and zoom() functions. I don’t have any pinch-to-zoom code examples on hand, but I talk about how to implement touch-based scrolling in this post: http://forums.coronalabs.com/topic/33119-million-tile-engine-beta-release/?p=176172