In game pop up menu like, level passed.

VoidedSkyVoidedSky Member Posts: 1,095
edited November -1 in Working with GS (Mac)
Hi, I am making a game that will has a pop-up menu when you win, that has a pop-up that says continue. How do I do this? Do I need to spawn different actors on top of it? Thanks!
~CTM

Comments

  • synthesissynthesis Member Posts: 1,693
    No...do not spawn unless you have to and there is no other way.
    For my game over element...I have the gameOver graphic actor present off screen at all times with alpha defaulting to 0. Then when my gameOver attribute=1, I locate the actor to screen center and throw the alpha setting to 1. Voila.

    then all your in-game actors can operate inside a rule to only function if gameOver = 0.

    Then I spawn a "Main Menu" (or continue in your case) actor located a little below my GameOver actor and on press...I return to the main menu...then in the main menu...I set gameOver to 0 again and the process repeats.

    In this case...spawning is okay since all of the game has shut down when GameOver changed to 1. Therefore spawning at that point is the only thing the processor has to think to do.

    This same logic sequence can be applied to your scenario if you win the game. Just change the GameOver attribute to "GameWon".
  • JackBQuickJackBQuick Member Posts: 524
    Thanks, synthesis! I wanted to do something similar in my game as well.

    One question: if the gameOver actor (the 'popup') is initially off screen, why set the alpha to 0? Why not set it to 1 and not change it? If it's off screen, it can't be seen anyways, right?

    There's probably something I missed, I know.
  • synthesissynthesis Member Posts: 1,693
    This way you won't see a little blink while it locates itself to screen center.
    I always keep things invisible until I get all of the image prep elements ready.

    For example...
    I like to have my game play between a background and a foreground image. eg...car driving on road but under bridges and trees.

    Well...the overlay art gets in the way (during development) so I scale it really small in teh corner, set alpha to 0 then when the scene runs...I change its size, location, etc. before I turn it on...otherwise you get a "blink" and you see the image before it is processed. So to hide the processing effecdts...keep it invisible until the last moment.

    If your clever...you can put the alpha switch inside a timer loop and fade it in with incremental alpha stepping up to 1.

    If you are REALLY clever...try playing with scaling W/H on the fade too. It will look like it fades in and scale up from a center pixel....Or use a moveTo/accelerateTo and it will fly in from the side of the screen. Any method will add "Depth" to the game experience. They are simple little animation tricks to enhance the experience...without using a lot of processing (or logic rules).
  • ZillaZilla Member Posts: 157
    @synthesis
    WOW! That was some extra cool information and I hope that I am `really clever`... :)
  • JackBQuickJackBQuick Member Posts: 524
    @synthesis

    Cool! I really appreciate that you took the time to give such a detailed explanation. I'm definitely going to work a pop-up into my game.

    Thank you!
  • synthesissynthesis Member Posts: 1,693
    Look guys...its simple...
    If you are enjoying a game or watching a cool special effect on a TV commercial...
    Jot it down in a notebook...then think about it while you are taking a sh**.

    Then...while thinking about it...think of the simplest way you can recreate that effect in a logic sequence of rules....then put it in your game!

    TV commercial are a great source of examples...since they do a lot of graphic design animation. So are TV sports broadcasts and the cable news channels. Tons of cool graphics effects there to pull from...and not that difficult to re-create in GS.
  • LoadingZeroLoadingZero Member Posts: 75
    Hi, this post is old, but i try to ask an information.
    I do a similar thing but changin size of my gameover/nextlevel graphic actor from the center of the screen and it works good.
    I've to map some other actors that manage the button on the graphic (next level, retry, home, ecc). i must spawn actors and locate where they must be on my graphic or there is some other (better) way (maybe constrain actor to the graphic)?

    Thank's
  • RSCdevRSCdev Member Posts: 50
    How to constrain an actor to the graphic? are you speaking doing it by Rules?

    Thanks.
  • LoadingZeroLoadingZero Member Posts: 75
    i've never try, but yes it can be an idea. i'll try later.
    Now i spawn my actor giving the right position.
  • SingleSparqSingleSparq Member Posts: 1,339
    Place your actors separately(background, buttons) put them in position as you would want them and go to each instance to check their x,y position. Move them off the scene and Set in your rules where they should go (the x y info you just got) when a condition is met, add an otherwise change attribute to offscreen x or y position.
  • LoadingZeroLoadingZero Member Posts: 75
    thank's for reply, i'll continue with this tecnique.
Sign In or Register to comment.