|
Post by hockeyhacker5 on Nov 8, 2017 4:08:35 GMT
I just bought the wattageTileEngine. It looks very promising! I am wondering if there's a sample project available that demonstrates something similar to my needs. I want to display a board game map on about 3/4 of the screen. Since I need to zoom in, that's where the tiles come into play. I want to be able to move around the zoomed-in board to display the pieces (another layer), with a mini-map at the bottom showing the window location relative to the entire board. The remaining space will include control buttons, more pieces, and such. I had started with the MillionTileEngine but the developer appears to have abandoned it in early 2014. Thanks for any help!
|
|
|
Post by Admin on Jan 26, 2018 3:19:24 GMT
First, I apologize for this very late reply. Your post flew under my radar! This engine is still in use, and I am still supporting it and using it myself. You may have already found the answer to this yourself, but it sounds like the functionality you need is provided by the ViewControl class. In all of the examples given in the documentation, this control is configured to fill the entire screen, but it does not have to fill the screen. If you take a look at any example (which are all linked to in the "Examples" section here), you will see the following call to create the ViewControl: tileEngineViewControl = TileEngine.ViewControl.new({ parentGroup = sceneGroup, centerX = display.contentCenterX, centerY = display.contentCenterY, pixelWidth = display.actualContentWidth, pixelHeight = display.actualContentHeight, tileEngineInstance = tileEngine })
In the above code, pixelWidth and pixelHeight are set to the entire size of the screen. You can set this size to whatever you need it to be. It need not fill the screen. However, keep in mind that when not filling the entire screen, you will see tiles appear and disappear just outside of the configured size of the ViewControl. This is not an issue if you overlay some form of GUI to hide it, but if you don't want to do that, you have the option of using a container as outlined in the documentation here. Basically, this will crop those artifacts out, but this will result in a small performance hit. If you want to use a container, the instantiation of the ViewControl would more look like the following... tileEngineViewControl = TileEngine.ViewControl.new({ parentGroup = sceneGroup, centerX = display.contentCenterX, centerY = display.contentCenterY, pixelWidth = display.actualContentWidth, pixelHeight = display.actualContentHeight, tileEngineInstance = tileEngine, useContainer = true, })
|
|