As a speedrun enthusiast and programmer, I'm about to start this project. Since we can't perfectly emulate the PC platform, the only way to TAS a PC game (
atm) without desyncing (
memory hacking, script writing...) is adding TAS functions into open source games.
How does it works [the TASablegating]:
- Downloading an open source video game's source code (
for example: Quake)
- Adding TAS related functions like printing out memory values (
enemy HP), advance one frame, reading input from file, etc.
- Build source code and release executable file (
the game's main exe file)
Open source video game means that the game's source code can be downloaded from the internet and you can modify it (
of course the engine license is not permits to "do what you would like to"). For example, downloading Quake source code to make a new ability like double jumping from Unreal Tournament. There are many cons for releasing a game's source code. For further info, please read this page:
http://en.wikipedia.org/wiki/Open_source_video_game
Some open source video games that I recommend to make a TAS speedrun of it (in random order):
NetHack, Wolfenstein 3D,
Duke Nukem 3D,
Doom, Heretic, Hexen I /
II,
Quake I / II, Abuse, Rise of the Triad, 0 A.D., Tyrian, Neverball, Tux Racer, Beneath a Steel Sky, Shadow Warrior,
Alien versus Predator, MechCommander 2, Marathon 2: Durandal, Star Control 2, Blood 2, No Gravity, Chromium B.S.U.
[
bolds: SDA has runs of it]
There were already TAS speedrun of Doom I and Doom II, so it's definetly works.
For more open source video games and informations about the games I mentioned ->
http://en.wikipedia.org/wiki/List_of_open-source_video_games
http://www.classicdosgames.com/misc/source.html
http://en.wikipedia.org/wiki/Video_games_notable_for_speedrunning
http://en.wikipedia.org/wiki/Category:Commercial_video_games_with_freely_available_source_code
http://www.hotud.org (google search)
And
how to make a TAS for these games:
Every game have different source code, and needs different movie file.
Here is an example: Quake from Id Software.
After downloading the source code of Quake, I open it in the supported ide (
for quake: vc++ 6.0) and find the most crucial program code parts like: hostframe (
which runs in every frame), input handling, and then find tas related memory values (
i mean boss hp and other things), and write frame advancing (
for first: only forward.) and other options.
Movie file example:
Quake has 18 actions and the mouse. I didn't read the whole quake source code, but as far as i saw it, the movie file will contains bytes like this:
0xFF 0x01 0x00 0x02 0x00 0x01 ... [more 16 bytes] and 0x00 then mouse coordinates (or whatever quake uses).
So what's this:
0xFF - new frame
Next 18 bytes: the corresponding actions (for example the first byte: +attack, next one: impulse 10 next one: +jump)
0x00 -> nothing
0x01 -> pressed
0x02 -> released
so 0xFF 0x01 0x00 0x02 0x00 and more 0x00 means that you pressed +attack and released +jump.
And I would write a simple replay function that would read these bytes from the file and giving these inputs in to the quake's original input handling function. And if the game wouldn't have a "startmovie" or "record" or other things, I could simply write a function to make a screenshot for each frame, and then you just simply run bmp2avi software or anything. That's all.
Now what about TASing a modified (
this way, to make it TASable) open source video game...
Desync:
Making the very same (
frame by frame) input in to the original open source video game and in to the TASableted would have exactly the same outcome. Desync can't happen, because the input will be played back from frame to frame. I think only multi threading would be a headache. And of course you need a PC that mets the minimal system requirements to play the game. I don't think that a PC game would use such a complex random generator that would be changed cause there's other functions or because a hostframe code part makes more CPU cycles...
Viewing the TAS movie:
3D games TASes must avoid motion-sickness. Of course, speed is more important. But I think you know what I'm trying to aim.
Various possibilites by editing the source code of a video game:
- Making a "buttons pressed" GUI like the one in one of the Super Mario World speedrun (that synchronizes buttons to the music)
- Make comments on world brushes (
just to mention a possibility, of course i wouldn't recommend this)
- Make camera effects for the final movie (
like quake speedrun)
- Make internal subtitles or anything
- Really anything.
The only thing I need or anyone who is a programmer is the source code. I wrote Quake for examples because I already own it.
Oh and two pros for open source video games [there's more actually]:
-You can read nearly everything, how the game works (
finding bugs, glitches, avoiding frictions, etc)
-TASes of these games will works like that they are an emulator and they replay the submission movie just like someone would play it.
So my only question would be this:
Anyone interested in it, making a speedrun for an open source video game?
Finally, sorry for my sluggish and lousy english. And I also tried to NOT make a long post. I failed.
[edit: just text formatting + desyncinfo update + updating the games section after reading warp's post]