Spider Posted June 3, 2021 Author Report Share Posted June 3, 2021 Both excellent. Does make my head spin a bit though 😄 I have one too that is a modified version of something I found on a Blog (but I can't find it again and I was not using my own computer I mailed myself a text copy of it!) , so I'll see about posting that tomorrow, once I've 'fixed' it. Its vaguely similar to Norman's 'Shape' , except its written in Basic. Quote Link to comment Share on other sites More sharing options...
JianYang Posted June 3, 2021 Report Share Posted June 3, 2021 (edited) 17 hours ago, Norman Sword said: I took the visual idea of above and wrote the code in assembler. I'm flattered. You assembler guys really make every byte count. ½kbyte is impressive.  Edit: I found something cute in BASIC. 2 POKE 23693,0: BORDER 0: CLS : PAPER 8: LET f=USR "b": LET y=32767: FOR x=0 TO 7: LET h=INT (y/256): POKE f-1-x,h: POKE f+7-x,y-256*h: POKE f+16+x,255-h: POKE f+8+x,255-y+256*h: LET y=INT (y/4): NEXT x: LET d=2: LET r=1: FOR j=0 TO 1 STEP 0: LET t=r+2: LET l=r+1: PRINT AT y,x; INK t;"\a\b\d\c";AT y+1,x; PAPER t; INK l;"\d\c"; INK r;"\a\b";AT y+2,x; PAPER l; INK l;"**"; INK r; PAPER r;"**";AT y+3,x; INK 8; PAPER l;"\d\c"; PAPER r;"\a\b": FOR k=0 TO 1 STEP 0: LET v=-2: LET w=1: IF d=0 THEN LET v=0: LET w=-2 4 IF d=2 THEN LET v=2 5 LET e=d: IF y+w<0 OR y+w>18 OR x+v<0 OR x+v>28 OR RND>.9 THEN FOR z=0 TO 1 STEP 0: LET e=INT (RND*3): IF e=d THEN NEXT z 6 IF d<>e THEN LET d=e: NEXT k 7 LET x=x+v: LET y=y+w: LET r=5-r: NEXT j  block.tap Edited June 4, 2021 by JianYang Avoid double post MtM 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 5, 2021 Author Report Share Posted June 5, 2021 That's actually very impressive @JianYang, I was not expecting (from a cursory read of the Basic) it to be 'that good' 🙂 JianYang 1 Quote Link to comment Share on other sites More sharing options...
MtM Posted June 5, 2021 Report Share Posted June 5, 2021 Almost QBert that JianYang! Spider 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 5, 2021 Author Report Share Posted June 5, 2021 1 hour ago, MtM said: Almost QBert that JianYang! Have vague memories of it from the arcade. I did find Spellbound (Beyond Software) which is a similar clone and not a bad game all-in-all.  On topic: 10 BORDER 0 : PAPER 0 : INK 7 : CLS 20 LET T=0 30 LET X=RND*255 : LET Y=RND*175 40 IF (RND*10) > 3 THEN LET T=1 50 PLOT INK RND*7 ; INVERSE T ; X,Y 60 GOTO 20 Preview: Tape: stars.tap Not efficiently written. Wrote it in a moment while thinking what to put after my opening sentence as I wanted to 'add something'. Will be better in assembly by a long margin (plus that means ease of lower screen plotting via direct altering of 16384-22527) however for now run emulation at high speed perhaps. 🙂 Quote Link to comment Share on other sites More sharing options...
JianYang Posted June 5, 2021 Report Share Posted June 5, 2021 On 6/3/2021 at 7:42 PM, Norman Sword said: The real purpose of writing this was to show the size difference between C and assembler. Do you have some irrational anger against C? That's not meant as an allegation. I have some irrational anger against Java and Python myself. 3 hours ago, MtM said: Almost QBert that JianYang! It was meant as an homage to "isometric" spectrum games like Ant Attack, Knight Lore and Head Over Heels. I guess by making it more colourful, I ruined that a bit. 2 hours ago, Spider said: I did find Spellbound (Beyond Software) which is a similar clone and not a bad game all-in-all. There are too many games called Spellbound for the speccy. Do you have a specific purpose for these eye candy programs? I remember you starting a similar thread on WOS, about type-ins for unwatched spectrums (that's where the block thing originated, I could never get it short enough though). Your stars demo reminded me of blinkenlights, so I tried to maximize that impression by aligning everything to a 2x2 grid. I don't know if it helped. blinkenlights.tap jetsetdanny and Spider 1 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 6, 2021 Author Report Share Posted June 6, 2021 15 hours ago, JianYang said: There are too many games called Spellbound for the speccy. Only three, potentially two. ? 🙂 Quite possible have missed one out, I'm -sure- there was some early text adventure with this title, but it may well of been on another platform entirely. Spellbound (Beyond) the QBert type of game Spellbound (Mastertronic) Magic Knight etc Spellbound Dizzy (CodeMasters) platformy game. Never tried it! 15 hours ago, JianYang said: Do you have a specific purpose for these eye candy programs? I remember you starting a similar thread on WOS, about type-ins for unwatched spectrums (that's where the block thing originated, I could never get it short enough though). Not really other than its a bit of harmless fun. No routine in this topic would be laughed at for being too crude or poorly written, if it works it works. The topic died a death on WOS, eons ago. I did consider a new one on SpectrumComputing but thought "what the hell, I might as well have one here" as it is chat for both on and off topic subjects, plus it gives those who may not frequent too many other forums the chance to see/comment on things here. 🙂 15 hours ago, JianYang said: Your stars demo reminded me of blinkenlights, so I tried to maximize that impression by aligning everything to a 2x2 grid. I don't know if it helped. Oh it does. I like it! 🙂 I did consider doing something a bit larger but gave up on it. jetsetdanny 1 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 7, 2021 Author Report Share Posted June 7, 2021 Just another quick one 😉 "Quarter Graphics" Using the built in graphics codes for a quarter 8x8 cell fill: 129 = Upper Right 130 = Upper Left 132 = Lower Right 136 = Lower Left Routine firstly chooses a random block from the choice of four above, then picks a random colour ink. At this stage a further test is made. If a random number between 0 and 10 is higher than 7 then the ink is set to black to 'blot out' the cell to be printed. Next, a small loop is entered with a random number of iterations, between 1 and 3 (to determine how many of which colour to draw) and then in the loop itself a location on screen (0-23 / 0-31) is chosen at random and a further check is done, if the x column is higher than 21 a separate printing routine is called, otherwise its printed simply with AT x,y as normal. The loop then repeats for 1-3 cycles with that same random colour, then the whole code runs again. Note: This was written quickly, without thought to much speed or efficient Basic. I could write it much neater and with probably a bit more execution speed and certainly without such an untidy layout, however it "does do the job" I do realise its only pseudo random. The method used to 'print' on lines 22 and 23 does tend to work fine unless certain pieces of addon hardware are present and its far 'safer' than setting 23659 to zero temporarily as well as a risk of a crash that only really allows you to use 22. Preview pic and tape file: quarter_attributes.tap jetsetdanny and JianYang 2 Quote Link to comment Share on other sites More sharing options...
Spider Posted June 12, 2021 Author Report Share Posted June 12, 2021 Do have a couple more although not posting just yet. I did try compilation too, but the speed increase was not actually great say 20%. Quote Link to comment Share on other sites More sharing options...
Norman Sword Posted June 13, 2021 Report Share Posted June 13, 2021 (edited) This is basically a re write of the routine I added to Manic Miner (dual - Software Projects and Bug Byte). Major difference being it is not constrained to a game playing area, and the backdrop. Â explode.tap Edited June 13, 2021 by Norman Sword wrong file - uploaded 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.