Million Tile Engine Beta Release

Really impressive, congrats on what you’ve done so far!

I’m really tempted to make a large zelda style game with this now… 

Million Tile Engine v0.720 is now available! I’ve updated the information at the top of this thread! 

http://forums.coronalabs.com/topic/33119-million-tile-engine-beta-release/?p=171559

http://sbx.sk/A6c2

Changes and Updates:

https://docs.google.com/file/d/0B8zoywKO40aiV2o5Q3UzbHF5bWs/edit?usp=sharing

I’ve emailed the new files to current customers.

If from the current demo thats included, it shows you how to import a level from Tiled and handle moving around with the hero and handle collision, that that’s really all I would need.  I have read about the lime horror stories and just want to make sure this would work for me, since it’s not something you could really easily have a trial for.

I understand the paradox of needing to buy a product in order to know whether you need the product in order to decide whether to buy the product! I’ve tried to be as descriptive and informative as possible in my documentation and sample videos. In time more videos and examples will follow.

The current demo demonstrates map loading and RPG style movement, collision handling, and Tiled object detection. That is to say the example resembles 8-bit and 16-bit console RPG’s in which the hero is fixed to a grid. Zelda-type free movement and the per-pixel movement of platformers is supported, but I don’t yet have sample projects available to demonstrate them. 

Given the need, I think I will look into creating a platforming example in the two weeks following the release of the upcoming update. 

Speaking of the update, Scale-independent parallax is now where it needs to be. A lot has changed under the hood, so I’ll be taking the first few days of next week to test and debug the engine before releasing the new file.

It will take me a few weeks to get up to speed, so hopefully you will have that demo done just in time for me to purchase.  I’m looking forward to making my game, and it looks like this would definitely be the missing tool I need.

How does this run on Android?

This seems very cool and exactly what I was looking for.

… Oh… my… goodness…  *girl scream*.  

Million Tile Engine v0.721 is now available. This bugfix corrects a problem in goto() when layer 1 is a parallax layer.

http://gum.co/staO

I’ve emailed the new files to current customers.

I was wondering the same thing as cary, this seems to be exactly what I need but there is no mention on anything related to android. How is the performance on android systems and does it even support them?

Yes, most definitely, the Million Tile Engine will run on any device supported by Corona. After I saw your Android questions I tested it on both the Samsung Galaxy Tab 10.1 and the Amazon Kindle Fire (original non-HD). The Kindle had some strange “lag spike” issues, for lack of a better word. The Samsung Galaxy Tab 10.1 ran CastleDemo about as well as the iPhone 3GS. CastleDemo was designed to make use of the iPad2’s much greater performance, so it is not a best-case scenario for these devices. I will make a point of coding the new platformer/sidescroller sample project to run nice and smoothly on these older Android devices to better demonstrate engine performance.

If any current buyers have tried the engine on more modern Android devices I would love to hear your impressions!

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

Thanks, I will purchase it later today. I will be using a Galaxy S3 as the testing device and will let everyone know how it does :smiley:

I look forward to hearing how well the Galaxy S3 performs! That seems to be the poster child for Android superphones these days. Well, aside from the new S4 anyway. If I could afford to have multiple high-end phones the S3/4 would be one of them. As it is I’m looking into buying a newer tablet like the Nexus 7 or its successor when available. The Galaxy Tab 10.1 was a great tablet in 2011, but it has always lagged far behind the iPad in terms of general Corona performance.

What actually would be a nice idea for you dude, is to kinda polish the engine or interface up more ( if needed, I havnt bought it yet so im not sure :stuck_out_tongue: ) Then get a kickstarter project going for funding to get more testing devices.

Thanks for the advice, but MTE is a library, so it has no interface of it’s own :stuck_out_tongue:  As for testing devices, the bigger concern is keeping the engine running smoothly on low-end devices. Luckily Corona is pretty good about keeping the API’s MTE uses compatible across the various supported platforms. The more I build onto MTE, the more eager I am to actually use it to make games myself! When I finally get enough free time to start my own projects again I may try funding them through Indiegogo. Kickstarter always struck me as something for larger projects, like Android game consoles or Imperial Death Stars. 

A few updates and notes:

I’ve finished debugging the MTE update and the new file will go out to everyone tomorrow along with patch notes and updated documentation. Current buyers should keep an eye out for an email from the address: my username at hotmail.com. I know, two weeks became three, but it can be hard to judge just how long a new feature might take to implement. 

I’ve received a whole bunch of questions about MTE over the past few weeks! I’ll be updating the FAQ to answer the common ones.

Over the next three weeks I’ll be working on a platforming/sidescroller sample project.

I’ve uploaded a short video to demonstrate just what I mean by “Culling.” MTE’s zoom function will expose the border regions of the display grid if you zoom out far enough. Here you can see the rows/columns of tiles being deleted and added as the camera moves through the map. No matter how large the map is, the device only has to manage this small number of display objects.

http://www.youtube.com/watch?v=xfLuLROF6TY

I’ve been playing around with this and so far like what I’ve found, but can’t seem to get it to do something I think is simple. I want to scroll the viewport as a user moves their finger ( as well as use velocity scrolling ).

I’ve got the velocity, etc., but can’t seem to get the mte window to move correctly. It appears I can either call mte.goto() or mte.moveCameraTo(). 

moveCameraTo is throwing errors that honestly don’t make sense given my simply map so I’ve been focused on goto. It appears goto only moves by the size of my grid? Is that correct? So if I want to shift the viewport by 10 pixels and my grid is 32 I have to move by 32?

Should I be using moveCamera?

This is for a top down 2D strategy type game, not a scroller.

Any suggestions would be appreciated.

MTE’s movement functions move the map relative to the native size of the map. If your tiles are 32x32, you call goto() with a blockScale of 64x64, and you call moveCamera(2,0) the map will appear to move 4 pixels across the screen. I’d never thought of it from the perspective of moving the map with a finger swipe, but now that you mention it you would have to compensate for this difference.

I threw something together to see just what might be necessary to scroll a map via touch. This is just one way to go about doing it. You’re correct that moveCamera would be best in this situation. Anytime you need to move the camera or a sprite on a per-frame basis, moveCamera() and moveSprite() are the preferred functions. moveCameraTo() and moveSpriteTo() are meant for longer motions taking many frames, during which the movement can’t be modified. None of the movement functions will appear to do anything unless you call mte.update() in an enterFrame event.

local scaleFactor = blockScale / 32 --The ratio of the blockScale to the native size of your tiles local startX, startY, currentX, currentY local isDragging = false local drag = function(event) if event.phase == "began" then startX = event.x startY = event.y currentX = event.x currentY = event.y isDragging = true end if event.phase == "moved" then currentX = event.x currentY = event.y end if event.phase == "ended" or event.phase == "cancelled" then startX, startY = nil, nil currentX, currentY = nil, nil isDragging = false end end local gameLoop = function(event) if isDragging then mte.moveCamera((startX - currentX) / scaleFactor, (startY - currentY) / scaleFactor) startX = currentX startY = currentY end mte.update() end Runtime:addEventListener("touch", drag) Runtime:addEventListener("enterFrame", gameLoop)

And here’s the result, using the platformer test level because it was on hand. Sorry about the weird compression artifacts. The ground texture really seems to confuse Quicktime.

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

Speaking of the platformer/sidescroller sample project, it’s coming along nicely. When finished there will be three little test maps, each in a seperate storyboard scene, each demonstrating more complicated movement and collision detection then the last. The first map will feature collision detection against entire tiles- each tile is either completely solid or completely passable. That is just about finished and you can see it in the video below. The second map will add sloped ground to the mix. The third will demonstrate how to go about making freeform ground surfaces within a tile using tile properties. 

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

I’ve been making incremental improvements to the Million Tile Engine as well. The next update will bring greatly improved convert() performance. 

Thanks for the detailed response. I was just about to post that I figured out moveCamera was the way to go and got it working. I was missing the call to update on enterFrame.

Million Tile Engine v0.720 is now available! I’ve updated the information at the top of this thread! 

http://forums.coronalabs.com/topic/33119-million-tile-engine-beta-release/?p=171559

http://sbx.sk/A6c2

Changes and Updates:

https://docs.google.com/file/d/0B8zoywKO40aiV2o5Q3UzbHF5bWs/edit?usp=sharing

I’ve emailed the new files to current customers.

… Oh… my… goodness…  *girl scream*.  

Million Tile Engine v0.721 is now available. This bugfix corrects a problem in goto() when layer 1 is a parallax layer.

http://gum.co/staO

I’ve emailed the new files to current customers.