It looks like you're new here. If you want to get involved, click one of these buttons!
bigMap=Bitmap.new(Texture.new("bigMap.jpg",true)) bigMap:setAnchorPoint(.5,.5) bigMap:setPosition(centerX,centerY) bigMap:setScale(.25) stage:addChild(bigMap) rotationAllowed=true --zoom: GTween.new(bigMap, 4, {scaleX = 1, scaleY = 1}, {delay = 0, ease = easing.linear, onComplete = function() print("zoom finished") rotationAllowed=false end}) --rotate: rotationTimer = Timer.new(10,0) rotationTimer:addEventListener(Event.TIMER, function() if rotationAllowed then bigMap:setRotation(bigMap:getRotation()+0.2) else rotationTimer:stop() end end) rotationTimer:start() |
Likes: SinisterSoft
Comments
The APK...
https://play.google.com/store/apps/details?id=com.sinistersoft.retrostar
Here is a video...
Basically you get something like Google Earth or similar.
You start with a point and take a screen grab, then you zoom out 2x, then you take another screen grab ando so on. To get to space should take under 20 images.
Then get each image cut to 256x256 or 512x512 depending on how accurate you want the image - it doesn't really matter if you use 256x256 if you zoom in quickly.
Make a sprite called 'world'. Have a variable called scaler, set it to 1. Then add all the images as children of the world sprite starting with the one in space. Set the anchor point to 0.5,0.5 for each of these. On each add just halve scaler and set the next sprite scale to that scale. Now all you need to do is scale 'world' and they will all scale in perfectly.
You can do other things like turn off/on the sprites as the scale changes for low-end devices.
Easy.
Likes: antix, Apollo14
https://deluxepixel.com
THX @SinisterSoft !
The effect is cool!
(i've attached project with pics)
Likes: SinisterSoft, antix, MoKaLux
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: Apollo14
https://deluxepixel.com