In dire need of advice about lagging!

digitalzerodigitalzero Member, BASIC Posts: 639
edited April 2012 in Working with GS (Mac)
i really need some advice about how to get your game not to lag as much there are a couple of things that i have learned from tshirtbooth that i have learned as far as unchecking the movable button if the actor is not movable and unchecking visible if the actor is not visible but my game still tends to lag... now of course there are some things that are spawning from time to time but i check the actor to make it destroy when it hits a certain wall... can someone please give me further advice so that i can assure that my video game is at its highest quality. thanks so much :)

Answers

  • digitalzerodigitalzero Member, BASIC Posts: 639
    OMG its @tshirtbooth!!! YOU'RE LIKE THE MESSIAH OF GAMESALAD OF COURSE I WOULD SEND IT TO YOU!!!... but... how do i send it to you lol... sorry I'm a noob lol.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Right-click the project and click compress, then attach it and email it to tshirtbooth@gshelper.com
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Right click the gamefile, and select "compress" then take that newly created zipped file, and email it to the address he has in his post.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Or do what @SlickZero said :P

    Ace
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
  • digitalzerodigitalzero Member, BASIC Posts: 639
    THANKS SO MUCH YOU GUYS :) yay! I'm going to have @tshirtbooth check my file... man I'm so honored!!!! to me this is like having Tetsuya Nomura (character designer for final fantasy) go over my characters and decides that he wants to work on a game with me! GOSH I SOUND LIKE SUCH A GEEK lol! but DAMN IM HAPPY!!!
  • digitalzerodigitalzero Member, BASIC Posts: 639
    @tshirtbooth... YOURE NOT JUST A GUY... you're like golden sonic... or link after finding the triforce and beating ganondorf or cloud after using his super special move when he beat sepiroth YOU ARE THE REASON WHY I KNOW WHAT I KNOW NOW ABOUT GAMESALAD! YOU'RE SENSEI!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LOL... ok i just went a little overboard but you get the idea lol
  • digitalzerodigitalzero Member, BASIC Posts: 639
    i have looked at this tutorial times before but i just don't get it (the video on how to recycle bullets)... considering I'm a noob I'm trying to figure out which attributes i do not need or what rules would be null and void because i think that it is a lot easier than I'm thinking lol... i actually have tried to recycle the bullets in another one of my games but the bullets would only spawn like 20 times so i just ended up doing it the other way where it would be spawning an actor every time... i hate to keep on being a bother but i have no idea what i would need in order to do this considering its not bullets thats spawning... am i even looking at the right tutorial because this is making minimal sense to me
  • digitalzerodigitalzero Member, BASIC Posts: 639
    okay so I'm trying to get my mind to grasp this concept... i have no idea why its not registering with me but for some reason its not... here are the rules that i have set up

    every (random 1,5) seconds change velocity direction 180 with a speed of 320 relative to actor

    *rule* if any conditions are valid
    if actor overlaps or collides with actor of type: 1 banana, 2 bananas, or 3 bananas change attribute self.position.x to self.start x and another change attribute self.position.y to self.start y

    for some reason it keeps on spawning at the bottom of the screen...

    now this is a concept that i really need to grasp because i have another game where i need to use the recycle behavior and i feel like a lot of the games that i have will need to use the recycle behavior because i have tons of games in my mind where i can find this useful... @tshirtbooth it SORTA clicked when i was reading your last statement but I'm totally not grasping this for some reason and its frustrating. this is the final game that i have to complete in order to publish them all on the market (3 total). I'm trying to gain insight on how this works because now working with game salad my mind tends to think in code ALL THE TIME lol even when I'm walking to the store or especially when I'm playing a video game... but this is just one concept that I'm not fully understanding so if you can explain more thoroughly that would be awesome! again i apologize for continually asking but if i understand this concept fully i will be able to make whatever game i would like without the threat of there being lag.

    thanks @tshirtbooth!
  • OmenaboOmenabo Member Posts: 121
    edited April 2012
    @digitalzero Hmmm... Somethings firing up your change attribute -behavior. Do the actors collide all the time?

    Gamesalad isn't so good at spawning. So it's better to recycle. Basically, you just put your actors out of sight (outside of the limits of the visible area of the screen), until you need them. When you need them, you move them to the spot you need them in. After the actor is "destroyed", or useless, you just move the actor outside of the screen again. And repeat.

    This is troublesome when you have lots of actors that need to be spawn, but it does help on the lagging.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    What you're doing now is moving it to it's start position, you want to have it:

    If actor overlaps or collides with actor with tag (will come to the tag bit in a minute)

    Change attribute self.position.y to -(self.size.height/2)

    Couple of notes:
    Firstly, instead of bogging your rule down with listing the different collides, click the Home button in the creator, then click the Actors tab. In this window, you'll have a list of all your actors. On the left hand side, there'll be a grey panel with All written in it. At the bottom of that, click the plus button and type Banana as the name. Now click the All button just above the Banana one you just created and drag all of the actors that you want to collide in to the Banana one you just created. In your original rule, instead of having all of the different collide conditions, just have collide with actor with tag: Banana

    Secondly, when I put -(self.size.height/2) I am basically just moving it's y position to below the visible screen, so if your actor is 100 high, I'm moving it to -50 so it can't be seen. You can pick a different number here, just make sure that the position you are moving it to is off the screen.

    Ace
  • digitalzerodigitalzero Member, BASIC Posts: 639
    okay i think that i understand the whole tag thing but i think i kinda understood the whole tag method which i use from time to time but @mynameisace the whole recycling EVERYTHING is so confusing to me... i finally understood what how to spawn actors and found out where it was appropriate to use the spawn actor behavior but now i have to find out and attain information on a whole different method which is very frustrating... i just wish i knew how to do this from the beginning... but okay @mynameisace why am i messing with the size... i don't quite understand it GOSH IM SOUNDING ANNOYING BUT I DO NOT KNOW WHATS GOING ON AT ALL! i just wish someone would do a group of tutorials dedicated to this because i KNOW that I'm not the only one with lag issues... like i mentioned in the other discussion i do not have this problem in my other game because the background is not constantly moving... but yeah man I'm confused... so confused... PLEASE SOMEONE ANYONE MAKE TUTORIALS DEDICATED TO THIS BETTER THAN THE ONES THAT I HAVE SEEN!!!
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    You're not messing with the size... Self.size.height/2 is calculating how tall half of the actor is (because the position of the actor is measured from the centre) and moving the actor so it's off the screen and not visible.

    Ace
  • digitalzerodigitalzero Member, BASIC Posts: 639
    so then whats going on with the self attribute "start y" do i no longer need that... because thats the method that I'm trying to go through... and instead of the actor going back to its original position it just keeps on wrapping throughout the scene because my wrap x is checked cause of my scrolling background... its like the actor never "dies" or for this sake resets back to its position...
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Do you want to send your file over to me and I'll sort it out for you?

    hello@mynameisace.com

    Ace
  • digitalzerodigitalzero Member, BASIC Posts: 639
    omg please! and can you put some notes in there so i would know what to do for further references... because i have another runner type game where the background moves that i need to know how to do this concept! I'm sending the file over now!
  • digitalzerodigitalzero Member, BASIC Posts: 639
    sent!
Sign In or Register to comment.