An oddity regarding Pharalax

0 favourites
  • 9 posts
  • Hey!

    So I'm making this sidescrolling space shooter, and I have a very weird issue.

    See, I want to make the background scroll automatically. I'm having a hard making said background scroll and return to its original position as it is.

    But what REALLY makes me scratch my head is the fact that when I add Pharalax to the backgrounds, the bullet objects I added get lost somewhere. If I keep pressing the FIRE button, after like 6 seconds, the bullets will appear from behind the character outside the layout.

    It's really strange that this happens, as it was supposed to be a very simple event or two to get this working. For some reason these bullets get disoriented or something because I activated the Pharalax (any value other than 100,100 apparently). And the bullets and the background are not even in the same layer.

    Can anyone help me? This is truly bizarre. In the meantime I'll be checking out a past project in which I involved both bullets and Pharalax, but until now, I've done nothing different.

    Hope someone sheds a little light on this matter.

    Thanks in advance!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Are you sure you are not spawning your bullets on the background layer?

  • Dead certain. They're like 3 layers apart.

    The layout is designed to scroll vertically, so the character faces up by default.

    The problem seems to be that the bullets spawn WAY below the character when there's background with Pharalax involved.

    If I remove Pharalax, then the bullets spawn normally. Clearly the issue is the Pharalax option.

    EDIT:

    Here's something I just tried.

    I turned down Pharalax from 100,100 to 99,99, and now the bullets clearly spawn one "tile" below the character.

    -

    I now tried spawning it in another layer just for the heck of it, and the bullets now spawn with a 2 second delay.

    -

    Alright, noticed something. When I go to "Edit Z order", the bullet objects are like in a category of their own, while the rest of the objects appear in an entire different Z order list. Despite both the Bullets and most of the other objects SHARING the same layer.

    --

    Just gave up on having Pharalax on my sidescrolling shooter. Going to manually move the background graphics now.

  • Just post/attach your capx, there's so much that can be going on, it would be easier to check out.

    Also "Parallax". No "h", it might help you in case you decide to search for the specific keyword. ^^

  • Thanks for the correction.

    Ok, so just for the heck of it.

    I'm uploading the file.

    I labeled the Layer that's giving me hell as "Parallax broken". If you edit the Parallax properties, it'll screw up the characters' bullet spawning.

    For some reason the layer above it somehow now manages to ignore it, but the bottom layer is still giving me trouble. And I needed at least two parallax layers.

    Anyway, if you find anything interesting that may be conflicting with the projectiles (enemies' included) please tell me.

    I'll put this project on hold for a while. And thanks!

  • What are you trying to do by changing the parallax of the layer the player is on? Parallax is meant to be used to make scenery that is in front or on the back of the action move faster or slower to simulate perspective.

  • What are you trying to do by changing the parallax of the layer the player is on? Parallax is meant to be used to make scenery that is in front or on the back of the action move faster or slower to simulate perspective.

    I'm pretty sure the characters were on the MAIN layer (simply called "0"), while the parallax were assigned to the bottom layer (named Broken Parallax ).

    And I keep sending the characters and the bullets to the "0" layer, while on the other hand I keep sending the backgrounds to the very last layer, to remind the program that they're supposed to be separated.

    My intentions are to add in a floor later, and the space background is scrolling automatically, with reduced parallax.

    The problem is when I did this, the bullets spawned below the player proportionally to how much parallax I reduced.

    I keep checking the project, and "0" is still where the characters are standing, while Broken Parallax is where the Parallax should be added/reduced and it ruins the bullet spawning.

  • Then in the field where the layer is aksed, don't put 0 but "0" (with the quotes).

    The number alone just refers to the layer number 0, that is to say "broken parallax". Instead of 0 try a more relevant name like "Action" or something of the like and always remember that the name (string) is to be put between quotes.

  • So I managed to somehow side-step the issue I mentioned in the op.

    But now I find myself stuck, as I REALLY need the Parallax to not screw me over by not working.

    This time I added a layer named HUD, and put it at the top of the other layers.

    When the Parallax is set to 100,100, I can see the health indicators.

    Say I give them 99,99: Now the health indicators are several pixels below where I put them in the editor.

    By 95,95 the health indicator is on the bottom edge of the screen, and anything below 95,95 makes it disappear off thes screen from below when I run the project.

    I have no idea why this happens. If I give the HUD layer a property of 0,0 it should show up and stay there.

    I had this exact same problem a while back, but I got around it. There is no easy way of getting around this, I need my HUD layer to be completely static, and following the action.

    Please someone tell me what I'm doing wrong, or if it's a bug with the program.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)