Skip to content
Filip Gawin edited this page Sep 29, 2018 · 25 revisions

These are lists of stuff to do in OpenRW. They are just examples, the list is far from complete. If you want to work on anything please contact us on IRC first to coordinate work.

These lists are in no particular order (yet).

New features and documentation

OpenRW is far from complete. Some of the tasks which must still be worked on are listed below.

Revise input

For reference this is how GTA’s input system works in general: The game keeps two internal controllers (CPad) resembling PS2 pads that can be updated from physical game pads. They store the state of the last and the current frame. !oldstate.button && newstate.button is used to find pressed buttons. The analogs are in range -127 to 127. Everything is stored as a short (clarification necessary: Is “everything” a list of flags for each button? Are buttons analog?).

Keyboard and mouse are mapped to these CPads depending on player mode (on foot, in vehicle, etc.). All subsystems that require input query the controller state on update. Functions are used to abstract the user’s mapping. Raw keyboard and mouse states are available as well (e.g. for PC-specific controls). The event handler updates a temporary state from the events, CPad::Update and related functions then copy the new state to the old state and the temporary state to the new state. Input in OpenRW used to be hardcoded to SDL2 functions. Some abstraction has been done by danhedron lately. However, the Script functions do not have access to the “CPad” data in OpenRW yet. Gamepads are also not supported in OpenRW yet.

Create a list of all GTAs and their engine / data file formats

(Contact @JayFoxRox for more information!) This has been partially done but it's still far from complete. danhedron has a seperate list for hardcoded data

  • Merge these lists in a way that makes sense
  • Fill in all data
  • Add all releases to the list

AI Behaviour

  • Determine which opcodes invoke AI (e.g. 029D, 0194, 046B)
  • Implement interface to support AI opcodes

Pedestrians

  • Improve wandering behaviour

Cheats

See #232 for more info and implement those stubs

Radio-Stations and Sound-Effects

  • Play radio
  • Allow switching radio station
  • Play vehicle motor sound effects
  • Play scripted sound effects
  • Play ped sound effects
  • Play audio from chase scene in intro

Chaos level / Wanted level

  • Implement chaos level
  • Setters / getters for the wanted level
  • Implement all chaos level events
  • Implement police for each wanted level
  • Implement all related script functions

Particle systems

  • We don't currently implement any particle systems which will be necessary for a lot of ingame effects

Fire

Required: Scripted fire, Projectile Fire Optional: Burning peds, Temporarily burning Vehicles, Vehicle damage visible burning, Flamethrower fire

  • Document fire behaviour (scheduled tasks for burning characters / burn duration)

Explosions

  • Scripted explosions
  • Projectile explosions
  • Exploding vehicles

Race Checkpoints

They look like this. Race checkpoints are currently not drawn? This is probably very easy to add: We have to reverse engineer the color, texture name and orientation of the billboards (model name?). Race checkpoints also have to be integrated in the script module.

Hardcoded special events

  • Medic behavior
  • Fire-truck behavior

Hardcoded vehicle features

  • Sirens for emergency vehicles
  • Firetruck spray / water cannon
  • Rhino turret
  • Yardie hydraulics
  • Taxi gives money
  • Police vehicle gives weapon
  • Ambulance gives health
  • Enforcer gives armor
  • Predator machine guns

Environment

  • Implement correct handling of in-water status and physics
  • Make water a hazard

2DFX system

  • Implement the 2D effects such as streetlight glow etc

Savegames

We are currently not able to save the game from OpenRW and there are remaining problems with loading GTA3 Savegames.

  • Loading all savegames
  • Storing game progress to savegame

Shooting / Weapons

  • Projectiles (Grenades / Molotov)
  • Flamethrower
  • Rocketlauncher
  • First Person Weapons / Mode
  • Melee weapons
  • Fistfighting
  • Running while shooting
  • Third-person camera bullet shooting weapons

Tool to collect opcode information

(Contact @JayFoxRox for more information!) We need a tool to collect information from main.scm. There is already a proposed sheet to display collected data and a tool to extract some data from the script based on gta3sc (by JayFoxRox, still closed source)

  • List of threads and what starts those threads (can only be automated partially!)
  • Which thread uses which opcode?
  • Tool must be cross-platform (maybe gta3sc based?)
  • Write test suite against GTA III for opcode behaviour

Script opcodes implementation for nearly all missions

Various missions don't work yet

  • Test each mission
  • Report problems as issues
  • Implement or stub missing opcodes

Cleanup

Much of the code in OpenRW is not up to par, it is either poorly designed or brittle. These are the issues that should be fixed over time to improve the code quality.

Remove allocations & pointers

  • Don't allocate memory for AI activity data & behaviour
  • Transition to a hierarchical finite state machine to clean up code around animation handling

Style fixes

(Contact @danhedron for more information!)

  • Code must be reviewed after re-formatting it to make sure its behavior didn't break.

Data Types

OpenRW currently uses inappropriate datatypes for storing data:

  • Colour data is stored as a vec4 in places (e.g. ParticleDat::colour) where this level of precision is un-needed and simply complicates conversion from 32 BPP colour data.
  • Game Clock time is stored as seconds, which will suffer from precision issues as game play time increases.

Camera aligned Billboard rendering

Billboards are currently stretched when viewed from the top

  • Document behavior of GTA3
  • Fix the implementation

ifstream Usage

  • long term: determine how to handle packaged & unpackaged files