Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2015-11-04 01:36:08

CarlosTheHedgehog
Member
From: Entre Rios, Argentina
Registered: 2015-08-10
Posts: 30

Tails Flying Script and Pinkie Pie/Sonic Super Pell Out (Updated)

this time I have updated the "Flying Tails Script" date and the "Pinkie Pie Super Pell Out" to like some of you call "Sonic Super Pell Out" by  Sonic CD

Tails New Flying Controller:

object ".tails_new_flight_controller" 
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Tails"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_jump "jump"
    }

    state "jump"
    {
        on_button_pressed "fire1" "fly"
        on_player_jump "jump"
        change_state "stand by"
    }

    state "fly"
    {
        gravity
        on_player_run "main"
        on_player_walk "main"
        set_player_yspeed -150
        play_sample "samples/Tails_Fly_1.wav"
        on_button_pressed "fire2" "tired"
        set_player_animation "SD_TAILS" 17
        change_state "wait"
    }    

    state "wait"
    {
        gravity
        on_player_run "main"
        on_player_walk "main"
        set_player_yspeed -150
        on_button_pressed "fire2" "tired"
        set_player_animation "SD_TAILS" 17
        on_timeout 0.32073 "fly"
    }    

    state "tired"
    {
        gravity
        on_player_run "main"
        on_player_walk "main"
        set_player_yspeed 150
        play_sample "samples/Tails_Fly_2.wav"
        set_player_animation "SD_TAILS" 16
        change_state "wait_2"
    }

    state "wait_2"
    {
        gravity
        on_player_run "main"
        on_player_walk "main"
        set_player_yspeed 150
        set_player_animation "SD_TAILS" 16
        on_timeout 0.28880 "tired"
    }    
}

Pinkie Pie Super Pell Out (Sonic Super Pell Out):

object ".Pinkie Super Pell Out"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Pinkie Pie"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_lookup "ready"
    }

    state "ready"
    {
        let "$p = 0"
        on_button_pressed "fire2" "charge"
        on_player_lookup "ready"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_PINKIE_PIE" 8
        play_sample "charge"
        let "$p = min($p+2, 8)"
        disable_player_movement
        change_state "hold"
    }

    state "hold"
    {
        set_player_animation "SD_PINKIE_PIE" 8
        attach_to_player 0 20
        on_button_down "up" "hold"
        on_button_pressed "fire2" "charge2"
        let "$p -= 0.234 * floor(8*$p) * dt()"
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        change_state "release"
    }

    state "charge2"
    {
        set_player_animation "SD_PINKIE_PIE" 8
        disable_player_movement
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "cancel"
    {
        weak_player
        enable_player_movement
        change_state "stand by"
    }

    state "release"
    {
        weak_player
        stop_sample "charge"
        play_sample "relase"
        enable_player_movement
        set_player_xspeed "(600 + 100 * floor($p)) * player_direction()"
        change_state "stand by"
    }
}

in this case use the animation of Pinkie Pie, combining animation "walk" animation and "run" to a 40 FPS is achieved the perfect Super Pell Out, trust me, they are going to serve much

Last edited by CarlosTheHedgehog (2016-03-05 03:28:20)

Offline

#2 2015-11-04 14:49:09

aronthehedgehog
Member
From: Lincoln, NE
Registered: 2013-04-05
Posts: 390

Re: Tails Flying Script and Pinkie Pie/Sonic Super Pell Out (Updated)

Oh wow, i developed the same thing, only a bit different. (The sonic peel out though.)

object ".sonic_complicated_controller"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Sonic"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_lookup "ready"
    }

    state "ready"
    {
        let "$p = 0"
        on_button_pressed "fire1" "charge"
        on_player_lookup "ready"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_SONIC" "2"
        strong_player
        springfy_player // so that the camera won't go down, since the player is ducking
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        //textout menu.small 0 0 $p
        set_player_animation "SD_SONIC" "2"
        let "$p -= 0.234 * floor(8*$p) * dt()"

        // check if there's a platform underneath the player
        attach_to_player 0 20
        unless "brick_exists(0,0)" "cancel"

        // create cool particles
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2

        // check if the user wants to charge more, or if we can release the player
        on_button_pressed "fire1" "charge"
        on_button_down "up" "hold"
        change_state "release"
    }

    state "cancel"
    {
        enable_player_movement
        weak_player
        change_state "stand by"
    }

    state "release"
    {
        play_sample "release"
        enable_player_movement
        weak_player
        set_player_xspeed "(500 + 30 * floor($p)) * player_direction()"
        change_state "stand by"
    }
}

I had this for a while now, although i never used it much, except for testing purposes.
Although i never though about using the sprites to change how it works though.

Last edited by aronthehedgehog (2015-11-04 14:52:01)


Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.

Offline

#3 2015-11-04 23:53:27

CarlosTheHedgehog
Member
From: Entre Rios, Argentina
Registered: 2015-08-10
Posts: 30

Re: Tails Flying Script and Pinkie Pie/Sonic Super Pell Out (Updated)

aronthehedgehog wrote:

Oh wow, i developed the same thing, only a bit different. (The sonic peel out though.)

object ".sonic_complicated_controller"
{
    requires 0.2.0
    always_active

    state "main"
    {
        hide
        observe_player "Sonic"
        change_state "stand by"
    }

    state "stand by"
    {
        on_player_lookup "ready"
    }

    state "ready"
    {
        let "$p = 0"
        on_button_pressed "fire1" "charge"
        on_player_lookup "ready"
        change_state "stand by"
    }

    state "charge"
    {
        set_player_animation "SD_SONIC" "2"
        strong_player
        springfy_player // so that the camera won't go down, since the player is ducking
        disable_player_movement
        play_sample "charge"
        let "$p = min($p+2, 8)"
        change_state "hold"
    }

    state "hold"
    {
        //textout menu.small 0 0 $p
        set_player_animation "SD_SONIC" "2"
        let "$p -= 0.234 * floor(8*$p) * dt()"

        // check if there's a platform underneath the player
        attach_to_player 0 20
        unless "brick_exists(0,0)" "cancel"

        // create cool particles
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2
        let "$_pixelparticle_anim = 1 + random(3)"
        let "$_pixelparticle_xvel = -player_direction() * (120 + random(60))"
        let "$_pixelparticle_yvel = -60 - random(120)"
        create_child .pixelparticle -player_direction()*7 -2

        // check if the user wants to charge more, or if we can release the player
        on_button_pressed "fire1" "charge"
        on_button_down "up" "hold"
        change_state "release"
    }

    state "cancel"
    {
        enable_player_movement
        weak_player
        change_state "stand by"
    }

    state "release"
    {
        play_sample "release"
        enable_player_movement
        weak_player
        set_player_xspeed "(500 + 30 * floor($p)) * player_direction()"
        change_state "stand by"
    }
}

I had this for a while now, although i never used it much, except for testing purposes.
Although i never though about using the sprites to change how it works though.

I know, but I recommend something, if you use the ability "Super Pell Out" I recommend creating a new character animation

Example:

// Pinkie Pie: Carlos And Friends Adventures
sprite SD_PINKIE_PIE
{
    source_file     images/Characters/Pinkie_Pie.png
    source_rect     0 0 1190 252
    frame_size      70 63
    hot_spot        35 31,5

    // stopped
    animation 0
    {
        repeat      TRUE
        fps         8
        data        0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 0 0 3 4 0 3 4 0 3 4 0 3 4 0 3 4 0 0 0 0 0 0 0 0 0 0 1 2 5 6 7 5 6 7 5 6 7 5 6 7 5 6 7 5 6 7 5 6 7 5 6 7 8
    }

    // walking
    animation 1
    {
        repeat      TRUE
        fps         15
        data        9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
    }

    // running
    animation 2
    {
        repeat      TRUE
        fps         20
        data        25 26 27 28 29 30 31
    }

    // jump
    animation 3
    {
        repeat      FALSE
        fps         16
        data        32 33 33 33 33 33 33 34 35 36 37 38
    }

    // fly
    animation 4
    {
        repeat      TRUE
        fps         8
        data        39 40 41 42 43 39 40 41 42 43 39 40 41 42 43 44 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 44
    }

    // hi?
    animation 5
    {
        repeat      FALSE
        fps         0
        data        46
    }

    // roll
    animation 6
    {
        repeat      TRUE
        fps         40
        data        47 48 49 50
    }

    // spin dash
    animation 7
    {
        repeat      TRUE
        fps         30
        data        51 52 53 54
    }

    // super peel out
    animation 8
    {
        repeat      TRUE
        fps         40
        data        9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 25 26 27 28 29 30 31 25 26 27 28 29 30 31 55 56 57 58 59 60 61 62 63 64 65 66
        repeat_from 71
    }

    // super speed
    animation 9
    {
        repeat      TRUE
        fps         40
        data        67 68 69 70
    }

    // victory
    animation 10
    {
        repeat      TRUE
        fps         8
        data        0 71 72 73 74 75 76 77 78
        repeat_from 7
    }
}

In the animation 8, i combined the animation of walking and running for 3 to 40 FPS or more, there have the "Super Peel Out" identical to Sonic CD

Offline

#4 2015-11-05 14:17:10

aronthehedgehog
Member
From: Lincoln, NE
Registered: 2013-04-05
Posts: 390

Re: Tails Flying Script and Pinkie Pie/Sonic Super Pell Out (Updated)

Cool, i know i might not use it, but i'll try and make one.


Not active much anymore.
The only things I do now is just let inspiration come to me when it's needed.
Also bad profile pic because I don't have anything else in mind.

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org