Jump to content
  • Advertisement

Making an arcade racer like CTR

Brunni

1290 views

I always liked playing both Mario Kart (the most was on DS) and Crash Team Racing. There's just something fascinating with the mechanics of the game. I could play it endlessly, despite a small number of different circuits.

Actually I like racers in general. Two years ago I made a racer looking like Outrun, which is another type of game which I loved as a child (at a time where games didn't yet have a defined standard, so it was OK to just play to hit the road and explore environments, without princess to save, big boss or other deadly stake). Link: https://itunes.apple.com/us/app/highway-runners/id964932741?mt=8

But still, back to Crash Team Racing, I always wanted to make my own clone for fun, and I gave up due to lacking physics knowledge (and free time). This remained a dream though, and this time I committed to it harder, and learned, fiddled with every concept until I grasped it.

It started with an inspiring video about Space Dust Racing. I think that's the one mentioned everywhere when it comes to developing an arcade racer. I think I kinda knew that it was lacking a lot of concepts that I'd eventually have to fiddle with, but many people were saying that the theory was alright, so I started. I also created a topic, which I'll now turn to a blog:

Anyway as with many things the very hard part was the beginning. It's amazing when I think about how at first I was unsure about everything. About how I had to swallow my ego and realize that I wasn't able to implement a simple spring correctly, or to understand the true implications. Well I can say that I still don't truly understand everything, but it's enough to get what my car does and make it do what I want so ;) so this blog may just start with a common and sweet "Believe in yourself" claim :D

I hope to develop it into a fully playable game (homebrew quality though), focusing on the mechanics, and detail here some specific algorithmic areas. I'm not sure yet of the final form, maybe I'll want to get as close to the CTR as possible. Maybe I'll go for something else and think about special challenges that I could bring to the table. Here's how it looks for now :)

Not playable demo yet, but feel free to leave your impressions, suggestions, and anything that you'd like to see in such a project ;)



2 Comments


Recommended Comments

Hi Brunni!

I've been researching for days on this topic, and you describe perfectly the frustration I'm feeling trying to implement these whole whichcraft that are forces, vectors and such.

LUCKILY, I stumbled upon your other entry on 'Arcade car physics' and I was wondering if you could maybe explain a bit how did you approach the whole steering thing.

I too watched the Space Dust Racing video for reference and tried implementing the torque they mention, failing miserably.

I might be late to the party, but I do wanna understand how this works, instead of abandoning the idea and rolling with a simpler, not so exciting movement.

PD: Great work with the spring physics post btw :)

Share this comment


Link to comment

I remember thinking it was the most awesome thing to be able to get the cars to fill up their turbo boost by drifting.

*edited*

I like the ramps you've got laid out along the course, particularly the one that stays elevated for a while and ends with the jump. I hope you decide to put some fun detail in the crashing. I'm not sure if I'm remembering correctly, but I think the cars in CTR smooshed up when they crashed. It's playing out nicely in the brain.

Edited by Breadhorn

Share this comment


Link to comment

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
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By zuhane
      Hello people!
      Thanks for taking the time to read this post. I've been using Unity for a while now and I must say that I'm very impressed with it. Definitely a jump up from XNA. However, something that I've noticed that leaves a lot to be desired is the 2D tile-based collision. Below is a little video of a game I've been working on with a friend which demonstrates my problem. Essentially, games that use huge open planes and polygons don't seem to have many problems with collisions, but when a game consists of lots of small tiles stacked alongside each other, objects tends to get stuck in-between the gaps. For example, if I have a horizontal strip of little tiles, and the player runs along the top, sometimes he'll come to a standstill and have to rebuild his momentum, However, this is much more noticeable for the ball. The ball seems to consistently bounce around randomly by hitting into edges, due to the nature of how fast and random it moves, making it very hard for players to line up shots and make meaningful choices in how they attack the ball.
      So after doing a little Googling, it seems like there's absolutely nothing on this topic. It baffles me, because tile-based platformers seem to be everywhere on Steam! So after some more digging, I saw that many people were using composite colliders, so that after the level is generated, the tiles all merge together into one polygonal/composite collider. However, I've found that this problem still occurs even when using this method, especially near corners. Am I possibly overlooking a simple solution here? This has been giving us grief for months now!
      It's also worth mentioning that composite colliders create another problem within our game world. The blocks within the levels are meant to be damaged upon contact with the ball. However, when these are nested inside an object using a composite collider, none of these collisions fire off any more, essentially making all the blocks in the level indestructible. Is there a way to cycle through all of the colliders inside of a composite collider to check them individually? Any help would be mundo appreciated.
       
       
       
       
    • By RoKabium Games
      Aura enemies – ”Murderia” is a crystal based life form that moves across any type of block at some speed. This creature cannot be killed by digging the block it sits on and therefore it makes the block it sits on impossible to mine. It fires projectiles in all directions if it feels threatened so kill from afar.
    • By srphfthnd
      Hello, I apologise in advanced I'm not really good in English. I'm just new here and I don't know how to start. I'm a fourth year IT student and want to make my favorite old game into mobile game. The game I want to create is base from mmorpg Ran Online which was shutdown 3 months ago. I deeply in love with this game and I want to make it into mobile but I have no idea where to start. I heard about how to reverse engineer the game and create it by using Unity software. I also try to read other forums regarding about making mmorpg in mobile but they just gave me a vague general answer. Please help me I want to know where I should start in this project. I really want this game in my pocket and to be back. I'm not that good but I have knowledge in Java and C++. Any help will be much appreciated. 
    • By Ruben Torres
      You've optimized all of the low-hanging fruits of your game. Except that you didn't. You missed a sneaky, non-so-obvious spot: optimizing your Unity Scene Hierarchy.
      [The original entry with its formatting can be found at Unity Optimization: Your Scene Hierarchy is Robbing you Performance]

      What's the crack with the hierarchy now?
      I want to show you something.
      Launch Unity and open your game project. Then, run your game on your target device and attach the Unity Profiler to it. Record a few frames during gameplay.
      In the Unity Profiler, look for the following unpleasant profiler markers:
      UpdateRendererBoundingVolumes Physics.SyncColliderTransform TransformChanged​Dispatch You didn't find any?
      Keep looking. I'm sure you'll find at least one.
      They'll spawn when you're about to give up. As soon as you mouse over the close button of the Profiler, they'll show up.
      Found them already?
      If so, it's your lucky day.
      I discovered those in my previous project as well and I learned how to land a final blow to them.
      I know the evil behind them...
      Do you want to know the performance secrets of Unity Scene Hierarchies?
      Quick Navigation (opens in a new tab)
      Level 1 Developer: A Typical Unity Scene Hierarchy
      Level 2 Developer: An Optimized Unity Scene Hierarchy
       The Gamedev Guru's Golden Rules of a Clean Unity Scene Hierarchy
      Level 3 Developer: The FAP Hierarchy Tool
       The Gamedev Guru's Hierarchy Score

      Level 1 Developer: A Typical Unity Scene Hierarchy
      I still remember the first Unity project I worked on, just slightly over a decade ago.
      I was not sure what the difference between game objects and components were.
      But that didn't matter. I created games anyway.

      Deep Unity Scene Hierarchy
      Was it uncommon to see a messy unity scene hierarchy like this?
      Actually, yes. Because it used to be worse than that.
      Interestingly enough, you can get away with this kind of hierarchies most of the time.
      But you'll suffer. You'll pay the price later on.
      Luckily, before I started developing games professionally, I learned to appreciate more structured hierarchies.
      A great scene hierarchy structure can be your best friend. Structure makes development and collaboration much easier.
      It doesn't have to be the best, whatever that means. It's enough for it to be good.
      But bear with me here. This is important.
      Having a cluttered unity scene hierarchy is dangerous and will get you into trouble. This is so because it's highly unlikely you'll directly notice its side effects.
      There'll be a creepy ghost chasing you, pulling you back, slowing you down. Sometimes you think you hear something, but when you look back, there's nothing. So you get used to walking slower.
      I learned to diagnose these side effects over the years. And the main problem is that the side effects of a messy unity scene hierarchy are not obvious to spot.
      You'll see the profiler and wonder what some markers mean. Their names are often cryptic... what secrets do they hide?
      The only thing you can be sure of is this:
      Mysterious markers tell you something's worth investigating
      When you and I talk about structuring your scenes better, we usually discuss increasing clarity and reducing maintenance cost.
      But performance? Just like my cat gitignores all the toys she has around my flat, everybody forgets about performance when it comes to the Unity Scene Hierarchy.
      Let's analyze the previously shown unity scene hierarchy. It contains 2,000 rotating spheres nested on top of each other.
      What does the profiler say about it? Look, don't be scared.
      Unity Scene Hierarchy Optimization-Deep-Hierarchy Profiler Overview
      That's pretty bad for a simple prefab and a rotation script applied to a built-in sphere.
      As you can see, Physics.SyncColliderTransform and UpdateRendererBoundingVolumes are taking a huge portion of your frame budget.
      But let's not stop analyzing there, because I'm quite curious about this case.
      Let's dig further. I hope you saved some 4G data this month for this impressive image.

      Unity Scene Hierarchy Optimization-Deep-Hierarchy Profiler Details
      Here lies the key of the article.
      Unoptimized hierarchies causes two BIG problems in Unity.
      Deep hierarchies do not allow the job system to work efficiently in parallel. Nested hierarchies cause bottlenecks in several subsystems within Unity. Remember my words...
      Because this applies to all types of dynamic objects and especially user interfaces.
      In case you're wondering, I own a Threadripper with 16 physical cores and 32 threads. Do you know how many am I using effectively in this project? Just one.
      There're so many ways to say the same: the performance of your game will suffer. And by trying to fix this mess by following your gut feeling based on those mysterious names, you'll start to age blazingly faster.
      What would a Level 2 Developer do with 2,000 objects?

      Level 2 Developer: An Optimized Unity Scene Hierarchy
      A Level 2 Unity Developer knows that parenting transforms comes at a price.
      The Level 2 Developer also knows this price is paid in milliseconds of CPU time. Or, similarly put, it is paid in hours of overtime spent by the developer chasing this up.
      Ask yourself: do you have enough CPU budget to pay for this expensive hierarchy?
      From which area of your game are you subtracting those milliseconds from?
      Will your game bombard the player with less and less flashy particles? Or will you cut the number of city invaders your player will have to defend from?
      Hopefully, you'll do nothing of these two things., but rather...

      The reason complicated parenting steals resources from your game is simple:
      Each transform modification affects its children and potentially its parent and siblings
      Unity recalculates a lot of thingies for you when you change an object's position, rotation or scale.
      This process is transparently done for you, so you can focus on developing your game. That is great, but the price to pay for it becomes astronomical if you're caught off-guard.
      The solution?
      Keep it simple, adhere to...
       The Gamedev Guru's Golden Rules of a Clean Unity Scene Hierarchy
      No more than 50 total child elements per game object No more than 4 levels of depth in any game object Isn't that simple?
      A Level 2 Developer will keep their unity scene hierarchies as flat as possible.
      Look below. Same amount of objects, this time structured under a flat hierarchy.

      Savings are huge, I see.
      But doing this is easier said than done, right? Detaching and destroying relation(ships) between objects is a laborious, error-prone and time-intensive task.
      What would a Level 3 developer do?

      Level 3 Developer: The FAP Hierarchy Tool
      A good Unity developer gets things done.
      A great Unity developer gets things done faster, more accurately.
      But how is that?
      By using tools.
      Because the only cheap hierarchy is the empty one, there's one key answer you need to answer at all points from your game...
      How complex are your hierarchies?
      You can answer this by methodically analyzing your hierarchies and giving it a score.
      The Gamedev Guru's  Hierarchy Score
       Below 35: Smells of Trouble. RUN!
       Around 50: You might be OK (For now)
       Above 70: Profit! (But don't relax)
      So what are the math formulas I need to calculate the score?
      Luckily, none. I've done this for you.
      I prototyped a tool to automatically analyze and detect bottlenecks in your hierarchy based on The Gamedev Guru's Golden Rules of a Clean Hierarchy.
      I call this tool...
      The Fabulous Advanced Profiling Hierarchy Tool
      Run your game. Get to a point of interest. Open the tool and let it do the work for you.

      The Gamedev Guru's FAP Hierarchy Tool
      Let the tool whisper in your ear the magical melody of an integer that we will call... score.
      Once you know what your score is, you know what to do... Or not?
      Because I'm not giving you only that tool, but also a bonus script to boost your hierarchy problem-solving techniques.
      I'm giving you the extraordinary power of the simple DetachGameObject.cs Demigod script.
      You're not likely to encounter many 27-line scripts that will help you improving performance so much in that small time frame.
      What this does is simple: it'll move your heavy and nested game objects to the root of the scene hierarchy in run-time. That way, you'll profit from having structured hierarchies during development and gain an insane performance advantage during run-time.
      Chances are, you can do this for the great part of your hierarchy that is heavily nested for structure's sake.
      Claim your free bonuses before they become a 404 error (opens in a new tab)
      And after that? Comment below and share your score.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!