Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Level Director in game zoom
Started by greg brady Nov 01 2016 02:31 PM

5 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

greg brady

[GLOBAL: userInfoPane.html]
greg brady
  • Contributor

  • 283 posts
  • Corona SDK

Hi,

 

Is there a way to zoom out when you run faster, and in when you run slower built into Level Director?

 

 

Thanks, Greg



[TOPIC: post.html]
#2

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

Hi Greg,

 

You can scale the whole level by using something like below, as level.view is a displayGroup.

myLevel.level.view:scale(2,2) -- scale all layers by xScale, yScale
or
myLevel.level.layers[1].view:scale(2,2) -- scale a single layer

I did a quick test and it seems to work, but when I used an example that is part of composer it didn't, so this will need some more investigation.



[TOPIC: post.html]
#3

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

I was being stupid, it does work with Composer but I was trying to scale in the 'Create' phase which doesn't work, providing you scale within the 'Show' phase/event then it works fine.

 

So for your example, you would apply a scaling factor to the level/layers based on your players speed, maybe by using a transition to make it smooth.



[TOPIC: post.html]
#4

greg brady

[GLOBAL: userInfoPane.html]
greg brady
  • Contributor

  • 283 posts
  • Corona SDK

myLevel.level.view:scale(2,2)

 

Does this work with Level Director , or do I have to port to LDX to make this work?

 

I can't tell you how much I appreciate Level Director, it really takes the pain out of level design!!!

 

btw, I purchased LDX, but need a serial to unlock the old version to work a LD file.  I tried my LDX serial in the old version but it doesn't work.  Can I get an unlock to the old one?

 

Thanks for the help, Greg



[TOPIC: post.html]
#5

retrofitProductions

[GLOBAL: userInfoPane.html]
retrofitProductions
  • Contributor

  • 321 posts
  • Corona SDK

Yes, this code should still work with the original Level Director, if not, let me know.

 

I'll contact you directly about the serial code.



[TOPIC: post.html]
#6

greg brady

[GLOBAL: userInfoPane.html]
greg brady
  • Contributor

  • 283 posts
  • Corona SDK

The scaling function works great for the view objects, but it doesn't seem to scale the physics bodies attached to the objects.  Is there a way to do this or to possibly implement a 'camera zoom' ?

 

Thanks, Greg




[topic_controls]
[/topic_controls]