Git Product home page Git Product logo

tnfs-1995's Introduction

tnfs-1995

Recreation and analysis of the physics engine from the classic racing game from 1995.

This project aims to reconstitute/reverse engineer accurately as possible the physics formulas used in the game, decompiled from DOS, PSX and 3DO binaries, and manually rewritten to C.

Features

  • 2D car driving simulation, with a 2-wheel tire grip model;
  • 3D box rigid body collision physics;
  • Engine, clutch and transmission simulation;
  • AI opponent driver;
  • Now supports loading TNFSSE "TRI" track files, or it will auto generate a random track, if not supplied;
  • Fixed point math;
  • No assets required;
  • Basic wireframe 3D graphics;
  • SDL2/OpenGL 3D in pure C.

How to play

  1. clone/download repo;
  2. install libsdl2-dev;
  3. make
  4. run ./build/tnfs [<optional_track_file.tri>]

Use the keys to drive:

  • Up/Down - Accel and brake
  • Left/Right - Steer
  • Space - Handbrake
  • A/Z - Change gears
  • C - Change camera
  • D - Crash opponent's car
  • R - Reset car
  • F1 - Turn ABS on/off
  • F2 - Turn TCS on/off
  • F3 - Change traction (RWD/AWD/FWD)
  • F4 - Change Auto/Manual transmission mode
  • F5 - Change cheat modes/easter eggs: 1. Crashing Cars (3DO); 2. Rally Mode (PSX)

Resources/Tools used

tnfs-1995's People

Contributors

marcos2250 avatar andygura avatar

Stargazers

Rafał Kuźnia avatar  avatar  avatar  avatar Jonathan Payne avatar

Watchers

Lucian avatar  avatar

tnfs-1995's Issues

Verge improvements

First of all, thank you for this great project, really looking forward to see it finished. Potentially it can give a huge boost to at least two projects: OpenNFS and mine TNFS web

I investigate TRI format at the moment, and at least one newly found field can be used for your project: https://github.com/AndyGura/nfs-resources-converter/blob/main/resources/README.md#roadsplinepoint please check field verge_slide, which is not in use yet in your code. And can I somehow reach out to you? I can help with parsers for files, and maybe you can help me build your project for webassembly and use in my NFS web project?

Thanks

Can I use this project?

Hello again @marcos2250

I don't see any license assigned to your project, so just wanted to ask: can I use your project as physics backend for my project The Need For Speed Web ? I'm going to implement wrapper which builds your code to WASM and creates bindings to the engine so it will work in browser. And for sure I will put a link to your repo there as well. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.