Norman Sword Posted December 21, 2021 Author Report Share Posted December 21, 2021 (edited) I am waiting for a film to start. meanwhile a technical blurb post Technical challenges. Here I will list the steps taken just for compressing the room tile graphic data. in JSW I wrote a program that drew each room. From the drawn room the program counted each usage of a graphic. For every tile that was not used, its graphic data is set to all 0's. The tiles colour however needs to be kept as it could easily be a multi defined graphic. e.g. a floor with the same colour as a stair. < this makes a floor act as a stair> Before checking any graphics we start a unique graphic list, with no graphics in it. Next the defined graphics in a cavern/room are checked against all presently defined graphics. If the graphic is found to be unique then the graphic data is stored and the unique list in enlarged by one with this graphic being allocated the new stored graphics number. Otherwise the graphic must be already contained in the list, and its graphic number can be taken from the match. Doing this check, each graphic is allocated a graphic number. This number is where in the list the graphic is defined. By going through the listed definitions for each type of tile we keep adding new graphics to the list or skipping if a match, but we also end up with two numbers for each type of graphic. The first number if the tiles defined colour, and the second is the graphic index number. By going through all 64 rooms the list of unique graphics is dropped from the original 64*7=448 (back/floor/wall/nasty/ramp/conv/item) to around 250 different graphics. A major saving in memory. As stated above, when the data for the each room is stored, it generates a list of descriptors for each of the tiles (back/floor/wall/nasty/ramp/conv/item) And for each tile a pair of bytes is used. The first being the colour of the tile and the second being the graphic index. (to the unique graphics) the data looks something like this the first byte is the colour, the second byte is the index to the definition . db #00,#00 ; colour+BackG db #41,#01 ; colour+Floor db #0E,#25 ; colour+Wall db #46,#00 ; colour+nasty1 db #00,#00 ; colour+ramp db #42,#0E ; colour+conv To further compress the list a colour over ride is defined as -1 (#ff), this is allocated when a pair of data bytes needs a unique colour and a null definition index. This allows the defined data pairs to be trimmed as needed from two bytes down to 1. so the above can be written as db #00,#00 ; colour+BackG db #41,#01 ; colour+Floor db #0E,#25 ; colour+Wall db #46,#00 ; colour+nasty1 ; tile not used but colour is needed db #ff ;--- colour+ramp ; tile not used and no colour needed - generate the colour automatically db #42,#0E ; colour+conv In Manic Miner, it compresses in a similar manner, but this time it has to allocate data for (back/wall/floor/collapse/nasty1/nast2/switch/conv/item) As can be seen the size of the variable list (tiles defined) from Manic Miner is not the same as Jet Set Willy. The extra tiles and differing tile usage, causes a problem with what is defined and where. The game uses specific places to place each of the specific tiles data. To overcome the differences the tile list is expanded to allow for both sets of definitions. The extended list is (back/wall/floor/collapse/nasty1/nasty2/switch/ramp/conv/item) The problem with the expanded tile list is simply it is too big to be stored for every room. So to allow for the differing usages of the tile list a control list is used to indicate which tiles need to be populated and which tiles can be skipped. Probably easier if I list them in this manner (0=back/1=wall/2=floor/3=collapse/4=nasty1/5=nast2/6=switch/7=ramp/8=conv/9=item) so that the control list for JSW is (0=back/1=wall/2=floor/3=________/4=nasty1/5=_____ /6=______/7=ramp/8=conv/9=item) and for Manic Miner is (0=back/1=wall/2=floor/3=collapse/4=nasty1/5=nast2/6=switch/7=____/8=conv/9=item) The next problem is the multi code usage. Each tile needs to have a unique value, so unused tiles, can not match with the defined values in the version played. So colour descriptors are generated as expansion takes place, these values are placed over the unused data. the values all being different to stop colour matches with the tiles defined. so whilst playing JSW it checks for both types of NASTY even though in the original version there is only 1 nasty. It also checks to see if Willy is walking on a collapsing floor, even when none are defined for JSW. The reason it checks and does not have code to bypass the unneeded checks, is simply because adding those extra checks, is just as slow as doing the unneeded tile checks. And the version v 1.04 Obsolete version v 104 deleted - downloaded 7 times Edited December 26, 2021 by Norman Sword adding -1(#ff) to clarify terminology Spider, jetsetdanny and MtM 3 Quote Link to comment Share on other sites More sharing options...
MtM Posted December 21, 2021 Report Share Posted December 21, 2021 Downloaded! Thanks Norman! Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted December 21, 2021 Author Report Share Posted December 21, 2021 I will publish the cheat code on the 25TH DECMEBER. The cheat code is similar to JSW's cheat code. (in style) it is however a different length and encrypted in a different format. Plus the code is not JSW code but my own. MtM and jetsetdanny 1 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted December 22, 2021 Report Share Posted December 22, 2021 Thanks for the update 🙂 I had actually noticed something (here) , guests could not download from this area nor from chat. I've since rectified this. jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted December 24, 2021 Report Share Posted December 24, 2021 Thanks for v. 1.04, Norman Sword, and for the fascinating technical explanations! 👍 Even though I did mean to playtest v. 1.03, it's on top of my list of priorities, I haven't had the time to do it yet (I haven't done anything MM/JSW-related for more than a week now), I am sorry about it. Since v. 1.04 is already out, I will have a go at it as soon as time permits. There's a good chance it might happen around December 26-28, real-world circumstances permitting. I will certainly report back with the results. And I am looking forward to playing the new version of the game 🙂 . Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted December 24, 2021 Report Share Posted December 24, 2021 This morning, I playtested and completed v1-04 🙂 Aside from some very silly 'schoolboy errors' in the JSW part resulting in me forgetting to collect the item on Front Door meaning I had to go through the Attic three times*** , it was quite good. I played at full speed most of the time aside from a couple of rooms/caverns where a slightly slower pace was necessary. I appreciate the slow falling of Kong in Manic Miner. I am not 100% that the Cold Room timings in that are 100% accurate with the original as I could not do my usual right / jump / left / jump / jump without colliding with the top nasty. In theory and speed its possible do this but its a minor (no pun) concern. The only other thing I noted, and if memory serves the BBC Micro version also does this, if you jump into the flashing Portal at the same time a nasty guardian is in there, you lose a life. In the original as you know if you fall into this from Cold Room, you'll survive. On the JSW part, I found Cuckoo's Nest very tricky indeed. I'm not sure why as the original is a bit timing critical but perhaps it was me. I'll not say more and merely attach the .rzx , please bear in mind its a long one as I was not really doing this in a speed efficient manner, it was more a bit of a relaxed play. Recorded in Spectaculator. Sometimes ZXSpin has issues playing these back, your miles may vary as they say. It should play OK in the former and in Zero and/or Fuse however. Any issues and I'll build a mp4 from it if needed. Thanks @Norman Sword mjsw v1-04.rzx jetsetdanny and MtM 2 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted December 24, 2021 Author Report Share Posted December 24, 2021 (edited) Duhh - What happened to the final barrier cavern ???????? Can someone post it to me. I will take it as a Christmas present... In answer to myself --- the code is ld hl,current_room inc (hl) ld a,(hl) cp 63+20 ;- the final barrier is completed jp nz,enter_new_room it should be ld hl,current_room ld a,(hl) inc (hl) cp 63+20 ;- the final barrier is completed jp nz,enter_new_room which means at some stage I rearranged some of the code. Edited December 24, 2021 by Norman Sword jetsetdanny and Spider 1 1 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted December 24, 2021 Author Report Share Posted December 24, 2021 Watching the game being played, as opposed to actually playing the game oneself. It is apparent, it plays very fast. So very sorry for the code order mistake. The route taken was checking out the attic bug. And as luck has it, you did not find it. But as circumstances played out, It had migrated to the final barrier. jetsetdanny and Spider 1 1 Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted December 24, 2021 Author Report Share Posted December 24, 2021 (edited) No idea if YET another version is wanted. Just to change the order of those two opcodes. Edited December 24, 2021 by Norman Sword Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted December 24, 2021 Report Share Posted December 24, 2021 52 minutes ago, Norman Sword said: Duhh - What happened to the final barrier cavern ???????? Can someone post it to me. I will take it as a Christmas present... 😅🤣 Its fine. I half wondered if it was purposely missing. 16 minutes ago, Norman Sword said: Watching the game being played, as opposed to actually playing the game oneself. It is apparent, it plays very fast. So very sorry for the code order mistake. The route taken was checking out the attic bug. And as luck has it, you did not find it. But as circumstances played out, It had migrated to the final barrier. Ah yes you can see I like to run on faster speed. Although I did this in Spectaculator, my preferred emulator is ZXSpin, simply as I can 'fine tune' the speed. I tend to have everything run at about 110% , Spectaculator only offers large jumps. I do appreciate the speed bar however as it made it more fun on the easier rooms/caverns and allowed me to slow it down on ones I find a bit tricky timing wise. It was also good to note the sound was disabled on 'max speed' If I am completely honest here, I would not object if it ran a bit faster than that at 'full warp' either. I don't think it is too fast. If however the speed option was only possible on the title screen it would be different, it does need I think to remain 'in game' to allow adjustment as I'd of never completed Cuckoo's Nest or Nightmare Room at full speed. No issue to code mistook 😉 My route, well the third Attic visit was accidental due to forgetting the Front Door item. It was as mentioned not a speed-run and I did not take an efficient route at all, I was simply wanting a very leisurely game, if that meant I revisited rooms again, so be it. I did enjoy it, and I think that's one of the primary factors. 😇😊 In regard to maximum speed and efficiency I think you'll likely find jetsetdanny is about at the top of this. 16 minutes ago, Norman Sword said: No idea if YET another version is wanted. Just to change the order of those two opcodes. It;s a quandary, my first thought was "well that is simple enough, simply add a couple of POKE's into the Basic loader before the USR" , but if you're going to do that, and it is as simple as it seems (assuming that section is not compressed) then another minute would 'fix' it. Hmm. Maybe something to mull over for a day or so, assuming the 'codes' are being released tomorrow maybe that would be the ideal time, unless you wish to hold those back to New Year... 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.