Spider Posted May 3, 2017 Report Share Posted May 3, 2017 Colour Clash Attack 😉  Take a look at this listing from the Spectrum Basic Programming manual. It draws some colourful lines however the effects of the colour clash (partly it was written to demo this 'effect' I think) are quickly shown...  Two video's attached, both approx 40s long.  Here it is 'in action' : basic_gfx_1.mp4  Now lets take a look again, this time without any colour clash: basic_gfx_2.mp4 jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted May 3, 2017 Report Share Posted May 3, 2017 Interesting stuff, Andy, thanks! :) Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted May 3, 2017 Author Report Share Posted May 3, 2017 On 5/3/2017 at 8:12 PM, jetsetdanny said: Interesting stuff, Andy, thanks! 🙂 There's no prize for figuring out how I did it though unfortunately. 😅 🤣 😀 🤪 jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted May 4, 2017 Author Report Share Posted May 4, 2017 Interesting stuff, Andy, thanks! :) The same routine (with a tiny tweak to the 'limits' and changing it to COLOUR x) works on the BBC Micro too which does not have colour clash in M2 although its low res so it looks blocky(ish) on that.  I must try to do this on the Oric / Dragon and Amstrad too. I do not think I can figure out the odd Basic on the C64 as it appears to involve a lot of odd symbols. I guess I should hunt down a Basic Programming manual for the C64/C128 to work it out. jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted February 24, 2022 Author Report Share Posted February 24, 2022 😄 jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted January 24 Author Report Share Posted January 24 .zip of two short video's of this "in action" , SE Basic is used. How the Speccy could of been without colour clash, although there would not be much (any?) memory left for much else as it stood initially. gfx.zip  Quote Link to comment Share on other sites More sharing options...
jetsetdanny Posted January 25 Report Share Posted January 25 It does show the difference! Thanks, Andy! 🙂 Spider 1 Quote Link to comment Share on other sites More sharing options...
Jet Set Willie Posted Sunday at 08:14 AM Report Share Posted Sunday at 08:14 AM (edited) Thank you! 🙂 The latter video looked near the MSX, there would appear some blocks here and there, though. 🙂 This program will work on MSX, too, with just a little changes. Change lines as 10 COLOR,1,1:SCREEN 2  Colour front,back,border. Numbers between 0-15. Screen mode 2 is a high resolution mode. 20 C=2 Colour 0 is transparent, 1 is black, thus 2 (green). 30 X=INT(RND(1)*256):Y=INT(RND(1)*192) 40 LINE-(X,Y),C  This will start the line where the last one finished, x is 0-255 and y is 0-192. The full command is LINE(startX,startY)-(finishX,finishY),colour LINE(startX,startY)-(finishX,finishY),colour,b Will draw boxes. LINE(startX,startY)-(finishX,finishY),colour,bf Will draw filled boxes. DRAW is a macro-language command. You can type the coordinates there as Mxcoordinate,ycoordinate (typing BM does not draw the line from the last finish point) but you can´t use variables as coordinates inside DRAW command. Perhaps it´s possible, I haven´t tried this fully, but I don´t think so. 50 C=C+1:IFC>15THENC=2 This line can be shorter, but I forgot to try it how it works. 50 C=C+1 OR 15 but maybe it was AND or XOR instead or OR? Should 15 be 16 instead? 🤔 [edited] 50 C=C+1AND15 🙂  The starting value of C won´t be 2 anymore after it had reached 15, though. If someone can share short piece of Basic code to fix this, I´d be glad . 🙂 (not a big problem, you can also change background colour) 60 GOTO 30  On 5/4/2017 at 12:48 PM, Spider said: The same routine (with a tiny tweak to the 'limits' and changing it to COLOUR x) works on the BBC Micro too which does not have colour clash in M2 although its low res so it looks blocky(ish) on that.  I must try to do this on the Oric / Dragon and Amstrad too. I do not think I can figure out the odd Basic on the C64 as it appears to involve a lot of odd symbols. I guess I should hunt down a Basic Programming manual for the C64/C128 to work it out. Why dont´t you use 20K mode on the BBC? 🙂 You will get four colours with better horizontal resolution. On C64 Simon´s Basic could be the answer to your problem. 🙂 C128 should have a very decent Basic? Edited Sunday at 03:50 PM by Jet Set Willie Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted Sunday at 01:59 PM Author Report Share Posted Sunday at 01:59 PM @Jet Set Willie I'm not familiar with writing Basic on the MSX range of machines. Yet anyway. Offhand I could not tell you how many colours and/or modes are available! 🙂 BBC well funny you say that...  These were done about 2011 as I recall, possibly a few years earlier than that. 🙂 The program is over complex. Also it draws too much: That's about as simple as it can be really. Could be stuck into two lines I suppose but that makes for difficult reading. 🙂 Results: Which goes to this quickly:  Adding a single black line will space it out a bit, better adding more. To save duplication its then much easier to define a proceedure (defproc name) to do this, then we can draw as many or as few black lines as needed: Very simple! 🙂 Now this is the results after a few seconds then after about a minute: Removing the FOR/NEXT loop or perhaps setting it at 0 TO 2 might be enough.  Jet Set Willie and jetsetdanny 1 1 Quote Link to comment Share on other sites More sharing options...
Jet Set Willie Posted Sunday at 03:38 PM Report Share Posted Sunday at 03:38 PM Spider, I meant this: 50 C=C+1:IFC>15THENC=2 can be shortened to 50 C=C+1AND15 I didn´t remember if the needed operand was AND, OR or XOR. 🙂 I had to try first. Thank you again for the BBC Basic examples. I like BBC Basic.  🥰  Spider 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.