Jump to content

Are Collisions detected if an object is invisible?


Julz57
 Share

Recommended Posts

Very new to Phaser and reading as much as I can before committing to using it as my game development system.

My goal is to alternate views, a bit like VR, from one eye to the other. I have done this before by setting specific colours for backgrounds (x2) and Sprites (two colour versions). Person uses Red Green filters to limit view to each eye. In the past I have page flipped (RE screen drawn, then LE screen drawn) which I know is not needed in Phaser. I can just change background colour  for each screen refresh which will do the job.

But this introduces a potential new problem as I need to hide objects / sprites from each aye alternately as background colour changes. Am thinking I could alternate "visible" for sprites that I do not want seen in alternate cycles. Question is, will collisions be detected with an invisible object? Goal is to teach both eyes to work together but while playing a simple retro style game.

Another option would be to redraw sprites to be hidden in the background colour. I saw this as an option in in the examples but don't know how resource intensive this will be. Only four colours can be used in the design process. Two for backgrounds, two for sprites. Each eye only responds to two colours.

Does anyone know if this could work? A better workaround? Just thought about the depth positioning. I could place the ones to be hidden behind the background?

Can I set two layers, one drawn for RE and the other for LE and then just move one forward and back as required? Thinking this might be easier to code as sprites will be children of each layer? Again will collisions be detected?

Thanks

Link to comment
Share on other sites

Hi samid 737,

Yes a very simple game but for a specific goal as I need to control images presented to each eye. Colour filters before each eye facilitate the latter provided that the foreground and background colours are set correctly on alternate screen draws. It's part of vision therapy or eye exercises to improve vision. I have done this before but in a C+ game engine. My background is in optometry but now retired and doing volunteer work, aka this.

I was wondering if I should take the plunge and start to learn how to use Phaser and what you've told me says 'Yes'.

Thanks again,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...