Camera zooming function ?

Started by MetalZelda, October 13, 2015, 03:07:59 PM

Previous topic - Next topic
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 :(

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.
Solarus Works on ReactOS Opensource Windows OS

https://www.reactos.org/forum/viewtopic.php?f=2&t=14759&p=120616#p120616

Quote from: zutokaza 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.

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.

To zoom in and out you? CTRL + Mouse wheel
Solarus Works on ReactOS Opensource Windows OS

https://www.reactos.org/forum/viewtopic.php?f=2&t=14759&p=120616#p120616

Quote from: zutokaza on October 19, 2015, 04:32:34 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

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
Solarus Works on ReactOS Opensource Windows OS

https://www.reactos.org/forum/viewtopic.php?f=2&t=14759&p=120616#p120616

October 20, 2015, 12:33:57 AM #6 Last Edit: October 20, 2015, 01:02:29 PM by Username
Quote from: zutokaza 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

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