Jump to content
Shiggy

Stepmania in RPG Maker

Recommended Posts

Someone suggested this and I thought it would be interesting to do so I made a script that read stepmania sm files and let you play them inside RPG maker .
For now it seems to work fine , all is perfectly in sync and the window of input really feel like stepmania .
Unfortunately ,only taps,jumps,hands and quads are implemented yet (hands and quads should work but haven't been not tested ) .I will try to add hold,roll and mines in the futures (mines should be easy,i just need some sprites but rolls and holds might be complicated)
 
Instructions:
 
1)Create a "Simfile" folder in your "Audio" folder and put your .sm files in there
 
2) Put the .ogg files of the corresponding songs in the "ME" folder
 
3)  This is the spriteset I'm using for the arrows : 
http://orig08.deviantart.net/2cf5/f/2014/345/b/3/neon_arrow_sign_chr___platform_ver___rm_vx_ace__by_the_dreaming_boy_88-d89fz9l.png
put in the Graphics/Character folder under the name "ddr_char"
 
4)Paste the script under materials :
https://github.com/ArkDShiggy/RM-VXA-Stepmania/tree/master/script.rb
 
 
5)In my script, you will see this line BACKGROUND = "SanzuRiver.png" you can change it with any picture you have in your Battleback1 folder.For reference ,here is the link to the backgroung I was using (I like playing touhou music on stepmania so it fits the theme)
http://www.rpgmakervxace.net/topic/26268-★remis-sideview-battle-backgrounds★/?hl=battleback#entry183511
 
6)The minigame can be called with this command Stepmania.song("song_name",speed,chart_id)
Replace "song_name" with the name of the songs used in the music and smfile
Speed is an optional argument for the speed of the arrows,default is 1 where arrows took 1s between their apparition and the moment of input. If you set it to 2,they will take 0.5s instead. If you set it to0.5,they will take 2s
A lot of simfiles have different difficulty settings whith charts for each difficulty place one after the other in the simfile . You can indicate which chart you want to play,chart_id is an optional argument ,the default argument is 1 and plays the first charted difficulty of the file
 
1) to 6) bis  use the demo instead: (second version)
https://www.dropbox.com/s/r2b0b0slpg5o5nj/Demo%20stepmania2.rar?dl=0&s=sl
 
 
7) Use the arrows to play the game and cancel (X on my game) to leave at any moment. If you leave the window ,the game will stop but not the song causing a desync
 
I hope you will enjoy it,tellme if you have any issues
 
The UI is quite minimal right now so I would like your feed back on the matter.
If people could find or draw  better sprites for the arrows and other , it would be very nice 
if you need some support for customising the script for your game,I will happily help you.
 
Edit : New version of the demo is out , there are a few bugfixes ( thanks to Quack for the help) and I added the hold input ( it won't affect the scoreboard though ) . There are a few graphical glitches with the hold bar but it works fine most of the time . I've tried tochange some stuff whith the sprites used so now it looks better different. I will put the thing on hold for a while but you can still report any issue/incompatible song you notice . I will now work on a specific version for Siletrea but some features might transfer to this version as well . 
 
 
 
 
 
 You can look for specific stepmania simfile on the web but here is a list of packs if you are interested :
http://www.flashflashrevolution.com/vbz/showthread.php?t=133223
 
Here is a screenshot ( screenshot of the first version)
post-62845-0-35434400-1451165397_thumb.png

Edited by Shiggy

Share this post


Link to post
Share on other sites

Could I ask a favor of you? A demo project, if only to download everything in one go? And for people like me who would find it easier to understand how it operates.

Checking this out now, not too familiar with Stepmania, though.

Edited by philteredkhaos

Share this post


Link to post
Share on other sites

Demo is done,I will edit a link in the description as soon as it is uploaded

Edit:Demo is uploaded

Edited by Shiggy

Share this post


Link to post
Share on other sites

so it can actually read sm files? that's awesome!

 

i have a list of suggestions:

 - be able to change the key bindings to any keys

 - be able to turn playfield upside down

 - hit effects ( you can use default animations )

 - flawless, perfect, etc. popup when you hit a note

 - show combo

 - result screen

 

also I can make better arrow sprites for you :D ( and other graphics you may need for this )

Edited by shino

Share this post


Link to post
Share on other sites

Key bindings are limited in base RPG maker so I think I will leave it that way for now . I may look for some scripts that does that in a far future but I don't feellike it for the moment.

Turning playfield upside-down should be easy,I will try to add the option

 

For hit effects and popups ,it shouldn't be too complicated but I need assets and there is the risk of lag, my code is decently optimised but the tiniest lag would cause a desync . I might look into it but my priority will be implementing holds ,rolls , mines and tempo-based colors

 

I would really like better arrow sprites , the ones I'm using make good placeholders but that's it.
 

I haven't tried the script with many simfile,so don't hesite to try some and report to me if some error appear.

Share this post


Link to post
Share on other sites

It looks quite interesting. I'll have to play with the demo out of curiosity, but I think overall the screenshot is enough to intrigue me. Not sure how I'd use it yet, but it might be interesting to blend into a game somehow someday. :3

Share this post


Link to post
Share on other sites

This is awesome!  :D

Simple, yet great. =3

I agree with shino's suggestions. ^^

Also I don't know the reference game, but I think you shouldn't be able to press keys randomly without any consequences ~ I've launched the hard difficulty and was pressing keys totally randomly and that was working ~ no misses and stuff! I'm too pro! =3

 

~Aaaaaand as I thought - When minimalized, everything breaks, but I believe it is possible to pause the song/game when minimalizing. I think I know how to approach this, but I'm not sure. At least the game itself seems to be working great, (unless it would be lagging on some PC's) so I think I'll actually give it a try and write this kind of minigame to my main project. =3

 

And... Lame question: What is the .sm extension? I've never encountered anything like this before.

Share this post


Link to post
Share on other sites

Stepmania is an open source program that emulated DDR for PC . sm files are the files used by this program so there are tons of song already charted and if you have original songs you can find people on the internet that know how to make a good sm file out of it .

Instead of creating my own format,i thought it was better to use something already widely used.

 

It's coded in the same way as Stepmania,pressing random keys has consequences because getting good and bad breaks your combo and make you lose "life" and grant no points so normally if you hit keys randomly you get no miss but you still get bad score.

 

Punishing for pressing randomly would be easy to do if it was single taps only but I have no idea how to code it for double bc I have to let a window for pressing several keys at the same time. I don't want to ask players to hit several keys at the exact same frame at 90 frame per second

 

As I said if you want help with custom modifications (such as punishing wrong inputs) to implement it in your game,I will gladly help you.

 

Edit : The two songs I've included in the demo have been chosen bc they don't have hold (you have to keep the key pressed) which most songs have but who haven't been implemented yet in my script. The main problem isn't how to check the input but I have no idea (yet) how to represent them on screen.

You can still play songs with holds but it will feel a bit weird bc you will have no inputs on some stuff you can hear

Edited by Shiggy

Share this post


Link to post
Share on other sites

So .sm files hold the notes and timing right? That would be more convenient than programming manually within the script, though personally writing that manually would be easier for me I think. =P

 

I see.

 

I'm not sure which way did you implement that, but using a conditional to check the positions of the notes could determine if the key is pressed while the note is there or not and give points or punish if there's no note there. lol it sounds confusing. =P (Better don't listen to me, as I'm writing my scripts in weird ways)

 

Why, thank you for your offer! =3 Though I think I'll have to write that by myself anyway, because I'm planning to make it a little bit more different, perhaps something like this:

:excl: WARNING: This image contains ponified stuff, pinkness, colorfulness, girlishness, cuteness and silliness. If you are susceptible to these factors, please do not open this spoiler for your own safety. It is advised to consult your doctor first. You have been warned. Open at your own risk.

 

 

11gj6jG.png

It's not like you think! =3

 

 

Starting from creating and implementing tons of custom graphics and ending up on the gameplay (+ implementing local multiplayer feature) - it would take tons of your time and I don't want to put so much work on you. I think I'll not have any bigger problems with it, but if I'll get stuck with something, then I'll be sure to ask for help if you don't mind. =3

Share this post


Link to post
Share on other sites

I'm not sure which way did you implement that, but using a conditional to check the positions of the notes could determine if the key is pressed while the note is there or not and give points or punish if there's no note there. lol it sounds confusing

i agree but the problem is when you have to press 2 keys at the same time,if you are pressing one key 1 frame before the other,the game will punish you which would feel weird.

Edit: Nevermind,I could treat them indepedantly from each other, I'm so used to stepmania I hadn't thought of it

 

 

 

Just a few advices to avoid you being blocked by the same stuff than me:

1) Minimise operations as much as possible , a tiny bit of lag would screw you up . Make sure your code don't do the same thing several times for nothing and choose processing power efficiency over memory usage efficiency.

2) Keep track of the decimal parts for the position and speed of your moving parts, a few pixels of difference due to cumulated rounding errors feels super bad

There was nothing too problematic apart from that but if you need advice you sure can ask me

Edited by Shiggy

Share this post


Link to post
Share on other sites

 

 

1) Minimise operations as much as possible , a tiny bit of lag would screw you up . Make sure your code don't do the same thing several times for nothing and choose processing power efficiency over memory usage efficiency.

This is exactly what I have in mind and I'm afraid of all the time. Ace is extremely sensitive and weak, so it may be a huge issue. I'll be watching out.

 

 

 

2) Keep track of the decimal parts for the position and speed of your moving parts, a few pixels of difference due to cumulated rounding errors feels super bad

There was nothing too problematic apart from that but if you need advice you sure can ask me 

I'm planning to have each note separately. I'll be setting the number of frames, where they should spawn etc. and then the sprites will be handled by themselves.

We'll see how it will go.  :P

Share this post


Link to post
Share on other sites
Ace is extremely sensitive and weak

I know that the way events are implemented are very heavy on the processor but I have no way to know how the default graphics library hold up, I think it might be ok if you use custom code and are careful. I had problems bc I was a bit careless and thought it didn't matter .

 

Edit: Script has been updated btw ,you can check OP for more info

Edited by Shiggy

Share this post


Link to post
Share on other sites

So .sm files hold the notes and timing right? That would be more convenient than programming manually within the script, though personally writing that manually would be easier for me I think. =P

 

I see.

 

I'm not sure which way did you implement that, but using a conditional to check the positions of the notes could determine if the key is pressed while the note is there or not and give points or punish if there's no note there. lol it sounds confusing. =P (Better don't listen to me, as I'm writing my scripts in weird ways)

 

Why, thank you for your offer! =3 Though I think I'll have to write that by myself anyway, because I'm planning to make it a little bit more different, perhaps something like this:

:excl: WARNING: This image contains ponified stuff, pinkness, colorfulness, girlishness, cuteness and silliness. If you are susceptible to these factors, please do not open this spoiler for your own safety. It is advised to consult your doctor first. You have been warned. Open at your own risk.

 

 

11gj6jG.png

It's not like you think! =3

 

 

Starting from creating and implementing tons of custom graphics and ending up on the gameplay (+ implementing local multiplayer feature) - it would take tons of your time and I don't want to put so much work on you. I think I'll not have any bigger problems with it, but if I'll get stuck with something, then I'll be sure to ask for help if you don't mind. =3

that is really freaking cool!!! you wouldent happen to have a working version would you?

Share this post


Link to post
Share on other sites

that is really freaking cool!!! you wouldent happen to have a working version would you?

Not yet. =P

~And I'm afraid, that I'll be unable to release that publicly, as the hud and gameplay will be configured to my game's needs and I'm not even sure how it exactly will look like.

+ each song will have to be configured manually (notes and timing).

 

I'll see how it will turn out, perhaps it will be configurable enough to be used for everybody (assuming it will work properly of course) ~ I'm not even sure if I'll be writing that and even if, it will not happen anytime soon, due to no time. D:

Share this post


Link to post
Share on other sites

This is really neat! (Riki's hopefully soon-to-be-seen version too!) I would really love to use this in my game, except I've never played Stepmania and therefore I have no idea what the songs are XD I also really like the idea in general. Maybe we can see more of these in the future, or some updates :)

Share this post


Link to post
Share on other sites

I put the thing on hold but I will work on it if more people are interested (which seems to be the case) . Well I learn a lot since then so I may be able to do more stuff . But damn it, I have too many projects running at the same time now .

Share this post


Link to post
Share on other sites

 

that is really freaking cool!!! you wouldent happen to have a working version would you?

Not yet. =P

~And I'm afraid, that I'll be unable to release that publicly, as the hud and gameplay will be configured to my game's needs and I'm not even sure how it exactly will look like.

+ each song will have to be configured manually (notes and timing).

 

I'll see how it will turn out, perhaps it will be configurable enough to be used for everybody (assuming it will work properly of course) ~ I'm not even sure if I'll be writing that and even if, it will not happen anytime soon, due to no time. D:

 

its still awesome! if you ever finish it I'd love to play!

Share this post


Link to post
Share on other sites

Yes , to have the inputs windows be closer to the real stepmania . If you follow this link , you will find the inputs window are multiple of 1/45 of a second . Because I didn't want to go below 60 fps , I went to 90 instead .

Share this post


Link to post
Share on other sites

If you mean this:

 

Perfect - Ironically, a perfect does NOT match perfect requirements, it instead is worth only 66.66% of the total points you would receive for that arrow. In order to hit a perfect, you must be outside of the Marvelous timing window, but hit the arrow within 0.045000 (45 thousandths) of a second. In order to receive an AAA, you must hit no lower than this window of timing for a song. Gives you 2 points addition to your life bar under official standards.

 

That is not 1/45 second. 1/45 is ~0.02222 actually.

Or did you mean something else? Because searching for "45" on that page won't get me any other relevant results.

 

1 frame is 1/60 second on 60 FPS, which is ~0.016667 second. That means that the input checks (along with the graphic refresh) are executed in every ~0.016667 seconds on 60 FPS.

On 90 FPS, that would be ~0.011111. Not much of a difference.

The only timing which needs that FPS is that "unofficial Ridiculous timing". The rest is perfectly doable even on 60 FPS.

 

Or it is entirely possible that I completely misunderstand those timing explanations. :D

 

Regardless, it's a cool mini-game.

 

Although, in your demo, after playing that "hard" song (I would rather call it "nonsense" song, because it got absolutely nothing with rhythm - or maybe I just don't hear good enough), no other games will work. The scene opens, the music plays, but the arrows just won't appear anymore. This happened 3 times in a row for me (I played that song 3 times total :P).

The rest of the songs do not trigger this bug.

Edited by Sixth

Share this post


Link to post
Share on other sites

I meant flawless which is half the perfect window so 0.025 (close enough). I must have did my math wrong at the time bc I thought it was exact . It's not really necessary anyway but I find it cool at the time. 

 

I will try to look for what might be causing the bug . If the "hard" song was off-ryhtm I wonder if you had lag, I might have to make a becnchmark song : a metronom with tons of useless input to see if lag has created an offset after a certain point

Edited by Shiggy

Share this post


Link to post
Share on other sites

I tried out the demo and tested downloading an sm pack and addded a few songs to test if they would work out of the box without any editing.

 

Some findings worth mentioning:

-all the added songs crashed. The reason was because the BPM value didn't get parsed correctly and the BPM array was left empty.

Turns out this happens because in the new files the BPM value was written as an integer while in your two sm files it was written as a floating number. So by editing the BPM value in a file from 138 to 138.000 fixed the crashing. Pretty minor bug but you should probably fix it.

 

-doesn't seem to use the property for song filename in the sm file so the song file needs to have same name as the sm file. Not much of a problem but could cause some confusion for less adept users so you might wanna mention this in the instructions.

 

-One of the songs wouldn't work. No arrows came. I can upload the smfile+song so you can debug it if you want.

 

As for representing "hold" arrows on the screen, maybe this will help, maybe it won't but I think it's a pretty important feature and making it look good is something to focus on once it all works properly.

hold.png

Share this post


Link to post
Share on other sites

Wow thx for everything Quack, (never been so happy that someone gave me work   :huh:  ) .

I did some weird hack to read the files at some points but now that I'm used to regular expressions so I think I will be able to do something cleaner/more stable

Edited by Shiggy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×