J-Factor
May 14 2006, 05:59 AM
Name: Replay
Category: Engine/Example
Size: ~8kb
Version: 
(Registered)
Download Link: Replay v0.1What:Many arcade games include an "attract mode" featuring a recorded demo of gameplay. Replay demonstrates easy and efficient replay/demo recording and playback.
There are two files included:
1. Replay v01.gm6
2. replay.rpl
The first file is the Replay .gm6 example, the second is a replay I recorded.
Make sure you read the
Game Information!
Why:- Add an "arcade feel" to your game.
- Record a tutorial for your game.
- Allow people to share replays of your game (as seen in the game "N").
How:User input is recorded each step. To save space, the state of each key is stored in a single bit. As the game records 1 byte per step, 8 different keys can be recorded (how many games require >8 keys?).
Many games also require random numbers. GM's built-in random function cannot be seeded, which prevents its use in replays as there is no way to replicate a series of random numbers. As such, a pseudo random number generator has been included.
How big can a replay grow?:The replays generated by this engine are extremely small.
1 Byte is recorded per step. Using a general value of 60 for FPS:
PRE
1 * 60 = 60 bytes per second;
60 * 60 = 3600 bytes per minute;
3600 * 60 = 216000 bytes per hour;
216000 / 1024 = ~210kb for a 1 hour long replay!
Although, I doubt anyone will record a replay for that long.
Credits:Pseudo Random Number Generator - Eric Burgess aka
EricDBThanks.
Alex
May 14 2006, 07:03 AM
very nice! Oh i see how you've done it. Very smart indeed! Not sure if it will work on all games though.
How about FPS games which use mouse look?
J-Factor
May 14 2006, 07:27 AM
You're right - this would not work for all game types. For that I would have to save each frame as an image, which would produce massive filesizes. I initially meant for this system to be extremely compact, allowing people to share replays easily (or perhaps make a database of replays).
However, I may make a minor update which also records the mouse's position. That would add an extra 4 bytes per step which shouldn't matter too much.
Alex
May 14 2006, 11:18 AM
Yeah i think anything could be made using this technique. Hope to see some more versions
dadio
May 14 2006, 01:04 PM
Very nice indeed. Easy to use too. Good job!
softhunterdevil
May 14 2006, 05:41 PM
May be you make a lib for it...
I have the idea to record each step of an object
teej
May 14 2006, 06:55 PM
cool! another Jfactor creation
it seems like everything is well coded.
the ds_queues are put to great use in the scripts
Kapser
May 14 2006, 08:52 PM
This is seriously great engine. I got nothing else to say that good job for this extremely fine work, this could be very helpfull to many people!
masterm
May 14 2006, 09:02 PM
hahaha the judge is here 10/10(no gliches)
J-Factor
May 15 2006, 08:10 AM
Thanks for the encouraging comments guys. I'm glad this is up to the calibur of my previous works.
QUOTE (softhunterdevil)
May be you make a lib for it...
I haven't dabbled with Lib Maker before and I might not for some time. Although, I welcome anyone else to take a shot at it!
Bowex
May 15 2006, 11:53 AM
yay.... someone already made this before, but far far in the past....and this one is much better =)
Nice engine !
lalle_calle
May 15 2006, 05:32 PM
the only problem is that you have limit the numbers of keys with can esely be changed but still
very nice 7 of 10
J-Factor
May 16 2006, 07:10 AM
QUOTE (lalle_calle @ May 16 2006, 03:32 AM)
the only problem is that you have limit the numbers of keys with can esely be changed
Actually, the number of keys allowed by the system has to be a constant value. I choose 8 because it is the smallest value (1 byte) and
should accommodate most games. How many games use more than 8 keys?
Besides, with enough technical know-how someone could easily modify the number of bytes saved to increase the number of keys (e.g. 2 bytes = 16 keys).
Thanks.
gamereality
May 24 2006, 07:46 AM
It doesn't work. After a number of errors such as 'cannot read binary file', 'cannot read byte' and the last recurring error 'Division by zero', I had to abort it. Also, when you save your recorded RPL file, and try to load it, it doesn't appear. You have to type in the filename.
gmuser
May 28 2006, 10:06 PM
I had that problem to. it doesnt save the files with an .rpl extension.
Cerafem
Oct 11 2006, 08:26 PM
don't write me off as a noob, (b/c im not) but how do you change how many bytes it writes to?
I could figure it out myself (im a good learner), but i dont usually have the time.
Big J
Feb 5 2007, 03:15 AM
WOW! This replay engine is awesome!
10/10.
Here, try this for automatically adding the file extension:
CODE
var nm, ext;
ext = ".rpl";
nm = get_save_filename("Replays *"+ext+"|*"+ext+";","");
if (nm != "")
if (!string_pos(ext,nm)){
nm += ext;
}
if (file_exists(nm)){
if (show_question("Replay File Already Exists. Overwrite?")){
rp_save(nm);
}
}else{
if (nm != ""){
rp_save(nm);
}else{
show_message("You cancelled. Replay not saved.");
exit;
}
}
if (!file_exists(nm)){
show_message("Unable to save... location is read-only or disk is full.");
}
Nonsense_Productions
Feb 5 2007, 03:31 AM
i was thinking of making something exactly like this. Well you beat me to it
Mice
Oct 11 2007, 02:48 AM
No!!
I just got ahold of J-Factor's transition engine, and it's simply beautiful, but it seems his site is down and I can't download this! Could someone send me a working link?
Soup42
Oct 11 2007, 02:53 AM
The link is down!
Orc Leader
Oct 11 2007, 03:00 AM
The last post was Feb 4 2007, 11:31 PM, besides the two you guys made.
Aertcz
Oct 11 2007, 03:42 AM
The one time I find something useful, the link is down

Seems very good as I have long sought a replay engine. If it does what its supposed to do, as you state, Much props given.
210kb for an hour long

Better than trying to make a video for an attract mode which can be up to 5MB per video.
Mice
Oct 11 2007, 04:48 AM
QUOTE (Orc Leader @ Oct 10 2007, 07:00 PM)
The last post was Feb 4 2007, 11:31 PM, besides the two you guys made.
yes, i know that, but i was wondering if someone still had it so i could get it somehow, ill pm j-factor (if he's still active on the forums)
Orc Leader
Oct 11 2007, 02:28 PM
QUOTE (Mice @ Oct 11 2007, 12:48 AM)
QUOTE (Orc Leader @ Oct 10 2007, 07:00 PM)
The last post was Feb 4 2007, 11:31 PM, besides the two you guys made.
yes, i know that, but i was wondering if someone still had it so i could get it somehow, ill pm j-factor (if he's still active on the forums)
"Last Active 25th August 2007 - 04:10 AM"
CJizzle01
Oct 11 2007, 03:58 PM
NOOOO!!!! THE LINK IS DOWN!!!!!
Kuchiki
Oct 11 2007, 04:07 PM
Please upload if anyone still has this, I'm quite interested in this. Does it also work if your game involves random numbers?
Mice
Oct 12 2007, 02:35 AM
i believe it does, but it uses a different system to generate them
buribalazs
Oct 12 2007, 10:07 PM
I need this too! I want to make a tutorial for my game. Does anyone know if the author is still hanging around? I am going to start and make my own version while he returns

It shouldn't be too hard.
I think you can use the built in random number generator now (in gm7)
there's a command: random_set_seed() if you set this to an exact value, tha game runs the same every time even with generating random numbers. sooo. If you open a file, store the seed, than the bytes he describes...it should work exactly the same all the time. Please PM if you have this!
Mice
Oct 12 2007, 11:13 PM
yes, pm me too. this would be beyond amazing
Kairos
Oct 12 2007, 11:24 PM
J-Factor seems to have disappeared recently. Anyway,
Mirror:
http://www.willhostforfood.com/files/79869/Replay.zip
Mice
Oct 13 2007, 01:28 AM
thanks!
buribalazs
Oct 13 2007, 08:51 AM
This is some life saving s**t
hotshotscott
Oct 13 2007, 10:01 AM
WOW this is amazing! Why did this ever stop??!!??
Scotty
Kairos
Oct 13 2007, 06:02 PM
It never stopped, that's why he put in Creations.
True Valhalla
Aug 9 2008, 03:32 AM
THANKYOU FOR THE NEW MIRROR!!
Awesome.
agustusx
Aug 12 2009, 04:15 PM
anyone have a current link to this? the hostforfood link doesn't seem to work for me
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.