Jump to content
Jet Set Willy & Manic Miner Community

Random Topic - Random colours and routines


Spider

Recommended Posts

As title. 'Chat' is after all really the only area of the forum where 'off topic' (and on topic!) discussion is welcome. 🙂

This is -Best- ran at high emulation speed (at least four times)

Standard .sna snapshot, pic of Basic and small 20s/192kb video included, running at a higher speed.

Press a key to start. Safe to 'break'

rnd_blocks.sna

 

Spoiler

Basic very simple.

Line 10 sets sane colours.

Line 20 draws random blocks

Line 30 erases them by a random number setting them back to black, but not all of them...

Line 40 jumps back to line 20 to repeat it again.

rnd_blocks.png

Link to comment
Share on other sites

To clash or not. Post contains two video's both 4.2mb and approx 40s in length. They are old and were recorded with the (free) Screencast app at the time. But worth a watch 😉

Referring to the Spectrum Basic manual (the one included with all machines) this is the 48K version so its Chapter 17, Page 122. Here's a small excerpt:

ch17_p122.png

Here is how it looks on the original Speccies (all of them), colour clash et al because you cannot have more than one ink and one paper choice per 8x8 cell. Note I'm using 'SE Basic' for this hence different cursor and font, but its quite similar...

Spoiler

 

Here is how it looks -without- any colour clash 😮 Same program. Pause it at start to confirm if in doubt 😉

Super Speccy 😉

Link to comment
Share on other sites

  • 2 weeks later...

I looked at the code from the above - it was not quite what I wanted - This is more how I wanted it to look.

The struggle between areas of colour, for domination.
========================================
The routine fills the screen with colour.
Then it selects a (random) position and checks to see what colour is dominant in that area.
The dominant colour, then fills the local area.
The selection of areas continues for 10,000 loops.

Then the whole process is repeated.

Shape2.tap

Edited by Norman Sword
Clarification of terminology.
Link to comment
Share on other sites

Very similar - written in assembler - I took the visual idea of above and wrote the code in assembler. 

 

twirl.tap



the 2nd version, is the progression in complexity

twirl2.tap

 the 3rd version plays with speed as well

twirl3.tap

The very last version - which changes the checker pattern

The real purpose of writing this was to show the size difference between C and assembler.
 

twirl4.tap

 

Footnote. Each of these tap files contains a header and a basic loader. All the running code data is contained within the assembled file. The size of each version is 121 bytes less than the files size. E.g. Twirl tap has 367 bytes of code and data. -- Twirl2.tap has 387 bytes of code and data -- etc..

 

Edited by Norman Sword
added a 2nd version.
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.