ParadigmShifter Posted August 1 Report Share Posted August 1 (edited) Crucial point is that I do a HALT and then immediately start erasing and drawing everything (to beat the raster - hopefully - I can make it flicker a tiny bit if I give it a really bad case for the solar power beam at the moment but I have some speedups for the beam drawing up my sleeve still). Once everything is drawn I work out what needs to be erased next frame, I set up all the guardian screen addresses of where they are now at, I work out the path of the solar beam for the next frame, etc.). It's generally a bad idea (I know it is the simple and obvious way of doing things though, and I made this mistake in my 2010 version) to do it the other way around, which would be get player input etc. update and move everything draw everything You can get away with that if you use a double buffer of course. That wastes a lot of memory and as well as drawing to the offscreen buffer (which can be in noncontended RAM, so that's a bonus), you then have to copy it to contended RAM (preferably immediately after the HALT if you have interrupts enabled. In my 2010 version I did use a backbuffer and I had a "dirty list" of cells I had to redraw so it only redraw those, which made the drawing fast. Maintaining the dirty list was a pain though so I soon got rid of that idea in my later stuff. (Of which only one has been released, and it's not great (speedwise and codewise) either, it was while trying to improve it someone decided to draw an 8 frame anim for Willy which started me to rewrite my engine again). It's not a bad game if you like scrabble and columns though (I don't like the occasional attribute flicker you get though) https://spectrumcomputing.co.uk/entry/42215/ZX-Spectrum/SJOE It's like columns but you have to make valid (in Scrabble) 4 letter words (and only 4 letter words count! Hence all words displayed on screen in the UI and the starting names in the high score are all valid 4 letter words (they are random words from the list for the high score names)) 🙂 The entire SOWPODS list of 4 letter words is present and correct (can't remember how many, think it's 5000 odd). You can get a list of them by pressing L from the main menu. Don't turn on CUSS mode if you are easily offended by scoring points for words 🙂 Edited August 1 by ParadigmShifter Spider and jetsetdanny 1 1 Quote Link to comment Share on other sites More sharing options...
ParadigmShifter Posted August 3 Report Share Posted August 3 (edited) You can update and then move if you do the wait for VBlank just before you start drawing as well of course. You may have to jump into the mainloop on the first frame then to avoid updating enemies on the first frame (original Manic Miner may do that - update guardian positions before it draws them for the first time anyway?) I know Matthew Smith just turned interrupts off and there is no HALT to sync with the raster in his code. That causes tearing and/or flicker if you do that though. I just do the draw first and I start with empty erase lists so it erases nothing it just draws the guardians without erasing anything. (It will redraw any cells Willy is standing in front of when doing the Willy erase though). The code is now public on Github anyway if you want to read it (or build it yourself - requires sjasmplus) https://github.com/ParadigmShifterRetro/SlickWilly Edited August 3 by ParadigmShifter Spider and jetsetdanny 2 Quote Link to comment Share on other sites More sharing options...
Spider Posted August 4 Report Share Posted August 4 I did remove (merely out of curiosity) two halt instructions I noted and the speed was insane however that was not the point , I wanted to see it like that, then I put them back. 🙂 jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
ParadigmShifter Posted August 4 Report Share Posted August 4 (edited) In my code you mean? There's only 1 HALT in the mainloop. There's another halt just before I set the correct attributes for a level to try and avoid a bit of flicker when showing a level for the first time but I don't think it's 100% effective, maybe if I have 512 bytes to spare at that point I could work out the attributes (rather than having to go from collision tile to attribute value via a lookup table) to set them faster. There's also 2 HALT to delay the colour cycling of the Demo Over message. The Game Over sequence does drop a frame unfortunately (you can see the foot speed up a bit at the end when it starts not dropping a frame), but it's nowhere near as flickery/teary as the original version. It's generally a bad idea to remove HALT instructions if your game runs faster than 50fps 😉 It looks quite cool though. That was first thing I tried on day 1 of my first job (working on a PS1 game), I saw "WaitVBlank();" in the first example code I compiled and thought hmm waiting sounds bad what happens if I take it out? It was very very fast indeed then and left trails across the screen lol 😉 Edited August 4 by ParadigmShifter jetsetdanny and Spider 1 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted October 21 Report Share Posted October 21 Further to my post on page two here , I decided for no real reason to change the scoring and add a bit more air, as well as compress the code to reduce it's loading size. There is a lot more scope to optimise this, it is starting to 'click' now properly with me. For now , two identical versions with the increased bonus/air , one with a loading screen and one without. Without screen$ MM_SP_Faster V3_EXTRA_BONUS_WITHOUT_SCR.tap With screen$ MM_SP_Faster V3_EXTRA_BONUS_WITH_SCR.tap The game code is identical in each of these two. For reasons of sanity I've named it 'V3' as the one in the linked post is V2 And a quick playthrough: MM_SP_Faster V3_EXTRA_BONUS_WITH_SCR.rzx .rzx recorded with Spectaculator, it should play back fine in most other emulators I expect. MtM and JianYang 2 Quote Link to comment Share on other sites More sharing options...
JianYang Posted October 22 Report Share Posted October 22 This might just be my personal sweet spot of Manic Miner speed. Thumbs up. Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted October 25 Report Share Posted October 25 On 10/22/2024 at 6:55 AM, JianYang said: This might just be my personal sweet spot of Manic Miner speed. Thumbs up. It could go a LOT faster with rewriting the main loop and more importantly moving the buffer data areas out of contended memory. But I sort of think too fast could be annoying. The contention can be 'emulated' (as in disabled) in ZXSpin at least. Thank you I appreciate your kind reply. 🙂 The 'extra' bonus stuff was really just boredom I think. The linked post shows the 'changes' which are very minor (no pun) aside bonus incrementation/air levels. V2 does not have these extra scoring elements. Quote Link to comment Share on other sites More sharing options...
JianYang Posted October 26 Report Share Posted October 26 23 hours ago, Spider said: But I sort of think too fast could be annoying. Exactly. I do occasionally play Manic Panic, but I have to be in an almost masochistic mood to do that. And in regular Manic Miner there is a certain amount of boredom when you have to walk from one end of the screen to the other. I love both of these games, but the speeds are really at somewhat annoying extremes. Your version is just right. Not boring in the easy levels and just a bit more challenging in the harder ones. jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted October 26 Report Share Posted October 26 1 minute ago, JianYang said: Not boring in the easy levels and just a bit more challenging in the harder ones Although a different game, with JSW it makes Forgotten Abbey a little bit more tricky (the bottom row jumps) In MM I did note that Skylabs , Warehouse and to some degree Amoebatrons Revenge were all slightly more difficult given the precise nature needed in these, the former two especially. I couldn't really say that Solar Power was any harder as it is all about 'player' speed in that cavern, too much hesitation as you know and there's no air left! 🙂 JianYang 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.