Spawning problem?

http_gamesaladhttp_gamesalad Member Posts: 1,340
edited April 2015 in Working with GS (PC)

I'm trying to spawn lines right on the outskirts of big white lines (like walls). The right, left, & bottom lines work but not the top one.. I'm not sure why. I'm trying to have a clear white path but have walls right on the side of them. I highlighted the problem I'm having in the red circlesImage and video hosting by TinyPic
I'm trying to achieve this
Image and video hosting by TinyPic

You see how the yellow light on top is still snug on the white line but doesn't interfere with the path of it?

Here is the coding in the yellow wall

Image and video hosting by TinyPic

Here is the coding in my spawner
Image and video hosting by TinyPic

«1

Comments

  • LovejoyLovejoy Member Posts: 2,078

    @http_gamesalad spawn the gap fill actor in back of layer. As long as your layering is correct it should work.

    Fortuna Infortuna Forti Una

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @lovejoy will that interfere with the actor I'm going to put to go through the white line? Once the main actor collides with any of those lines gameover

  • LovejoyLovejoy Member Posts: 2,078

    @http_gamesalad said:
    lovejoy will that interfere with the actor I'm going to put to go through the white line? Once the main actor collides with any of those lines gameover

    I don't see why it would. Like i said, as long as your layering is right it should be fine.

    Fortuna Infortuna Forti Una

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @Lovejoy that didn't solve the issue. The yellow lines interfere with the white path regardless if I tell them to spawn all the way at the back. I want the yellow lines to be like a wall that sits right on the outskirts of the white lines. Just like this. See how the lines contort themselves just to sit right on the outskirts of the main white line & doesn't interfere or protrude in the main white line? Image and video hosting by TinyPic

    Is this possible? I got the green lines to do this I'm just having an issue with the yellow lines. I wouldn't mind dropping the app file if that can help you. I really need to solve this issue thank you so much for the help so far :)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad -- it might be easier of you rethink how you are designing the pieces. If you make 6 game pieces, all the same size, you can accomplish what you want:

    ___  
    ___  
    
    
    |  |  
    
    
    |__  
    
    ___  
    |  
    
    ___  
      |  
    
    
    __|  
    

    The lines represent the outside (yellow) lines. If you make six square pieces with the lines as shown, you can build any path.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman I will get on that as soon as I get out of school! I understand the first (side to side) & second (up & down). I have no clue what the other 4 are. Would you mind explaining those to me?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    Here is an example.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @rthuman & @lovejoy what if I spawn multiple yellow lines 10px by 10px the width of the screen & tell it destroy when it collides with the white line? I set my rule up like that with my green lines & that worked great. I'm just wondering if I wanted to do that with my yellow lines could I use one spawner or would I have to make multiple spawners? & would that have a massive impact on the performance on the game? Even though i'll tell the yellow lines to destroy when its lower than -50 Y

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    or is it possible to destroy a part of an actor?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Bump..?

  • LovejoyLovejoy Member Posts: 2,078

    @http_gamesalad said:
    Bump..?

    Was the example @RThurman posted not what you needed?

    I can't quite grasp the whole concept since it just seems like a layering problem.

    But ff you are saying that what you did before worked with the green lines, then just do it again for the others. Just test it on a device to check if it impacts performance.

    Fortuna Infortuna Forti Una

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited May 2015

    @Lovejoy I did that & it is really laggy with all that spawning.

    It has nothing to do with layering. Imagine it like a sidewalk with brick walls on each side. The white line is the side walk & the yellow & green lines are the brick walls. But the brick walls cannot interfere with the side walk. Do you understand now?

  • SummationSummation Member, PRO Posts: 476
    edited May 2015

    @http_gamesalad said:
    Lovejoy I did that & it is really laggy with all that spawning.

    It has nothing to do with layering. Imagine it like a sidewalk with brick walls on each side. The white line is the side walk & the yellow & green lines are the brick walls. But the brick walls cannot interfere with the side walk. Do you understand now?

    I don't see this as a layering problem.
    To me it's like spawning different colored health bars that either expand or subtract themselves to fit the outline of the white actors.
    So then you'd just need to add a rule that says when your main guy collides with a "health bar" then it's game over.
    Obviously you can name them something more appropriate, like "boundaries."

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad -- did you try the demo I made? You should study it -- it will help you see a way to accomplish what you want. Try looking at the second scene.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman YUP :)! I took a look at it & I completely changed my spawning system to what you have & I've slowed down the spawning rate (which I've seen significantly helps with the lag). The only problem I have now is still with the yellow line still.. I've been trying to figure this out for a day or 2 now.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman I've made the green lines 10 px by 10 px its smaller & easier to spawn & won't take up space. ALSO I've told the actors to destroy after it passes the red square to help with efficiency. BUT again the yellow lines are still a problem for me. It still interferes with the path. Image and video hosting by TinyPic

    Here is rule I have set up in the yellow wall
    Image and video hosting by TinyPic

    Here is the rule that I have set up in the actor that connects the white lines that goes across (horizontal)
    Image and video hosting by TinyPic

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    Just incase if anyone is confused I have 2 different actors making the connections to the first one spawns straight down (blue) & another actor that spawns across to fill the gap (pink). Hopefully this helps you help me solve this problem. Thank you :) Image and video hosting by TinyPic

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @Summation said:
    To me it's like spawning different colored health bars that either expand or subtract themselves to fit the outline of the white actors.

    YES. That is exactly what I'm trying to achieve. It just won't work properly with the yellow line. It interferes with the white path. I have absolutely no clue how to fix this issue. I've tried everything. I've been only coding for about a 1 & 3 months. So I came to the gamesalad geniuses on here to see if they can help me.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad said:
    RThurman YUP :)! I took a look at it & I completely changed my spawning system to what you have & I've slowed down the spawning rate (which I've seen significantly helps with the lag). The only problem I have now is still with the yellow line still.. I've been trying to figure this out for a day or 2 now.

    and

    @http_gamesalad said:
    Just incase if anyone is confused I have 2 different actors making the connections to the first one spawns straight down (blue) & another actor that spawns across to fill the gap (pink).

    That is definitely not what I demo'ed. You should study what I gave you. It will show you the way!

    Sorry to be a jerk about this -- I don't mean to be. But combining two different ideas, about half-way, just will not work. Study the method I showed, and then commit to it. It will work!

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited May 2015

    @RThurman Okay, I've been copying what you have in the demo.. so far everything is well! But do you have a method on how I'm supposed to connect the horizontal line to the vertical line?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    Study the demo!
    Look at the second scene and study how it was created.
    (Notice that it shows a way to place the pieces so that vertical lines connect to horizontal lines correctly.)

  • SummationSummation Member, PRO Posts: 476

    @RThurman said:
    Study the demo!
    Look at the second scene and study how it was created.
    (Notice that it shows a way to place the pieces so that vertical lines connect to horizontal lines correctly.)

    o:)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Summation -- your graphic reminds me of this important lesson:
    http://ed.ted.com/on/KwEb5IAJ

  • http_gamesaladhttp_gamesalad Member Posts: 1,340
    edited May 2015

    @RThurman I've been working on modeling this to the way I've explained.. It's working fine & the spawning is going great BUT I'm having a problem connecting the horizontal (orange) & the vertical (white) to make a continuous line. I've looked at scene 1, to see how everything connects together & I think I have the idea of the set up.. but this is giving me a problem. Thanks for the help so far :). PS the blue box just displays my random X

    Image and video hosting by TinyPic

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad said:
    RThurman I've been working on modeling this to the way I've explained..

    I realize you have been working on it the way you have explained. But you might consider working on the way I have demonstrated. After all my demonstration works and yours does not. (Sorry, I am not trying to be a stinker. But think about it -- you are asking how to do it because your way does not work. Yet you can't seem to stop doing it your way -- even though it does not work.)

    It's working fine & the spawning is going great BUT I'm having a problem connecting the horizontal (orange) & the vertical (white) to make a continuous line.

    Then I would say that its not "going great" at all. It's not working. But the demonstration I supplied works just fine. You should study it. Scene 2 will show you how to get everything to line up so that horizontal lines meet vertical lines correctly.

    I've looked at scene 1, to see how everything connects together & I think I have the idea of the set up.. but this is giving me a problem.

    Study scene 2! The picture you supplied clearly shows that you don't, "see how everything connects together," and that you don't yet have "the idea of the set up". But keep working on it. I hope you have the "a-hah" experience soon!

    Thanks for the help so far :).

    No problem! But the sooner you get the idea, the sooner you can move on to other discoveries.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman, I have followed what you've said & your project file. Isn't the way of lining everything up using spawners that appear just above the scene & go down (270)? .. The game I'm making is in gamesalad portrait mode if that makes a difference.. I haven't set it up like my old project... but I do have to spawn all these actors to line up properly. There is where I'm having the problem with the lining up & correct spawning times. I'm asking how I can cover up the gaps, so it looks like a continuous line like my old project did. Scene 1 was basically a drag & drop of actors... it didn't spawn or move anywhere.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @http_gamesalad said:
    RThurman, I have followed what you've said & your project file. Isn't the way of lining everything up using spawners that appear just above the scene & go down (270)? .. The game I'm making is in gamesalad portrait mode if that makes a difference..

    The principle of how to do this is not contingent on any orientation, mode, or scene size. Its the same principle no matter what.

    I haven't set it up like my old project... but I do have to spawn all these actors to line up properly. There is where I'm having the problem with the lining up & correct spawning times. I'm asking how I can cover up the gaps, so it looks like a continuous line like my old project did.

    I know! Thats why I keep telling you to look at scene 2. There you will see a continuous white path with yellow lines bordering it. There are no (and I mean absolutely no) gaps, discontinuities, crossed lines or anything like you are currently experiencing. If you will study out how the actors are laid-out and why certain actors are placed where they are, you will discover the principle that currently escapes you.

    When you discover the principle, you will likely say, "but thats so simple!" "I already know that". (To which I will likely answer, "yes that may be true, but you are not doing that way." "Why?")

    Scene 1 was basically a drag & drop of actors... it didn't spawn or move anywhere.

    A few questions:

    1) Why do you consistently refer to scene 1 and I consistently refer to scene 2?
    2) Do you really need a demo of how to spawn actors? Don't you already know how to do that?
    3) Isn't your basic question about the placement of actors so they line up correctly, with no gaps, and no crossed yellow lines?

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @RThurman I'm having an issue with my spawning .. I've tried to change the position from 1200 to 1400 for the upper right & horizontal .. but I'm having no luck what so ever .. Please bare with me.. I'm trying to solve this on my own as much as possible.. but nothing is working. Thanks so far for the help you've proved me :)

    Image and video hosting by TinyPic

    Image and video hosting by TinyPic

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    for the horizontal I tried to set up something like this spawn horizontal position Random X+200 (because my actor is 200 px), Y 1400.. & for my upper right I did Random X, Y 1400 .. but no luck

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    I am glad to see that you are using the pieces as outlined in the demo. But it seems that you have changed them so that they are 200px square?
    (Thats, OK I'm just trying get a feel for the scale of things.)

    Is the wall actor being used to supply the two sides on each of the"pipe" actors? (That is, each section of the pipe spawns its own walls?)

    Here are some questions to help you organize some principles of "pipe" placement:

    1) What pipe pieces can be placed to the right of a horizontal pipe? Which cant?

    2) What pipe pieces can be placed at the bottom of a vertical piece?" Which cant?

    3) Can an "upper right" and and an "upper left" piece ever be placed next to each other? if yes, when?

    4)To make a long horizontal run, do you:
    A. Stretch the horizontal piece to the length you want
    B. Place several horizontal pieces next to each other until it reaches the proper length
    C. Rotate the vertical piece and then stretch it
    D. All the above
    E. None of the above.

    Answering these questions will help you get that "a-hah."

Sign In or Register to comment.