The other thing you can’t do with a replay is car-to-car collisions. The simple rules I adopted were to never fire weapons at the human player (ie, weapon usage is not recorded in the replays), and if a replay car gets hit, to simply spin it around in a straight line along its direction of travel until it falls off the track edge. It does not contain data saying how the human player reacted to being hit by a weapon at any random point. This poses a problem with the replay technology, as a replay is by its nature an asynchronous event. Even better, you can short-cut them in cunning ways using your car’s jump ability, which adds a little depth.Īnother requirement from the film is the use of car-to-car weapons. In a 2D game you’re limited to how far you can recreate these effects, but the tracks certainly do have these stunts in them, which is a nice effect. There is no ‘best’ car, although there tends to be a couple per track that people end up using predominantly over the others.Ī big part of the Speed Racer film was the twisting looping jumping corkscrewing tracks. The model is also very tunable to different car styles, so some are fast but have little grip, some have too much grip and are hard to control, some are ballanced and so on. Likewise, slow speed turning works better this way too. Rather than programming in effects like sliding if you turn too fast, or if you land a jump facing sideways to the direction of travel, it just naturally falls out of the physics model. This is reasonably analogous to the way a real car turns in many ways, and leads to a decent feel. When the car turns, this virtual tyre turns with it, causing the car to grip and change direction. The cars have a single giant virtual tyre that they run on, which resists sideways motion and promotes forwards motion. The URL presented here allows you to have all 8 opponents switched on, as it’s going to be pretty low-load from this website.Ĭar handling was a major area of improvement in this game over previous racers I’ve built. We had to trim back the number of replays sent to the client to just 4, then 2, then none as the load increased.
Speed racer flash game download#
The remaining problem was that each play of the game required about a 1mb download of replay data from the server, which was very bad for bandwidth when the number of plays started to climb dramatically. I’d have liked to have compressed the strings, or base-64 encoded them or similar, but it just wasn’t feasable. There’s very little encoding, as I found that simply processing the raw strings was enough of a task for Flash, let alone processing an encoding on top of that. So, a replay consists of a great long string of car coordinates etc in a text format. AS2 doesn’t handle binary data very well except in pre-given formats that are delt with internally like jpegs, sounds or SWFs. The big problem with storing and serving replays is that there’s a lot of data. This strategy really worked for this game, and everyone gets opponents who play roughly at their level – and some who are faster that they can work towards beating. There is a par time over which your score isn’t recorded to avoid skewing the results towards people who just leave the game running forever, but other than that it’s a level playing field. That’s self-ballancing – the range of opponents you meet is determined by the actual range of skills out there, from good to bad. They are picked at random, but in a skewed way so that you play against a mix of the best, worst and mediocre players out there. Then, when a new game is started, the server puts you in a random grid position and sends out 8 replays – one from each remaining grid slot. It feels unfair, and it’s not good enough! Rather than build a crappy AI for this game, I came up with the idea of recording people’s gameplay whilst they were racing and storing them on the server (stored by their starting position and overall performance). In a lot of games, the computer AI just bulldozes through your car sticking to its pre-programmed lines like a limpet.
Speed racer flash game drivers#
Even the big name consold games don’t get it right, and have either unrealistically good AI drivers or comically bad ones. I was determined to make a really good Flash racing game, with arcade but partially realistic handling, fun tracks, weapons and a little bit of a multiplayer twist.ĪI in racing games is hard. Can you beat all the other players, which are recordings of other real human drivers?Īh, a chance to do a pure arcade racing game, with actual racing cars rather than trollies or reindeer or airport baggage karts! Brilliant. Hit spacebar to deploy your car’s weapon, and shift to launch into the air. Use cursor keys to drive in this high-speed racing game.