Jump to content
Jet Set Willy & Manic Miner Community

With and without


Spider

Recommended Posts

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...
 
basic_gfx.png

Two video's attached, both approx 40s long.
 
Here it is 'in action' :


 Now lets take a look again, this time without any colour clash:

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 4 years later...
  • 2 years later...

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 by Jet Set Willie
Link to comment
Share on other sites

@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...

rlp1.jpg

rlp2.jpg

rlp3.jpg

 

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:

listing.png

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:

listing2.png

Which goes to this quickly:

listing3.png

 

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:

updated1.png

Very simple! 🙂 

Now this is the results after a few seconds then after about a minute:

updated2.png

updated3.png

Removing the FOR/NEXT loop or perhaps setting it at 0 TO 2 might be enough.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.