Sendy The Endless Posted January 27, 2023 Report Share Posted January 27, 2023 (edited) So here's a trick I heard about while building Where's Woody, my second JSW game. Sticky conveyors! Originally, these were only obtainable by changing a certain byte in the room data with a hex editor to a value it shouldn't be; but as John Elliott expanded JSWED, these became supported in the conveyor options section of the room editor. Technically a sticky conveyor is one that is moving in both directions simultaneously. Whatever direction Willy steps onto it, he will continue moving in that direction until he touches something else. Note that he can still jump while this is in progress. This makes them behave like "ice" as seen in many other platformers of yore, but there are some caveats! "Sticky" conveyors will halt Willy in place if he jumps straight up onto one, or falls down squarely onto one (and survives the fall). In JSW and JSW128, there is only one contiguous conveyor allowed per room, and the animation is tied to that strip of blocks, so it's best to use either solid pixels or dithering on the first and third row of the cell graphic (lest it be mistaken for a normal conveyor). However, in JSW64, conveyors can be placed anywhere and the animation can be turned off. Create a cell that's a conveyor in any direction, go into the conveyor menu and select "Sticky". Now you can place these blocks around the room however you like, but bear in mind that these are still "sticky conveyors" which are technically conveyors moving in both directions at once! As stated before, you have to stop Willy from being able to land on one without leftward or rightward momentum, because he'll become, well, stuck, only able to jump in place and hope for the sweet release of death : ) I've attatched a picture of a room I made for fun. JSW experts will notice that (unless I overlooked something), you can never land on the bright white icy platforms (block number 3) without leftward or rightward momentum. This will almost always require adjusting and building other parts of the room around this to accommodate it - static nasties and solid walls help the most here, but you'll have to improvise and playtest to look for edge cases you might have overlooked. A lot of work for something that's functionally not much different from a conveyor going in either direction, but to me, anything that adds a bit of variety is welcome, which is why I use them. Just make sure your graphics are distinct and consistent - I tend to use the same 8x8 pixel graphic for all ice blocks within a game, as they're so unusual. Present them to the player in a low-risk situation before you start creating puzzle rooms with them! Any questions feel free to ask : ) Historically, I believe Andrew Broad was the first to report the phenomenon of "sticky" and "off" conveyors, but I believe I may have been the first, in Where's Woody, to use them as ice, rather than as a kind of fly-paper to trap the player. Edited January 27, 2023 by Sendy The Endless More clarity Spider and jetsetdanny 2 Quote Link to comment Share on other sites More sharing options...
Spider Posted January 27, 2023 Report Share Posted January 27, 2023 That's an excellent guide, thank you. Sendy The Endless 1 Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted January 28, 2023 Report Share Posted January 28, 2023 Thanks for this guide, Sendy! It's an excellent start for the new forum 👍 Sendy The Endless 1 Quote Link to comment Share on other sites More sharing options...
Sendy The Endless Posted January 28, 2023 Author Report Share Posted January 28, 2023 Thanks ^ _ ^ Just a note about using this trick in games that aren't JSW64. If you're using the standard room format, you can do the "attributes" trick of making your water/platform blocks the same colour as the conveyor cell. Use earth/walls for platforms, and now all your water blocks will be ice (insert physics joke here). Here's an example from Where's Woody. If anyone needs me to explain the conveyors as water trick, let me know. jetsetdanny and Spider 1 1 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted January 28, 2023 Report Share Posted January 28, 2023 (edited) Deleted Edited February 8, 2023 by Norman Sword Sendy The Endless, jetsetdanny and Spider 1 2 Quote Link to comment Share on other sites More sharing options...
Sendy The Endless Posted January 28, 2023 Author Report Share Posted January 28, 2023 Thanks Norman! I'm not sure I'd know how to enter that into the hex editor, but it's an exciting future prospect to try out! jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted January 28, 2023 Report Share Posted January 28, 2023 (edited) Deleted Edited February 8, 2023 by Norman Sword Spider, jetsetdanny and Sendy The Endless 1 2 Quote Link to comment Share on other sites More sharing options...
Sendy The Endless Posted January 28, 2023 Author Report Share Posted January 28, 2023 Fantastic! I think I can set that up myself now. Thanks very muchly for your assistance, Norman Sword. You've made this lamer very happy : ) jetsetdanny and Spider 2 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted January 29, 2023 Report Share Posted January 29, 2023 (edited) Deleted Edited February 8, 2023 by Norman Sword Sendy The Endless, jetsetdanny and Spider 1 2 Quote Link to comment Share on other sites More sharing options...
IRF Posted January 31, 2023 Report Share Posted January 31, 2023 (edited) On 1/28/2023 at 3:21 PM, Norman Sword said: Trivial amount of code needed to fix the Sticky conveyor problem. Without looking at anyone elses code. To implement a sticky conveyor we set the conveyor value to -1, =#ff, =255 . (instead of the normal 0 or 1) This creates the situation as described above To overcome its main drawback of locking willy when on a conveyor. change the code at #8ef7 - 3 bytes from L8EF7 SUB $03 L8EF9 LD E,A to L8EF7 call sticky_patch then add somewhere sticky_patch: sub 3 ;2 cp -4 ;4 ld e,a ;5 ret nz ;6 ld hl,willy_dir) ;9 L85D0 set 1,(hl) ;11 ret ;12 This does however remove the situation of the conveyor trapping Willy - < only from a sticky conveyor situation > Leaves all the old logic for conveyors - and only reacts in a sticky conveyor situation. I wonder if you use a value of 03 for the conveyor definition byte, will it achieve the same thing as 255 (since only bits 0-1 are inspected by the conveyor routine), but then you can replace your CP -4 command with an OR A (which does the same thing as CP 0 but only requires one byte instead of two)? You could then use a value of 131 instead of 127 in your more advanced code to switch the stickiness back on again. EDIT: Actually you could use any value that is [a non-zero multiple of 4 plus 3] to create a sticky conveyor. (I once experimented with different conveyor values beyond 0-3, and found that they had different properties during the toilet run, in terms of the ability of the P key to stop Willy in his tracks.) **** Norman, in respect of your more advanced code, having studied it but not tried it out yet, my guess is that it has the effect that whenever Willy jumps or falls vertically onto such a conveyor, it turns him round and then conveys him in the opposite direction to the way he was facing before he landed on the conveyor. Am I right? Edited February 1, 2023 by IRF jetsetdanny 1 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.