Hi im interested in creating a very basic rhythm game in c# and cant seem to find any info on the web as to how to get started. I can imagine its quite tricky due to the graphics and music having to be bang on time but im up for the challenge!! If any one knows of a simple but effective way of dealing with the timing issues to get me on the right track it would be great.
Im planning on using .wav files and c# ( hoplefully no directX if possible im not to fussed about visuals @ the moment).Thanx in advance...
Mykel StonePosted Mar 9, 2008, 12:41 PM
Statically is the method ddr and step mania uses. What they do is create some sort of array, that can measure to .01 of a second, measuring into lower values gives more accuracy, at the cost of a bigger array being created, and thus more memory bieng used. I believe you should be able to measure at least .01 of a second using directsound, I haven't screwed with it much so I can't be sure. but you could create an array like this:
Int32[] steparr = new Int32[lengthofsong];
this would give you an array with a step for every .01 second in the song, you could then set a number value to donate which step goes there, 1 for left, 2 for right, 3 for up, etc. Then you would just have to read through that list to determine where the beats and steps should be placed. You place the steps before the songs start, and they have a initial velocity that causes them to move down, or up, or which ever way you want. when they had were within a certian range of their appropriate target, and that key gets pressed, then it hits and the user gets points.
That I supposed would be a very general idea of 2 ways, I've thought about this alot trying to make one myself, and thats been the best one so far, its just very time consuming creating the data to generate the steps in the array, thats the major thing thats going to hinder you, trust me.