[SOLVED] 3.3.0.1: Other players' sudden appearance in recorded tape!

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

[SOLVED] 3.3.0.1: Other players' sudden appearance in recorded tape!

Post by RAP »

Critical bug report! Even after the Rocks'n'Diamonds forum has returned, I still have found yet another bug in my livelyhood of finding bugs; I didn't bother to update the game to the newest version yet because the forums are back.

This bug has ruined by resuming playthrough Ace Mine 2 levelset from the Emerald Mine Club section; it has ruined 5 recorded tapes, Level 29 through 33. I just found this when I checked the tapes every now and again to make sure they were solvable (and I wanted to watch how I did after a long break from playing Rocks'n'Diamonds - more particularly, playing Emerald Mine-engine style levels).
  • It all started when I started using the alternative key bindings for snap and action buttons, or more particularly, Player 2 keybindings. Hmm, I thought: "Did Holger just made it easy for me to use multiple keystrokes for the same actions?" I know for a fact that there are a few games that do that, multiple rebindable keys. However, digging up the older posts, it's a feature.
  • It wasn't until I watched the tapes with this effect, with Player 2 appearing and completely hindering my movement input; it was where it broke the tapes and rendered my proof of solving the levels null.
How did suddenly appear on the tape when I solved it without appearing? I had to investigate a bit on how this bug was reproduced.
  • The funny (and irritating) thing is that team-mode wasn't enabled in the Setup section.
  • The bug is reproducible not only in the Emerald Mine engine, but also in R'n'D engine (and I assume other engines).
  • In the level editor, put all the four players () in just one empty level, and have an Open Exit.
  • When playing the level in single-player mode, only should only appear. Control the first player with only 's control keys; go to .
  • Watch the tape of going into ; it should be recorded the way you intended.
  • Replay the level again, this time, by using the other three players' control keys (only snap, and action key, not movement for the moment), and go to the exit.
  • Watching the the new tape, you can see that suddenly one of the three other players appeared! Those players didn't appear when you just played the level by yourself in single player! This occurs if you press even one key of one of the three players. If 's control keys is pressed during the attempted recording, will appear when it saved in tape. This also applies to and . Thus, as a result, the other three players' sudden appearance taints the tape. Their appearance prevents the player from completing the level via the tape.
  • Retry the level again, this time by using the other three players' movement control keys, and enter the exit once more.
  • This is where things get weird: and one of the other three players move at the same time. If you use 's control keys to move down, both and move down together. This also applies to and .
  • It gets even weirder! When exits the level, the other three players disappear!
This is a horribly bad bug because of the taint of tapes that are supposed to be proof of level completion, and the other players' sudden appearance, in a single-player mode game, ruins it. I feel bad for the potential someone out there playing Rocks'n'Diamonds who has to replay those previously solved levels with the correct tapes if this bug was left unfounded. Speaking of that, is there a possibility to fix my five tainted tapes in any way, removing the additional players' sudden appearances?

Note that, regarding this ugly bug, it is possible that I haven't explored other possibilities yet (in spite of writing up detailed instructions of reproducing bugs), what if Player 1 isn't in the level alongside Player 2, 3 and 4? Why not mix and match?
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by RAP »

I decided to upload a tape of this bug occurring since there are no responses in this bug thread. This tape is for the EMC levelset The Adventures of Mr. B Part 1 on level 65. I just found this one out of the blue when I'm working on uploading the proof tapes for another thread in this forum. This one is as early as 2010 June 03!
065.tape
This tape file is proof of the bug being reproduced. It is for the EMC levelset: The Adventures of Mr. B Part 1, level 65.
(4.54 KiB) Downloaded 920 times
I have also uploaded the original tampered tape files, the 5 levels (levels 29-33) from the EMC levelset Ace Mine 2. I forgot that the forum has an upload system.
emc_ace_mine_2 borked tapes.zip
This tape file is proof of the bug being reproduced. It is for the EMC levelset: Ace Mine 2, level 29-33.
(7.12 KiB) Downloaded 875 times
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by Holger »

First of all, thanks a lot for reporting this bug in detail -- I really appreciate it. (RAP, I am very glad to have a bug hunter like you, who not only finds and analyzes such bugs, but also describes them very good and makes sure that they can be reproduced, if possible. In many cases, this is the most important part of the work to fix them! :-) )

This is really a horrible bug, and it shows that I apparently did not test the multi-player and multi-input devices stuff well enough. :-o

Unfortunately, there are really a lot of combinations of different parameters that have to be tested:
- levels containing one or more players
- only one or several input devices configured
- only one or several input devices used when playing (also in single-player mode)
- team mode enabled or disabled when playing a game
- team mode enabled or disabled when playing a tape
- different game engines to test
- ...

I have found quite some bugs and problems with all this in 3.3.1.2, especially as the game tries to map the configured input devices to the players available in the level. (For example, input devices configured for player 1 and 2, while the level contains the two player elements for player 2 and 3 etc.)

I think/hope I have fixed things now and made it a bit easier (losing some functionality, for example, when playing multi-player levels, all players in the level now also take part in the game, which may be a problem for levels with 3 or 4 players, but I think this is only a problem in very rare cases (maybe I will fix this at a later point)).

Thanks again for your demonstration tapes, which also helped in analyzing and fixing these bugs.
is there a possibility to fix my five tainted tapes in any way, removing the additional players' sudden appearances
The bugfix alone unfortunately does not heal these broken tapes, and, as far as I can see, there is no way to detect that the wrong, additional player movements in those tapes are there by error and should be removed. But I've added a little piece of code to fix them manually: Just load the tape, press ":fix-tape" (or ":ft") and save them again. This makes them work again, without the need to play and solve the level again.

I will see that I provide you (and any other interested in helping) with a development version of R'n'D containing this bugfix -- do you use the Windows version?

I want to have this bugfix tested and confirmed by somebody other than me before I release a bugfix release of R'n'D for this bug.

P.S.: I've added the tape "065.tape" from above after fixing it as described. It should also work again with the current 3.3.1.2. (Please rename from "065-FIXED.tape" to "065.tape" before testing.)
Attachments
065-FIXED.tape
(2.32 KiB) Downloaded 890 times
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by RAP »

Yeah, it is time consuming to write up the correct words to make sure the info is onto the point and snappy, especially for bugs that I thought weren't even possible (like the recent bug report I've done). That's the best I can do, I can't write code on supplying bug fixes, so bug report writing is the next best thing.

Yes, I use the Windows version, and cool, a tool that helps mend the tape files without me playing the levels again! This is helpful especially for those who had some bad tapes (just be sure to backup the tapes just incase the tool fails). Speaking of bad tapes; earlier yesterday, I checked all the other tapes that I solved for the other thread, and I've been coming up with quite more than a couple of them. I had to manually check them to make sure it each tape was verified: F2, wait for a couple of seconds, hear the "enter exit" sound, Esc, press right for next level, repeat until you see a bad tape being played, record in a piece of paper, repeat. Quite an annoying task! Time could be used elsewhere. Is there any way to automate that task?

As for the fixed tape you provided: Yay, it now plays properly; no hitches! 3.3.1.2!
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by RAP »

Hey Holger, can you fix this following tapes? I was randomly watching my playthrough of EMERALD MINE III (KINGSOFT) and found some of them that has this bug.
014.tape
This tape cannot be usable due to triggering this bug. It is for the EMC levelset: Emerald Mine III (Kingsoft), level 14.
(3.79 KiB) Downloaded 875 times
062.tape
This tape cannot be usable due to triggering this bug. It is for the EMC levelset: Emerald Mine III (Kingsoft), level 62.
(6.25 KiB) Downloaded 945 times
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by RAP »

I'm compiling a tape set for EMC levels I'm going to upload in the other thread when I found another set of tapes.
073.tape
This tape cannot be usable due to triggering this bug. It is for the EMC levelset: Bomb Mine 2, level 73.
(2.41 KiB) Downloaded 917 times
003.tape
This tape cannot be usable due to triggering this bug. It is for the EMC levelset: Bomb Mine 5, level 03.
(4.66 KiB) Downloaded 932 times
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by Holger »

Hi Ryan,

here are the fixed tapes -- sorry that I apparently missed your previous post!

BTW: If you want to automatically check your tapes, put them into a directory "tapes" in the level set directory (just like those sets that contain solution tapes) and execute R'n'D in batch mode as follows:

shell> ./rocksndiamonds -e "autoplay emc_emerald_mine_original_3"

or

shell> ./rocksndiamonds -e "autoplay emc_emerald_mine_original_3 014"

for a single level.

Not sure at the moment if/how this works with the Windows version (it should also work the same there from a command line interpreter); this was the example for the Unix/Mac version.

If you should have sets of solution tapes for whole EMC level sets (if possible), let me know! They would be great for a "best of EMC" compilation! :-)
Attachments
003.tape
(2.38 KiB) Downloaded 791 times
073.tape
(1.64 KiB) Downloaded 851 times
062.tape
(3.17 KiB) Downloaded 909 times
014.tape
(1.58 KiB) Downloaded 841 times
User avatar
RAP
Posts: 317
Joined: Sat Jun 19, 2004 6:44 pm

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by RAP »

Hey, I'm back from being preoccupied a lot. I am able to check the tapes that you sent to me and tested them, they're played correctly! Anyway, I'm close to releasing the tape set of the solved EMC levelsets for that progress topic that I've done so far, I just need this tape to be fixed that I somehow missed during my scanning.
071.tape
This tape cannot be usable due to triggering this bug. It is for the EMC levelset: Emerald Mine I (Kingsoft), level 71.
(2.94 KiB) Downloaded 800 times
In a related topic, is it possible for you to create an verify function for the levelset I'm in to give me results if the tapes are complete (by reaching to the exit) or incomplete/broken (by not reaching the exit at all)? It would save me time F2'ing every single level in the levelset to verify it.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 3.3.0.1: Other players' sudden appearance in recorded ta

Post by Holger »

Hi Ryan, here's the fixed tape (attached)!

If you should use the current development version of R'n'D, you can fix tapes with the bug described in this thread by yourself by loading the corresponding level set, level and tape, then (while in the main menu) blindly typing ":fix-tape" or just ":ft". Then save the tape (press the eject button on the tape recorder) and you're done.

Regarding the "verify function": Just see my last post in this thread again! To test the attached fixed tape, copy it to a "tape" sub-folder of that level set and type:

shell> ./rocksndiamonds -e "autoplay emc_emerald_mine_original_1 071"

That's what I just did to verify that the tape is okay now.

To test the whole set, just omit the tape number.
Attachments
071.tape
Fixed tape for level set "emc_emerald_mine_original_1", level 071
(1.24 KiB) Downloaded 767 times
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 3.3.0.1: Other players' sudden appearance in recorded tape!

Post by Holger »

Marked as "solved".
Post Reply