Norman Sword Posted June 9, 2020 Author Report Share Posted June 9, 2020 Looked at the code for Kongs demise. and he does give the score for each cycle of fall. SO I apologise for thinking he did not. As I have repeatedly stated, my code does not tend to duplicate other peoples code. I look at the problem and write my solution to that problem. I wonder why I thought the original gave a lump Bonus. Quote Link to comment Share on other sites More sharing options...
IRF Posted June 9, 2020 Report Share Posted June 9, 2020 Norman, please see the attached. Recording of the mysterious behaviour of the right-hand switch in the first Kong cavern, as well as a snapshot taken just before the recording was made (so you can try it for yourself). What can explain the sudden death when Willy touches the switch? The first (left-hand) switch didn't kill him (obviously, or else I wouldn't have been able to reach that position in the first place to touch the second switch). Kong Switch Unexplained Death.rzx Kong Switch Unexplained Death.z80 Spider and Norman Sword 2 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted June 9, 2020 Author Report Share Posted June 9, 2020 (edited) Jumping vertically switches the switch, jumping at an angle kills willy... So a bug. Which I will have to duplicate myself in code to find out what is happening. Thanks for the feed back. I will investigate the problem. --------------------------------------------------------------- Final game version accessible via This Link Edited July 20, 2020 by Norman Sword Spider 1 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted June 9, 2020 Author Report Share Posted June 9, 2020 And an addendum for the quirk. If you jump vertically and activate the switch, jumping across the activated switch does not kill. Oh the fun looking for the quirk in code.!! Quote Link to comment Share on other sites More sharing options...
IRF Posted June 9, 2020 Report Share Posted June 9, 2020 A vertical jump if Willy is further left kills him too. Whilst I managed to do a left-to-right jump and flip the switch without dying. It seems that it's not a difference between vertical versus sideways jumping. Rather, it's a question of whether or not one of Willy's pixels touches a pixel of the switch. If he starts off facing left in the rightmost frame of animation within the pair of cell-columns bounded by the two blocks either side of the switch (see attached screenshot), then when he jumps straight up, his attribute coordinates enter the cell containing the switch, but his pixels don't touch the switch's pixels, so the switch is flipped safely. As you've discovered, once the switch has been flipped, Willy can pixel-collide with it without harm. Norman Sword 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 9, 2020 Report Share Posted June 9, 2020 (edited) Anyway, I'll do a recording of Willy being killed by the switch in the first Kong cavern so you can see what I mean. I've found (sometimes anyway, depending on the scenario and requirements) its not a big problem for me to turn an rzx into an avi if required. :) Not needed here in this case but worth a mention I think. Edited June 9, 2020 by Spider IRF 1 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted June 9, 2020 Author Report Share Posted June 9, 2020 (edited) I stated writing this just after my last comment.. I have watched a few tv programs since and noticed other replies, whilst this was being written. So I assume detail overlap ---------------------------------------------------Very difficult to track a problem in active code. I would normally write a big stack of debug routines to track the problem. I looked at the code layout and thought of a far easier way. Just re organise the routines. Even though both master and working screens are updated, the problem I would think is a pixel collision problem with the switch. Willy has punched a hole for his sprite. the switch is updated into the hole. The casual comment he can jump the other way would seem to indicate pixel collision, occurring due to different pixel combinations overlaying the switch. E.g. Willy detecting the pixel change and killing Willy. Willies sprite is preceded by a lot of blank pixels, no matter which way he moves. It is only jumping/falling that permits the sprite to enter a square in any phase of animation. A re organisation of the code is just moving one line of code... Far easier. Done and seems to stop the problem.------------------------------ The best way of describing the above problem. When Wiily jumps his arc goes 4,4,3,2,2,1,1,0 etc. the first part 4,4 we move up one Char, the next part we move up one char with the 3,3,2. And finally we move into the square above by two pixels. Those two pixels are the top of willies hat. The switch is updated and changes the lower three pixels of the switch. If and only if Willies hat (lamp) is/was in this area , then we have a demise of Willy, messing around and adding a pixel collision part (that did not kill) meant so much testing was done across the three modes. In Normal and trainer, Willy will not die. In expert he will. (So I missed out checking for certain conditions in expert mode) The above would also suggest falling into a switch will have the same problem. (on a bigger scale and more likely to flag collision)------------------------------- Moving one line of code has removed this problem.... I hope the change in code order from Update willies position punch hole for willy move sprites draw sprites draw willy to Update willies position move sprites punch hole for willy draw sprites draw willy Where the switch is updated by the move sprite routine. --------------------------------------------------------------- Final game version accessible via This Link Edited July 20, 2020 by Norman Sword IRF and MtM 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted June 9, 2020 Report Share Posted June 9, 2020 My latest investigations have crossed with your last post, Norman. But I just confirmed that the second switch in the second Kong cavern can in fact kill Willy if he hits if at a certain angle. I suspect that the first switches in both Kong caverns would also, in theory, be fatal if Willy pixel-collided with them before they are flipped. But the place in which the first switches in both caverns are located means that Willy has to jump sideways at them, and from such a position that his attribute coincides with the switch (flipping it, and making it harmless) before any of his pixels (in fact, his headlamp) can collide with any pixels in the switch. So no fatal outcome there. I hadn't thought to check whether the switches in the final cavern can kill him if he pixel-collides with them. Norman Sword 1 Quote Link to comment Share on other sites More sharing options...
IRF Posted June 9, 2020 Report Share Posted June 9, 2020 (edited) I hadn't thought to check whether the switches in the final cavern can kill him if he pixel-collides with them. I just reached the last cavern again, and this time I managed to activate both switches. Both of them can indeed kill Willy if he strikes them at the wrong angle, as suspected. But your fears about Willy being killed if the lower half of his body pixel-collides with them proved to be unfounded. I suspect that's because the check for whether Willy has touched a switch only compares the attribute coordinates of the upper half of his body with the coordinate of the switch. (If you walk through the lower switch in the final cavern by proceeding upstream along the conveyor directly beneath it, such that Willy's legs pass through the switch, the switch does not get flipped.) That final cavern is actually bloody difficult to complete this time, now that I am trying to make the 'Kong' fall to collect the bonus points AND exit the cavern safely! Edited June 10, 2020 by IRF MtM 1 Quote Link to comment Share on other sites More sharing options...
andrewbroad Posted June 10, 2020 Report Share Posted June 10, 2020 I read an interview with Matthew Smith (interview conducted by Dr Andrew Broad!) in which, if memory serves [tennis pun intended] correctly, Matthew said the Cold Room items were supposed to be snowshoes, but he left out a pixel [either that or the opposite - he inserted a pixel erroneously - I can't recall which], which made the items look like tennis rackets. I didn't conduct the interview myself [Retro Gamer, Load 48, February 2008]; I merely posted a message about it. Matthew Smith said he was "thinking about tweaking a pixel. I'm not sure if it would be better light or dark. I must have tried it both ways back then." My best guess is that he was referring to the pixel highlighted in the item bitmap below: .#.#.... #.#.#... .#.#.#.. #.#.#... .#.#.#.. ..#.##.. ......#. .......# Spider, MtM and IRF 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.