Game Maker's Garage Forum

Game Creation => GameMaker => Topic started by: Zoo on March 12, 2011, 08:33:46 PM

Title: Sprite animation
Post by: Zoo on March 12, 2011, 08:33:46 PM
Using spritepath, I've made some basic animations. I must say I'm impressed. It runs so well, I want to make an animated cartoon.
Title: Re: Sprite animation
Post by: Gan on March 12, 2011, 09:01:40 PM
I wish Sc had that command...
Title: Re: Sprite animation
Post by: Connors on March 12, 2011, 11:16:34 PM
[notveryhelpfulpost]
Heeeey I read something about TNT having "MOAN" commands that move things that way. Haven't looked at it yet though. BUT I'd have an excuse to if I used it to make smooth movement's for characters! Thanks for reminding me, I'll get to that tomorrow. My game should look a lot better.
[/notveryhelpfulpost]
Title: Re: Sprite animation
Post by: Zoo on March 13, 2011, 05:03:21 PM
Anyone know how to make two sprites go at once?
Title: Re: Sprite animation
Post by: Zoo on March 23, 2011, 06:25:30 PM
On the topic of SPRITEPATH, is the speed slower as the number goes up? I can't seem to get a sprite to move across the entire screen without it being super fast.
Title: Re: Sprite animation
Post by: Al Staffieri on March 24, 2011, 04:53:57 AM
Quote
On the topic of SPRITEPATH, is the speed slower as the number goes up? I can't seem to get a sprite to move across the entire screen without it being super fast.

higher number is slower. The number is actually how many times the sprite is drawn on it's way to the location.
Title: Re: Sprite animation
Post by: Zoo on March 24, 2011, 10:28:03 AM
That works, for a short distance. I can't get a sprite to move slowly across the whole screen.
Title: Re: Sprite animation
Post by: Zoo on March 24, 2011, 05:23:02 PM
If a spritepath is going, and there's a mousedown command after it, the mousedown doesn't work until after the sprite is done moving. I need the sprite to go away when clicked and add points. I'm making a game like GM shooter.
Title: Re: Sprite animation
Post by: GMG Kurt on April 26, 2011, 04:09:26 PM
hmm... well I have an idea that might (or might not) work.
I think SPRITEPATH is just redrawing sprites many many times over so that persistence of vision tricks you into thinking that they're moving. If I'm right in my thinking then you should be able to create a timer block that makes the sprite move to different (random) locations.
example:
ON TIMER 5
SELECT CASE 1
  CASE movement_pattern_1
    x = x + 5
    y = y - 5
    TOGGLE movement_pattern_1
  CASE movement_pattern_2
    x = x - 5
    y = y + 5
     TOGGLE movement_pattern_2
  CASE ELSE
    mv = RANDOM 2
    IF mv = 1 THEN movement_pattern_1 = 1
    IF mv = 2 THEN movement_pattern_2 = 1
END SELECT
SPRITE 1 x y $enemy_sprite$
END TIMER

although this would work it would create spastic random convulsions. To effectively use this method (which may or may not work) you'll have to find some way to force the will of an intelligent AI on the select case block as you see fit.

P.S. using smaller SPRITEPATH commands inside the SELECT CASE block might work, but I think your better choice is the first thing mentioned.

P.P.S if this initial block here doesn't work then I spelled something wrong. Sorry :P
Title: Re: Sprite animation
Post by: Connors on April 26, 2011, 10:18:26 PM
Quote
I think SPRITEPATH is just redrawing sprites many many times over so that persistence of vision tricks you into thinking that they're moving.
FYI, any computer game has to use persistence of vision to make you think things are moving...except maybe text adventures.
Unless of course you can show me a computer that moves real objects around like puppets for the graphics, which would be pretty cool.
Title: Re: Sprite animation
Post by: GMG Kurt on April 27, 2011, 02:37:24 PM
Quote
FYI, any computer game has to use persistence of vision to make you think things are moving...except maybe text adventures.
Unless of course you can show me a computer that moves real objects around like puppets for the graphics, which would be pretty cool.
That would be pretty cool 8)
Title: Re: Sprite animation
Post by: Charlo on April 27, 2011, 10:31:23 PM
Quote
FYI, any computer game has to use persistence of vision to make you think things are moving...except maybe text adventures.
Unless of course you can show me a computer that moves real objects around like puppets for the graphics, which would be pretty cool.
When I was four years old I thought that was how my TV worked.   ::)