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 15:43:29

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

A rhythm note for any type of game.

I made this object while thinking up of different gameplays, this is a simple script for a rhythm game of some sort.
Most of the things in this script is untested, but you guys can edit this for yourselves. It also has parts where it creates different objects, you can make your own objects for these. And the "note1.ogg" is where you'd put the script for what sound you want to use for it.

// This script is for another game, please use it as you please.
// I am testing with it, and this is a prototype script.
// Note: You won’t be able to make any type of rhythm with these alone,
// you need to write the BPM down, and calculate it into how much
// X speed the player needs to be going at, I’ll include a demo level
// soon...


object  "Blue:Note" // This is a test script, it won’t be used for this game, but for another type of gameplay.
{
     requires 0.2.0
     state "main"
     {
     set_animation "SD_RING" 0 //TODO: Make a new PNG image and Spritesheet.
     on_player_collision "handle.25"
     change_state "main"
     }

     state "handle.25"
     {
     On_button_pressed down "give_player_score:Perfect"
     on_timeout 0.25 "handle.50"
     }

     state "Tap"
     {
     play_sample "samples/note1.ogg"
     change_state "destroy"
     }

     state "handle.50"
     {
     On_button_pressed down "give_player_score:Great"     
     on_timeout 0.25 "handle.75"
     }
    
     state "handle.75"
     {
     On_button_pressed down "give_player_score:Close"     
     on_timeout 0.25 "handle.100"
     }
    
     state "handle.100"
     {
     On_button_pressed down "give_player_score:bad"     
     on_timeout 0.25 "handle.miss"
     }

     state "handle.miss"
     {
     on_timeout 0.10 "destroy_final"
     add_to_score -1000 // Would this really work?
     }

     state "give_player_score:Perfect"
     {
     Add_to_score 1000
     Create_child ".textual.perfect"
     Change_state "Tap"
     }
     
     state "give_player_score:Great"
     {
     Add_to_score 800
     Create_child ".textual.great"
     Change_state "Tap"
     }
    
     state "give_player_score:Close"
     {
     Add_to_score 500
     Create_child ".textual.close"
     Change_state "Tap"
     }
     
     state "give_player_score:bad"
     {
     Add_to_score 100
     Create_child ".textual.bad"
     Change_state "Tap"
     }
 
     state "destroy"
     {
     Change_state "destroy_final"
     }

     state "destroy_final"
     {
     destroy
     }


}


object  ".textual.perfect" 
{
     requires 0.2.0
     state "main"
     {
     set_animation SD_RHYTHM_GAME_PERFECT 0
     change_state "float_up"
     }

     state "float_up"
     {
     Move 0 -50
     on_timeout 1 "destroy"
     }
     
     state "destroy"
     {
     destroy
     }

}
object  ".textual.great" 
{
     requires 0.2.0
     state "main"
     {
     set_animation SD_RHYTHM_GAME_GREAT 0
     change_state "float_up"
     }

     state "float_up"
     {
     Move 0 -50
     on_timeout 1 "destroy"
     }
     
     state "destroy"
     {
     destroy
     }

}

object  ".textual.close" 
{
     requires 0.2.0
     state "main"
     {
     set_animation SD_RHYTHM_GAME_CLOSE 0
     change_state "float_up"
     }

     state "float_up"
     {
     Move 0 -50
     on_timeout 1 "destroy"
     }
     
     state "destroy"
     {
     destroy
     }

}

object  ".textual.bad" 
{
     requires 0.2.0
     state "main"
     {
     set_animation SD_RHYTHM_GAME_BAD 0
     change_state "float_up"
     }

     state "float_up"
     {
     Move 0 -50
     on_timeout 1 "destroy"
     }
     
     state "destroy"
     {
     destroy
     }

}

It's a sample, and you can do what you wish with it. Other than that, i just made it for another game i'm planning. Although i don't have enough people or musics for the project. But here is the script.

---
I never said how it might work. It works when the character runs into it, in this case when in a level where the character is running through the level, when the character activates this, it creates and adds scores and gives you feedback. While it is untested, that was the theory. But it should work for most things though.

---

Oh and wherever it says "Textual" it means a small object that appears on the screen when performed.
For example it'll display some sort of text on the screen, depending on the time of the button pressed.
And i might make more others later, right now i am not working on that project because i don't have a development team for it, and neither do i have any music for it.

---

I updated the object just a bit, after testing with it for a while i found it had some bugs. I am also going to change it's reaction time settings too. Wherever it says "on_timeout x", i'll be setting it to another timeout. So far i got the sprite down, so i got get that done.
Well this is the updated version with the script, and i had done this yesterday, you can also recommend what needs to be changed.

---

Now it is available for download, i'll compile a newer version later. But this is a start to something new i guess.
https://www.dropbox.com/sh/sf2igpvd8bp6 … Clxra?dl=0
---
Next i want to add an object that counts how much notes that are hit in a single song. And also i am going to try to add another type of bar that when they hit it, that part you have to push a button in time, it'll add to score.

Last edited by aronthehedgehog (2015-12-10 15:23:51)


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