Search Unity

UA 2009: Hard Rock Racing [FINAL VERSION]

Discussion in 'Made With Unity' started by Martin-Schultz, Aug 20, 2009.

  1. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    UPDATE: FINAL GAME LAUNCHED ON SHOCKWAVE.COM

    > Play right here

    Unity Awards 2009
    Hard Rock Racing is my entry for the Unity Awards 2009. I will blog in this thread about the progress and would love to get feedback on the game. Note: This first thread post will be updated from time to time so keep an eye too and not only the very latest posts.

    Game Description:
    Hard Rock Racing is a fast-paced and action driven racing game taking place in a 3D city. You race against 7 other cars in 5 laps around short tracks, pick up missiles and mines to blow your opponents away and try to be the first at the finish line. Simple, adrenaline-pumping racing with lots of explosions and fun supported by awesome hard rock music!

    Design Decisions:
    The game has been created with a publishing option to game portals in mind. It shall be a simple to learn racing game that can get adopted by nearly everyone within a minute or two and shall bring the player just nothing but fun. To create fun and keep it simple (KISS principle), I tried to reduce the game to the bare minimum elements:
    • Racing as main element (just because I learned from portals that this sells good)
    • Missiles as primary weapon, mines as secondary weapon. Idee was to have a very powerful remote weapon to the cars driving in front of you to be able to blow them up and overtake them and have a somewhat weak weapon to the cars behind to make sure there is much dynamics in the game in terms of overtaking and making also sure that you just can't blow up everything that is behind you and make it easy to win.
    • Explosions (I can't wait to get Detonator into the game!)
    • A nice environment (took a 3d city - no art skills from my side needed)
    • Damn good music (ok, this is subjective to the audience)
    • File size. Portals are looking at the game size so you can't have a 200 megs webplayer. The current build is about 4.6 megabytes and includes 1 mp3 track (1.6 megs) already. 6 other tracks are loaded from the net during the game.
    • Fun!!! At least for me, blowing things up in games has always been fun for me and so I try to do in this game as fun factor. Fat explosions, missiles that you LOVE to fire and can't get enough from while beeing pushed by the hard rock music.
    • Non-destructive cars. I've been thinking a lot about if I should blow up the cars when hit by missiles or just have them been shaken a lot and not get damaged. I decided for the latter one because the tracks are very short in the game (lap times of 25-30 seconds) and beeing hit by missile costs you a second or more, so that other cars might overtake in that time. Beeing blown up would mean to go back to the previous checkpoint and loose way more time while with non-destructive, you could be lucky and not get whirled in the air but receive only a slight bump but can continue to drive without a major time loss.

    Links:
    >>> Hard Rock Racing on Shockwave.com <<<
    Unity Awards 2009 page
    Announcement thread from Tom Higgins

    Current questions to the testers:
    One of the most important points I'm interested in getting feedback is, is the AI too hard in the game or is it good as it is?

    Thanks!
    Martin :)

     
  2. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    All right, here is my first real progress report just after I updated the first post with detailed information about the game.

    So what have I been working on?
    Yesterday and today I've been looking mainly at the level itself. Right now the game has in the best quality setting between 700 and 1000 draw calls and that is way too much for the target audience I have in mind (casual gamer).



    So I've started to experiment a bit with Renderer.OnBecameVisible/Invisible also with putting the CombineChildren mesh script onto some bounding boxes root objects (half transparent red material) for each block in the city to reduce draw calls.



    As you can see, it brought already roughly 120 DC's less by just applying the script to the blocks of houses. I'll go through the whole city now and do that on every block of houses.



    Putting the mesh combine on all lamp posts brought another grrreat improvement!



    Later today I plan to work on the second weapon in the game and I also talked to an artist and hired him now to make some nice car model as well as nice meshes for the missile and the new mine weapon that is coming into the game. Stay tuned! :)
     
  3. emergki

    emergki

    Joined:
    Oct 15, 2007
    Posts:
    422
    Very Nice game Martin!

    :D
     
  4. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Thanks! :)

    Meanwhile I have selected an artist, Ryan Jackson from Las Vegas, and he has started to work on the first car for the game as well as the missile and the mines. The car yet in the game is just a placeholder and will be replaced by new art. I plan to have a few cars in the game for the final release, also with some mod options like different textures and stuff.

    Ok, but now it's screenshot time! I'd like to share some first artwork and sketches Ryan made.

    First version of the buggy that Ryan made from the briefing I gave him:



    High poly source model gets more and more final.



    First sketch of the homing missiles that will replace the simple capsule primitive I'm using now.



    Now the nearly final car with an 2-step demo animation how the missile pod will fold out and back in.



    The undercarriage of the car.



    High poly source model of the wheel:

     
  5. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    We're on the way to the low poly model meanwhile.



     
  6. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Looks cool Martin!
     
  7. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    The new car is completed, texture update is to come still with racing decals. Here's the new car model in action:



    1) The new missile is modelled and built-in.
    2) The car got a new nifty feature: A missile pod that can be folded in and out. For that the missile fires now alternating between the left and right pod.



    The new secondary weapon is in - you can drop now proximity mines in the game.



    When the mines explode they will give the cars a HUGE upwards boost, as seen in this shot (the cars are whirling in the air):



    A new webplayer will be out soon.
     
  8. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Nice to follow your progress. Keep us posted if you like!
     
  9. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    That's some pretty nice bump mapping !
     
  10. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Thanks guys. Yeah, I'll keep you posted in this thread about the progress.

    So, today I want to show my waypoint system. Nothing ultra complex, but works great for my purpose. On the right you see my editor script that offers some little helpers to design the track, re-sort/re-order the waypoints and such stuff. It has also a function to hide or show the waypoint renderers as you can see on the left side.

    The waypoints are simple standard Unity cubes with a half transparent material and a collider marked as trigger. The red ones are "official" waypoints that not only the AI drivers have to drive through, but also the player has to pass. So the "next waypoint" arrow will always point to the next red waypoint in the game. The green ones are additional waypoints just for the AI.



    Each waypoint has an additional script applied which delivers custom per-waypoint settings, like a maximum drive-through speed for the AI, the drive-through width (0.5 units to each side maximum in local space).



    Ok, that was it today about the simple but effective waypoint system in Hard Rock Racing. Stay tuned for the next posting! :)
     
  11. the_gnoblin

    the_gnoblin

    Joined:
    Jan 10, 2009
    Posts:
    722
    Nice!
    Keep posting all the cool pictures here :D .
     
  12. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Wow Martin, this has a ton of scene objects. The city looks great! Thanks for posting progress shots of the car being made. Always nice to see making of's.
     
  13. magwo

    magwo

    Joined:
    May 20, 2009
    Posts:
    402
    Cool! However, I dare you to make cooler missiles than mine. :p
     
  14. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Haha, well. There is still time to improve the missiles! (and this is a great job to improve missiles, the fun part!!!) :)

    I improved them for my game another time in the lastest versions I have here locally. They are way more... more... explosive now! :)
     
  15. magwo

    magwo

    Joined:
    May 20, 2009
    Posts:
    402
    Well actually I just tried, they are quite cool really.
     
  16. Thomas-Lund

    Thomas-Lund

    Joined:
    Jan 18, 2008
    Posts:
    465
    Really pulling this together - cool stuff Martin. Congrats
     
  17. IPete

    IPete

    Joined:
    May 15, 2008
    Posts:
    414
    Hey there Martin,

    Long time no speak! This is looking great man, really great!

    Thanks for posting about your progress too - its great to hear about some of the thought processes and thinking behind some of the stuff you are doing.

    I found your thread because I was particularly interested in creating my own racing waypoint system so you've inspired me to look at a couple of things I need to get up to speed with - again thanks.

    Keep up the great work!

    All the best
     
  18. jmunozar

    jmunozar

    Joined:
    Jun 23, 2008
    Posts:
    1,091
    WOOOAAHHH

    Awesome!!!!
     
  19. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Thanks guys! I've just noticed I haven't been updating this for days now. So here we are with an update, more to come the next days as I have been working a _lot_ on the game.

    What I want to show today is: Do you know how useful the console output of Unity is when you want to get your webplayer size down? I find this so incredibly nifty and useful that I'd like to show the results of my current optimizations. I'm currently down to 4.2 Mb for the whole game as final webplayer size. The console log shows you actually each and every asset that goes into the webplayer and how it got compressed. So if you notice there that a texture occupies like 600 kbytes or 1.2 megabytes, it's maybe time to think if you really need a super high resolution for the texture. Compress sounds? Yes, makes a lot of sense and brings a lot in terms of size.

    As you can see in the screenshot below, I noticed that I accidentially included 2 times the same font in the webplayer, just one with a black color and the original one with white color. That you can simply avoid by creating a second material with a text shader, assign the texture from the first font import and simply colorize it. That way I can save now another 256 kbytes on the final player size. Isn't that super useful?

     
  20. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Back with updates - screenshot time!

    The game has made some great progress. Detonator is in the game and makes some great and visually stunning explosions. Thanks Ben, Detonator really really rocks! :)

    The game mechanics of Hard Rock Racing are completed, the gui system is in place using animated 3D Text Meshes, the music is finalized and 7 songs are in the game - 1 included and 6 are streamed in once the game has loaded.

    As the game gets more and more complete, it has entered now a polishing stage. What is missing now is some final sound remixing to get the volumes to a somewhat equal level, work on the webplayer protection and create some more tracks for the game (currently 5 tracks built in) plus some minor tweaks here and there.

    What I'm very happy about is that the whole game, including 1 mp3 track, is still under 5 megabytes! Ok, it's 4.9, but still! :) I didn't expect that small size in the beginning when I started developing the game. Unity does a great job on compression, really. I also kept an eye of doing as much as I can procedurally and not "in textures", like for example having the complete gui system use only internal Unity components and not waste any space for bitmap textures. Seemed to work great so far.

    Another cool thing I worked on is to use Unity for some high res rendering of the Hard Rock Racing Logo to create source images for printing the logo on t-shirts. I'm going to appear at the Unite conference fully branded with some nice Hard Rock Racing t-shirt!! :)



    Please see here a scaled down version of the highres rendering:



    And here the promised screenshots of the current version of the game:







    Oki doki, until the next update! :)

    Martin
     
  21. stefmen

    stefmen

    Joined:
    Apr 14, 2009
    Posts:
    791
    amazing work Martin

    im realy enjoying this tread
    keep it up :D
     
  22. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Oki doki, time for another update! I haven't been able to post an actual player recently due to some outside circumstances, but meanwhile I created a nice video showing the latest version of the game. Please check out the video here:

    http://www.decane.net/games/ua2009/assets/hrrbeta.mov (33 MB, 4:26 minutes long)

    I've been also working on a better protection scheme for the webplayer this time. On of my (our) previous webplayer games had been stolen by some weird chinese game website and it was so far impossible to remove the game from their site. So this time I wanted to have a more fancy protection scheme in (last time was nothing in I have to say). So beside all the stuff that is written in the Unity docs about checking the source url and the webplayer name and the iFrame'ing breakout stuff that Tom Higgins talked about in his Unite 07 videos, I've been putting in some more protection to just make sure that the player can only work with exactly my HTMl page by doing a 2 way hash communication between the player and the server.

    The actual webplayer HTML page is meanwhile a php page and creates on the server a token with a timestamp inside and some secret salt and creates a MD5 hash out of that and passes all these parameters except the salt along in the webplayer page to the player. The player, once started, calls the server via the www class with these params and lets the server check again if the all the params are correct and if the timestamp has not timed out yet. If that fails, the webplayer will display some kind of info screen and stop there:



    Hope that helps to not have the webplayer been found on weird chinese gaming sites without paying a dime to me... :)

    Best
    Martin

    P.S. New webplayer, so that you can play yourself, will be out later next week.
     
  23. absolutebreeze

    absolutebreeze

    Joined:
    Feb 7, 2009
    Posts:
    490
    Very nice touch :)

    Maybe you should let the other site run the games about 40 or 50 times, and then when they are not looking and the counter has maxed - stop it from playing and instead of the message above get it to load a level that advertises all your games.
     
  24. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Hehe, good idea Tony :)
     
  25. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Martin, the game came along pretty well! Congratz!

    I'm always fascinated by the racing games, but never could grasp how the racing AI works... I'd like to try myself in a racing game development one day (a small demo, perhaps).
    How do you make the AI racing part, if it's not a secret? Is it just following the nav points using lerp() or similar?
    I'd like to find any books/online resources that can describe the racing AI creation - do you have any to recommend?

    Thanks a bunch!
     
  26. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Thanks, and the new version coming out in a few days is even cooler than the current demo. :)

    I bought 2 nice books about the topic: "AI Game Programming Wisdom 1 2" and those cover some nice racing parts too. Other than that, my AI is quite simple waypoint following with a bit of randomness inside. What I did is after each passing of a waypoint to randomly select a point in the next waypoint's cube / dimensions. That makes the car look driving not all the same. Plus I spent some more AI-only waypoints in-between the checkpoints. All that helped making the cars drive like they are now. So, in general, more or less quite simple "drive to destination" logic. :)
     
  27. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Martin, thanks a lot for the tips! Now I'm eager to do some prototyping :)
     
  28. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    You're welcome. Maybe the race tutorial helps you too a bit. I'll attach it to this post.
     

    Attached Files:

  29. OXYGEN

    OXYGEN

    Guest

    Joined:
    Mar 16, 2008
    Posts:
    1,101
    Just checked out the video Martin It's looking tight reminds me of Gremlins old Amiga Game super cars also looks a little like micro machine...will you be porting to Iphone...?
     
  30. tau

    tau

    Joined:
    Dec 15, 2008
    Posts:
    113
    Just wow :) I've never seen that tutorial - really helpful! Thanks!
     
  31. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Thanks, at least I will try to see how much of that is portable to the iPhone. The full game surely not, too much draw calls, too much explosions and cars, but maybe reduced version. Not sure yet, but will give it a try. :)
     
  32. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Edit: Removed for a moment, technical issues, will be back soon!
     
  33. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
  34. PhilipV

    PhilipV

    Joined:
    Aug 25, 2008
    Posts:
    103
    It's not working at all... Apparently when you start the game all the racers fall off the ground...

    I'm on an imac late 08... 2.8Ghz Duo2 with Nvidia 8800 and 4 gigs of ram. Updated webplayer tested in IE8, Safari 4, Firefox 3, under windows 7 RC
     
  35. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Wha! That sounds ugly. Does it happen on every track you play or only on one specific track?
     
  36. PhilipV

    PhilipV

    Joined:
    Aug 25, 2008
    Posts:
    103
    every, tested with different opponents numbers/laps options... still doing this thing

    EDIT: It does neither work on Leopard (same machine) both using firefox or safari or chrome...
    This time though it gets half way through the loading bar and then it just fades out and stays in that logo screen, with no loading bar

    EDIT2: This was beacause on the mac i did not updated to 2.6
     
  37. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    I was able to reproduce it meanwhile on Windows. I think I know where it comes from, the track parser fails on windows somehow.

    So did it in the end work for you at least on the Mac?

    Thanks a bunch for testing!!
     
  38. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    i've got an error about piracy counter measure?lol,i played directly in your site.
     
  39. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    How long did it take to load? Maybe the timer expired in the backend.
     
  40. OXYGEN

    OXYGEN

    Guest

    Joined:
    Mar 16, 2008
    Posts:
    1,101
    Hi Martin does not work my end loads and...then nothing happens no cars nadder.....I am running a dual core Imac tons of memory etcetra and downloaded unitys latest web Player...
     
  41. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Hi. A few moments ago I just updated the player, maybe it was exactly in that moment.

    I fixed an issue with float parsing on windows (forgot to set the CultureInfo.InvariantCulture parameter...) and hence all float parsing failed. Bad when loading a track... :)

    The copy protection issue should be gone too (hopefully). Please let me know if you encounter any issues with the game. Thanks! :)

    @ OXYGEN: Do you see the splash screen with the explosion and 3 cars with the loading bar? Do you see afterwards also the camera flythrough?
     
  42. OXYGEN

    OXYGEN

    Guest

    Joined:
    Mar 16, 2008
    Posts:
    1,101
    only the splash screen Martin no 3d content....
     
  43. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Ok, then it is definately a webplayer issue, I'm pretty sure. Had that too that the webplayer somehow did not upgrade. What version does the webplayer report if you click in Sam's blog post the auto-update page?

    http://blogs.unity3d.com/2009/09/30/2-6-community-preview/

    It should report f3 at the end.
     
  44. PhilipV

    PhilipV

    Joined:
    Aug 25, 2008
    Posts:
    103
    Yes, on the mac it did worked!
     
  45. PhilipV

    PhilipV

    Joined:
    Aug 25, 2008
    Posts:
    103
    Just a gameplay note: I got fastly pissed off by the fact that you are using a box collider and not a (simplified) mesh collider for the cars... when you are angled and hit a wall, you are then front sticked to it, and if you side hit something, you get completely blocked...

    Just a note on my own
     
  46. OXYGEN

    OXYGEN

    Guest

    Joined:
    Mar 16, 2008
    Posts:
    1,101
    Tried again using safari worked fine...seems Fire fox is the problem

    had a quick spin and i like!
    Great Job...Martin
    :D
     
  47. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It worked fine here, and looks very nice with quite a bit of polish. A few things:

    I'm afraid I don't like the motion blur at all...it's a nifty effect for the fly-by, but not in the game. (It's not just this; there's at least one other racing demo that used it and it was pretty unpleasant with that one too. ;) )

    It's very dark in shadowed areas, to the point of being hard to tell what's going on. I'd lighten up the shadows and/or textures.

    I started to check out the instructions, but when it began slowly typing them out one character at a time, I quickly canceled. Call me impatient. :)

    I don't care to be stuck playing in a small window with the full-screen option disabled.

    --Eric
     
  48. Sakar

    Sakar

    Joined:
    Feb 12, 2009
    Posts:
    141
    That was pretty fun!
     
  49. ahloyan

    ahloyan

    Joined:
    Jan 3, 2009
    Posts:
    78
    sorry it was very sluggish for me and a bit too much motion blur

    i am on firefox 3.5.3
    vista home premium
    intel core 2 duo 1.5ghz
    2 gb ram

    laptop
     
  50. siliwangi

    siliwangi

    Joined:
    Sep 25, 2009
    Posts:
    303
    ok now seem fixed,good game :),i've noticed you have changed the gem(weapon box) with more interesting transparent one,no more fullscreen?