Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

SSK2: Parallax
Started by Develephant Aug 09 2017 10:57 AM

4 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

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,441 posts
  • Corona SDK

Hi Ed,

 

I have been using the SSK2 camera (among other things), which has been incredibly helpful. I noticed you listed Parallax as a possible future feature. Do you have any plans to offer that? I'm not super high-speedy on the graphics wrangling so I'm kind of in search of such a solution.

 

In any case thanks for putting together this great collection of tools. 

 

-dev

 

 



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,489 posts
  • Corona SDK

@dev,

 

I am still interested in implementing optional Parallax support into the camera(s) that SSK2 implements, but I keep stumbling on best implementation.

 

There are two well known ways (among many others) to implement parallax.

  • Infinite Layers
    • Each layer of parallax theoretically extends infinitely in the plane(s) of scrolling.  
    • These layers are populated with a large number of objects.
    • To give the impression of depth, the individual layers are scrolled at different rates based on fixed ratios and limits.
    • This variant is suitable for non-repeating worlds where the layers vary in an irregular pattern and do not generally repeat textures and content.
    • A sub-variant of this parallax implementation style can be implemented where content is added and removed JIT to maintain reasonable memory and CPU usage.
  • Wrapping Layers
    • This variant is similar to infinite, but the bounds of scrolling space are limited and content in the layers is wrapped dynamically when off-screen to give the impression of an infinity world when in fact it is simply the same textures repeating over and over.

 

I will probably implement basic hooks, controls, and events for both, but as you can see it is a big topic to simplify and express via an API, which is why this has been taking some time top get on my schedule.



[TOPIC: post.html]
#3

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,441 posts
  • Corona SDK

Hi,

 

Thanks for the reply. I could see how that could be a bit complicated. I guess I'm mostly interested in the Wrapping Layers style, which might be something I could handle with hooks and events.

 

Thanks again.

 

-dev



[TOPIC: post.html]
#4

santiagoluib3

[GLOBAL: userInfoPane.html]
santiagoluib3
  • Contributor

  • 181 posts
  • Corona SDK

@Develephant,

 

This might interest you. I've been using this library mostly for all my camera system (parallax included).

https://gist.github.com/GymbylCoding/8675733

 

Santi



[TOPIC: post.html]
#5

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,441 posts
  • Corona SDK

@santiagoluib3

 

Thank you for pointing that module out. I will certainly check it out.

 

Thanks again,

-dev




[topic_controls]
[/topic_controls]