Game is not smooth

pokblueskypokbluesky Member Posts: 9
edited November -1 in Working with GS (Mac)
I am trying to make a game like space reider style. My background is 960x640 and it's moving endless. The background is never moving smooth. What happened? I've tried using either destroy&spawn or change attribute position Y of the background. Nothing works. Need help.

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    Try restarting your computer and give it another shot. May I ask, why are you using spawn/destroy on your background, and change position? Have you tried to set the background to scrollable, or are you going after a different function?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Yeah, if you want a background to just be there no matter where your hero is in the level so that it appears to move with you just put the background actor on its own layer and uncheck the scrollable box.
  • pokblueskypokbluesky Member Posts: 9
    This is the video. You can check it out.! If you take a look carefully. You will see that the background is not running smooth.

    Sorry for bad quality. I make it quick.. Sorry

    here the video
  • pokblueskypokbluesky Member Posts: 9
    First time I have this rule
    Move Direction 270 Speed 60

    rule self.position.Y < 240
    spawn actor self.position.x = 160, self.position.Y = self.position.Y + 480

    rule self.position.Y < -241
    destroy this actor

    After I read some people said "Spawn" is load memory, i change spawn&destroy to change attribute and have two images with these rule

    move direction 270, speed 60

    Rule
    Self.position.Y < -241
    change attribute self.position.Y = self.position.Y + 960

    it's still the same.. not smooth
  • pokblueskypokbluesky Member Posts: 9
    I also did that too .. Still not good ...

    I meant change velocity
  • pokblueskypokbluesky Member Posts: 9
    I want to send it to you too because this problem is sitting with me for a long time. But i need to talk to my co-worker first. I will let you know..
  • calvin9403calvin9403 Member Posts: 3,186
    tshirtbooth said:
    No problem. let me know. Im sure you know you can trust me :)

    cheers

    _________________________________________________________________________________

    NEED HELP WITH YOUR PROJECTS? NEED A QUICK FIX?
    Cut the Rope Style menu Template
    Menu System #2 Template
    Cover Flow and level unlock Template
    Missile Command Template
    Tiki Totem style template
    Labyrinth Template
    FREE YOUTUBE VIDEOS

    I am sure tshirt wouldn't stole your game
  • RacetotheMoonRacetotheMoon Member Posts: 323
    Have you tried the Interpolate command? That might be a better option for you.

    Or you can try 'Supersampling' the move.

    A lot of people are going to probably think it's rather strange, and it's a bit more costly to the cpu's processor than you'll want it to be, but it'll get you a smoother moving image.

    Rather that using the 'Move' command use the 'Change Attribute' command to change the Y position of the image.

    Every .01
    Change Self.Position.Y To: (Self.Position.Y - 1)

    Now here's the kicker. You're going to need a few of them to get it to the speed you want.. so be liberal. Also, if that's not smooth enough try fine-tuning the amount the image moves over time period given.

    It's a bit costly, but you'll get better results for your background image. At least until you blow out your frame rate because you have too many rules. ;)
  • pokblueskypokbluesky Member Posts: 9
    tshirtbooth
    I sent the game to you already, please check !

    Sorry for little late. I am busy here
  • pokblueskypokbluesky Member Posts: 9
    Akioakemi,

    I've tried your method but I could not understand well about Supersampling. I will try again tonight.
  • RacetotheMoonRacetotheMoon Member Posts: 323
    Did you understand the rule I put up?

    You just need to run that same process (ie. moving the image in very small increments) many times. So instead of having one rule to move your image as you do now, you're having up to 10 or 20 different rules firing off at the same time to move the image.

    Imagine it this way. Instead of one huge elephant pushing your image you now have twenty below carrying it.

    I'm not saying it's good on the processor, but you shouldn't get the jumping in the image that you're seeing now. You're going to have to keep an eye on your frame rate however.

    We actually did something similar to smooth out the accelerometer controls in Synth Racing, but that was a different game engine.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    you could constrain its linear velocity Y to whatever you want it to be.
Sign In or Register to comment.