Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411430 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 09:34:30 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityJams & EventsCompetitionsSportsVelodrome [FINISHED]
Pages: [1] 2
Print
Author Topic: Velodrome [FINISHED]  (Read 17664 times)
Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« on: November 05, 2012, 08:54:44 AM »

Hi Guys, here's my idea for the compo.

It's a very simple rhythm/timing game where you need to alternately tap 2 keys to pedal your bike around a circuit. You have to pedal in time to the music and the closer to the beat you are, the further the bike will be propelled. The twist is that the tempo of the music will be constantly speeding up or slowing down.

Here's a mock-up of the menu.



The game is now complete and can be played here:  http://gamejolt.com/games/sports/velodrome/10740/
« Last Edit: November 22, 2012, 02:52:27 AM by Glassmoon » Logged

AD1337
Level 9
****


Lucas Molina


View Profile WWW
« Reply #1 on: November 05, 2012, 09:00:51 AM »

Please make it so that if you hold a key down, you go forward. So it's not just tap-tap-tap-tap-tap but taaaaaap-taaaaaap-taaaaaap if you know what I mean.
Logged

Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #2 on: November 06, 2012, 02:38:08 AM »

So that you have to hold the key down for the duration of the beat? That would better mimic the action of pedalling, I'll try it out when it comes to programming the inputs.
Logged

Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #3 on: November 09, 2012, 09:15:36 AM »

Here's a first draft of the track.


I've started programming the music system for the game but I'm having a little trouble getting an accurate input timing from Unity. I think the audio is being buffered and delayed, so the button presses are always registering after the beat.
Logged

motorherp
Level 3
***



View Profile
« Reply #4 on: November 09, 2012, 10:14:39 AM »

I tried making a music app in Unity once but like you I struggled with timing.  I did a fair bit of poking around and research into it but it was looking like there just wasn't a way to get sample accurate timing out of Unity for audio syncing.  Let me know if you find a solution that works, I'd love to know what you come up with.  Game looks cool btw
Logged
Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #5 on: November 09, 2012, 11:04:19 AM »

@motorherp

Thanks. I've managed to get sample accurate audio triggering working in my main project here (http://sentinel-game.tumblr.com/)

The solution in the end was to have a blank audio file that lasts the minimum quantize time you require (say an eighth note) and have that looping. You can then read off the total number of samples in that audio file minus the current position (in samples). This gives you a precise number of samples until the next beat. The audio source play function then has an overload that lets you add a delay to playback (in samples), so you can plug in the previous value and have the sound perfectly in time with the next beat.

It does require you to be able to "predict" ahead of time when audio needs to play and that the music has a constant tempo, so isn't useful in all situations but might be of use to you. 
Logged

Inanimate
Level 10
*****

☆HERO OF JUSTICE!☆


View Profile
« Reply #6 on: November 09, 2012, 09:03:37 PM »

Wow, this is an ingenious idea! Your graphics are also beyond beautiful. You seem like a very strong developer with a lot of skill. I can't wait to try out this idea with my friends. (:
Logged
Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #7 on: November 10, 2012, 01:02:27 PM »

@Inanimate
Cheers. It should be fun with 4 players Smiley

I ran into a bit of a development roadblock today with this input latency issue, but I still have a couple of ideas to try out.
Logged

Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #8 on: November 13, 2012, 10:53:56 AM »

Made some progress on this today. I found a few things I could do to reduce the latency down to an acceptable level. First I manually set the audio buffer size as low as it could go in Unity without stuttering (2 x 1024 sample buffers), secondly I improved my beat calculation code as it was introducing some rounding errors, and finally I set the game to a target frame-rate of 120fps to reduce the update loop delay.

The timing feels pretty sharp now and the core of the game is up and working, just need to finish it off with scoring, menus, game states, final graphics and audio etc.

 
Logged

goshki
Level 4
****



View Profile WWW
« Reply #9 on: November 14, 2012, 02:14:27 AM »

Hi-tech, definitely. And how do you compensate for longer tracks for the outside bicycle?
Logged

Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #10 on: November 15, 2012, 01:48:47 AM »

@goshki

I've sidestepped the issue by scoring based on distance travelled instead of laps completed. The bikes going around the track ends up as just a visualisation of how well you're timing the button presses.
Logged

goshki
Level 4
****



View Profile WWW
« Reply #11 on: November 15, 2012, 02:17:18 AM »

Pretty smart. :-)
Logged

Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #12 on: November 22, 2012, 02:57:57 AM »

And it's finished  Beer!

http://gamejolt.com/games/sports/velodrome/10740/

I've not tried uploading a Unity web build before so I hope it works ok for everyone.
Logged

Fromage de Soja
Level 0
**



View Profile WWW
« Reply #13 on: November 23, 2012, 10:01:01 PM »

Oh man, this is pretty nice. I'm terrible at it! Congratulations on finishing it! Toast Right
Logged
Ben H
Level 0
**


View Profile WWW
« Reply #14 on: November 24, 2012, 06:36:19 AM »

Love the aesthetics and the music, but I still can't understand what the timing is supposed to be even after a few minutes.
Are you supposed to match the soundtrack's major clap noises, or the visual diagonal marker? They seem to be in time, but one is 2x faster
Does the diagonally-split square show when you're supposed to press Left/Right, or just timing?
Also when I hit Left/Right in time with the diagonally-split square, I get miss every time (and I'm usually pretty good with timing)

When I hit the buttons double-speed to what makes sense, I get Perfect-Miss-Perfect-Miss. But when I go half of that, I just get miss... It sort of seems to work if I go in an off-beat pattern but it's kind of confusing.
Logged

Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #15 on: November 24, 2012, 08:31:07 AM »

@Fromage
Thanks!

@Ben H
I realised today that I had overlooked an issue with audio latency varying on different setups. I've now added a 'calibrate audio lag' option to the main menu which will work out the delay in your setup and adjust the input timing. Hopefully this should sort the issues with timing. You might need to force a reload on the page to get it to load the new build.
Logged

robro
Level 0
**



View Profile WWW
« Reply #16 on: November 24, 2012, 10:28:44 AM »

This is really great. I couldn't figure out what I was doing wrong before, but since you added calibration it works perfectly. Got 5225m on my first try.

Nice presentation and especially nice soundtrack.
Logged

felipezille
Level 0
**



View Profile WWW
« Reply #17 on: November 24, 2012, 11:24:13 AM »

cheers man! very nicely acomplished  Toast Left Smiley
Logged
Glassmoon
Level 0
**


Matthew Brown


View Profile WWW
« Reply #18 on: November 24, 2012, 02:23:03 PM »

@felipezille + robro
Thanks guys. Glad to hear it's all working now.
Logged

goshki
Level 4
****



View Profile WWW
« Reply #19 on: December 01, 2012, 04:40:26 AM »

Pretty slick, indeed. I've catched myself not paying attention to the screen and totally relying on the sound. Very hypnotizing. I've had to calibrate sound lag to hit keys on time so it's really pro that you've thought of that.
Logged

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic