Author Topic: Camera zooming function ?  (Read 1975 times)

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Camera zooming function ?
« on: October 13, 2015, 03:07:59 pm »
I was thinking if a system of that sort is do-able in the solarus engie, you know, a zooming function, mostly useful for cutscenes, puzzle enigma hint, etc

I found a script of this sort, but for the LOVE engine, if someone is interested of porting it to Solarus, here it is :
https://github.com/vrld/hump/blob/master/camera.lua

I'm not experienced enough with the engine to port it :(

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
Re: Camera zooming function ?
« Reply #1 on: October 15, 2015, 03:37:38 pm »
Can you give a link to a YouTube video of this Script being used in Love Engine? It helps developers know exactly what the code is doing.

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Camera zooming function ?
« Reply #2 on: October 15, 2015, 03:59:19 pm »
Can you give a link to a YouTube video of this Script being used in Love Engine? It helps developers know exactly what the code is doing.

There is no Youtube link about this script, but as the title says, the script allow zooming / change camera angle on the map by rescaling it, there is nothing much else, it's pretty much a basic function.

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
Re: Camera zooming function ?
« Reply #3 on: October 19, 2015, 04:32:34 pm »
To zoom in and out you? CTRL + Mouse wheel

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Camera zooming function ?
« Reply #4 on: October 19, 2015, 05:27:27 pm »
To zoom in and out you? CTRL + Mouse wheel

I already know about this, the script I presented in the OP is a script that allow zooming on the map in-game, not on the editor

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
Re: Camera zooming function ?
« Reply #5 on: October 19, 2015, 07:53:46 pm »
Ah, so you want the ability to zoom in on the map. Maybe a screen scroll with a twinkle would be easier?

map:get_ground(x, y, layer)

map:get_camera_position()

Those might help you out. I'd check the documentation.
http://www.solarus-games.org/doc/latest/lua_api_map.html#lua_api_map_get_camera_position

MetalZelda

  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Camera zooming function ?
« Reply #6 on: October 20, 2015, 12:33:57 am »
Ah, so you want the ability to zoom in on the map. Maybe a screen scroll with a twinkle would be easier?

map:get_ground(x, y, layer)

map:get_camera_position()

Those might help you out. I'd check the documentation.
http://www.solarus-games.org/doc/latest/lua_api_map.html#lua_api_map_get_camera_position

Hmmm, I already know these, but the zooming function is something a bit more technical since it's function is to rescale each graphical, physical and logical elements on the map by increacing / decreasing the field of view (width and height view)
I might try soon to write the zoom script
« Last Edit: October 20, 2015, 01:02:29 pm by Username »