Skip to content

Replay Doom by providing keyboard input from a text file

License

Notifications You must be signed in to change notification settings

ggerganov/doomreplay

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doomreplay

Replay Doom by providing keyboard input from a file and optionally storing the replay as a video file

Forked from: https://github.com/ozkl/doomgeneric

Build

cd doomgeneric
make -f Makefile.dr

Notes

The ability to read a text file with keyboard input has been added. To achieve this, several parts in the Doom source code have been modified - changes are enabled via the DOOMREPLAY macro. The modifications are mainly to introduce an artificial timer in order to make the game not wait for new ticks.

The keyboard input is then pushed to the game as if the player had pressed the keys. The replay can be optionally recorded to an .mp4 file using ffmpeg.

When not recoring frames, the simulation can reach up to several thousand game frames per second - i.e. it is really fast! This allows to simulate huge amounts of input. The game is fully deterministic, so every time the result will be identical.

Input

,   - new frame
x   - escape
e   - enter
l   - left
r   - right
u   - up
d   - down
a   - alt
s   - shift
p   - use
f   - fire
t   - tab
y   - yes
n   - no
<   - strafe left
>   - strafe right
0-9 - weapons

Examples

Complete level 1

Here is what the input for completing the first mission looks like: https://github.com/ggerganov/doomreplay/blob/master/input/solve1.txt

And here is the cmomand to execute it:

./doomgeneric -iwad doom1.wad -input ../input/solve1.txt -nrecord 3500 -framerate 35 -render_frame -render_input -render_username -output solve1.mp4
vlc solve1.mp4
solve1.mp4

Turn 360

./doomgeneric -iwad doom1.wad -input ../input/turn.txt -nrecord 3500 -framerate 35 -render_frame -render_input -render_username -output turn.mp4
vlc turn.mp4
turn.mp4

Straferun SR40

./doomgeneric -iwad doom1.wad -input ../input/sr40.txt -nrecord 3500 -framerate 35 -render_frame -render_input -render_username -output sr40.mp4
vlc sr40.mp4
sr40.mp4

Straferun SR50

./doomgeneric -iwad doom1.wad -input ../input/sr50.txt -nrecord 3500 -framerate 35 -render_frame -render_input -render_username -output sr50.mp4
vlc sr50.mp4
sr50.mp4

About

Replay Doom by providing keyboard input from a text file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.3%
  • Other 0.7%