Remember those old console racing games we grew up playing on the small CRT boxes? AV-Racer is a 2D top down retro style arcade racing game inspired in style by that nostalgia and in gameplay by the spirit of retro arcaders.

Features

  • CRT style graphics:

Convex screen, curved edges, scan-lines, RGB shift, static, and on/off TV effects are emulated to chase that feeling of childhood nostalgia in games.

  • Fast paced racing:

Push will come to shove in this one. Paint the roads with tire tracks and cover your opponents with smoke as you battle for first in a fast paced circuit racing format. Learn the track and memorize the corners to nail your approach. Utilize going offtrack and cutting corners to your advantage and slide ahead the competition.

Race up to 10 drivers, against a challenging AI system. No rubber banding, no handicaps, no artificial boosts, learn the track, take corners right and you will get ahead.

  • 14 different race locations:

Race at 14 different locations with 24 different track setups. Hand crafted tracks with corners inspired by famous tracks around the world. Look out for Easter Eggs!

  • 5 different car classes and championships:

Climb your way from the Junior league to the World Series in 5 car classes. Collect trophies in 5 different championships; Junior, Senior, Professional, Endurance, and World Championship. Progress in the career to unlock car classes and tracks to play in single player and split screen

  • Split-Screen local Multiplayer mode:

Share the crazy action with a friend and compete locally in a Two-Player mode against each other or with AI, using the tracks an cars unlocked in Career.

Devlog: https://wassimulator.com/blog/programming/av-racer/

Recent Activity

Writing menu systems for games can be easily overcomplicated. In this article I go through writing a simple and robust menu system based around functions without using any data structures. The upshot is robust, readable, scalable code that flows logically, produces fewer bugs, and is easy to debug and work with.

&AV-Racer
https://wassimulator.com/blog/programming/av-racer/devlog_6.html

To preserve platform compatibility, I used SDL2 to manage rumble events. However, The functions were too simple and restrictive. So I wrote a rumble event manager to handle custom vibration events over multiple frames for the game, in this article I go over how it's done:

https://wassimulator.com/blog/programming/av-racer/devlog_5.html#
&AV-Racer

SimplyRend is the standalone header graphics engine that runs AV-Racer, in this detailed article I go through how it works. The diagram below sums up the implementation and render algorithm. https://wassimulator.com/blog/programming/av-racer/devlog_4.html &AV-Racer

No idea why I took so long to do it. Anyway AV-Racer now supports Steam Achievements.

You can get it here for like 3 bucks btw: https://store.steampowered.com/app/1978850/AVRacer/

&AV-Racer

After 4 Months since starting this project, AV-Racer is finally now live on Steam with planned release sometime next month! Featuring career championships with 5 car classes and 24 playable tracks + two-player splitscreen with controller support. The game is handmade in C using some libraries like OpenGL, stb, and SDL. If you find it interesting, feel free to wishlist on Steam! https://store.steampowered.com/app/1978850/AVRacer/ &av-racer

I wrote a post explaining how I make the maps and map files for my car game, AV-Racer.

https://wassimulator.wordpress.com/2022/04/15/av-racer-devlog-2-maps-and-the-editor/ &av-racer

Muratori's Pizza also has donuts &av-racer

we got split screen local play. Progress in Career mode unlocks more tracks to be playable in single race and split screen modes &av-racer

Gameplay demo below. cleaned up the UI, created new menus, new effects, game loop . I'm committed to the CRT effect (watch video in Fullscreen), decided on a new name, AV-Racer. At the end of the video, there's a race result screen. &av-racer

Shader work using SimplyRend, I tried this cool shader I found on ShaderToy. 2 post processing passes. Pixelate and quantize, then curve screen and add TV effect. &av-racer

Finally, migrated the game to OpenGL, in the process I created a single header small rendering library for easily getting a project up and running in OpenGL instead of the limited SDL renderer. it uses a couple of stb libraries, and a personal math library I made.

It offers streamlined sprite loading and packing, render layers, custom shaders, a text renderer with simple functions, load, and render. It utilizes immediate mode, and has two basic pipelines for basic shapes and textured quads.

The goal is ease of use, with modularity, and since I always start with SDL2 to get an idea up and running and then struggle with the migration (with migranes) this is a solution.

Particularly proud of this one, here it is: https://github.com/Wassimulator/SimplyRend &av-racer

I finally have a working (handmade) collision detection and resolving system of multiple objects and walls.

It’s a Body Oriented Intersection Negation & Kinetics system. Also known as B.O.I.N.K &av-racer

New AI system that projects a point forward and measures steering accordingly, results in the car following the AI spline very well, instead of waving around as per the previous version.

A difficult problem to tackle in a non-uniform spline based AI is acceleration and deceleration, and deducing the right times to hit the gas and brakes. The problem might blow up to require entirely new AI line organization, either uniform spline sizes, vectors and curves, or corner/straight based AI lines to make the car decide dynamically when to change inputs, as the decision is always based on the upcoming corner and that can be anything really. Being a vague problem, and also being unnecessary to make a dynamic model in a game that uses premade tracks, I ended up tackling the acceleration deceleration problem by just recording relative speeds at every nodes myself once, and then saving the values in the track metadata file. The AI then adjusts gas and brake accordingly, the results are pretty good as demonstrated in the video.

I also discovered through testing that adding a scaler to all of those values made the AI faster or slower without any loss in accuracy (up to a point. at some level the car gets too fast to make the corners). The speed points relative to each other was the determining factor in performance and not the exact speed values in a node per se. The car now adjusts speeds dynamically. This will make difficulty levels and driver performance difference much easier to design.

Now as you can see, the car is whoppingly fast around the corners, and the AI now beat my own record with the controller in lap times, and the system was deterministic enough to get accurate reproducable lap times up to a 100th of a second in lap time accuracy.

Randomness and overtaking systems should be easeir to make now by adjusting next AI node locations within a limit &av-racer

***Finally ***got the collision system to work properly without clipping bugs.

The challenge was resolving collision relative to what side of the wall the car was, determining a "right" side was also dependent on how the walls were created in the editor (clockwise or anticlockwise stacked nodes). The second challenge was resolving the angular velocity and linear velocity vectors in a way that makes sense, the more steep the attack angle, the stronger the change in these velocity vector directions should be. If a scaler wasn't isn't there, the car would bounce off the same regardless of how fast it attacks the wall, which looks unnatural.

with this in place, AI cars come next.

&av-racer

Editor finished. using the metadata drawn in it, I could determine collisions with walls (collision resolving still needs some work) and whether the car is on or off the track, this allowed to make tarmac grippy and non tarmac surfaces drifty, and helps determine the car's relative position on the circuit. with this information we could simulate tyre wear on different surfaces. Here's a lousy lap to demonstrate: &av-racer

two control modes, simulation and arcade, they're vastly different, arcade has automatic shifting and is simple enough to be played with a keyboard, the former requires delicate analog input, it simulates individual tyre forces, grip and traction, while arcade is just fun to drive with no hassle. also finally got to making a better track, and added a minimap, right now I'm making an editor to easily create track metadata like walls, surface info, and AI nodes and waypoints. The next step is to get the editor and parsing to work (more tedious than complicated) then we should be able to start working on a gameloop

&av-racer

Added tire spin and loss of traction, oversteer, weight transfers, Gforces and a G-meter &av-racer

Implemented engine sounds using OpenAL, added gears, RPM, torque curves, and engine braking, and added a local split screen multiplayer mode. &av-racer

2D Car simulation collaboration with @archon. Here we simulate the tyre forces and solve for the sum of longitudinal and lateral forces based on the slip angle and using Pacejka's formula on each of the four tyres. (There is surprisingly sparse material online on how to simulate this so we had to come up with our own interpretations) torque, track resistance, and brake force applied on the tires determine the final velocity vector of the car, and using the coefficients on the top corner, one could adjust to simulate different road and tyre conditions, and car performance. Currently working on a local multiplayer mode (Online maybe too) and up next is gears and torque curve simulation. &av-racer

Work in progress simple 2D car game together with @archon we're (still) working on simulating car and wheel forces. &av-racer