Search found 27 matches

by DoctorRad
Fri Apr 12, 2024 11:14 pm
Forum: Programming
Topic: Euclidean dist/Sqrt/Multiplication routines 16bit
Replies: 38
Views: 1035

Re: Euclidean dist/Sqrt/Multiplication routines 16bit

You need a function which is always < sqrt(x² + y²) though, such as 2(|dx| + |dy|)/3 (I think). That should never overestimate the cost.
by DoctorRad
Fri Apr 05, 2024 9:59 am
Forum: Programming
Topic: Euclidean dist/Sqrt/Multiplication routines 16bit
Replies: 38
Views: 1035

Re: Euclidean dist/Sqrt/Multiplication routines 16bit

For example I'd need it for my A* algorithm as an admissive heuristic function. I did use the tile-distance (Chebyshev+Taxicab) as metric but the results are not good enough. Euclidean dist would be just the right metric. Could you calculate the square root less often or not at all if you used a di...
by DoctorRad
Thu Apr 04, 2024 9:52 am
Forum: Programming
Topic: Hull-Dobell theorem for procedural generation/screen fades etc.
Replies: 21
Views: 770

Re: Hull-Dobell theorem for procedural generation/screen fades etc.

ParadigmShifter wrote: Wed Apr 03, 2024 5:35 pm I can't see the article :( My browser or ISP doesn't like it...
I made a copy on my OneDrive.
by DoctorRad
Thu Apr 04, 2024 9:40 am
Forum: Programming
Topic: Bank switching issue
Replies: 38
Views: 1377

Re: Bank switching issue

At the moment I have my "Drawing" screen at $B000 and my "Visible" screen at $4800, with graphics data at $C000 (and code at $8000). I'm only using/copying 4096 bytes of screen space as it's just the bottom two-thirds of the screen where the action occurs. The top third is for t...
by DoctorRad
Wed Apr 03, 2024 9:57 pm
Forum: Showcase your work!
Topic: Abersoft fig-Forth Recompiled
Replies: 109
Views: 3346

Re: Abersoft fig-Forth Recompiled

i can redraw about 4 sprites before the ray hits the first scr$ byte. but the problem is, as i said, that there could be other code executed before sprite printing: sfx, beeper music, AY music, and so on. especially for music, i don't want it to "float". You could do everything else you w...
by DoctorRad
Wed Apr 03, 2024 9:50 pm
Forum: Programming
Topic: Euclidean dist/Sqrt/Multiplication routines 16bit
Replies: 38
Views: 1035

Re: Euclidean dist/Sqrt/Multiplication routines 16bit

Did you consider using CORDIC square root? Or too slow / not accurate enough?
by DoctorRad
Wed Apr 03, 2024 9:14 pm
Forum: Showcase your work!
Topic: Abersoft fig-Forth Recompiled
Replies: 109
Views: 3346

Re: Abersoft fig-Forth Recompiled

interrupt handler will take first 8 sprites from the queue, and sort them in 3 sub-batches: one sub-batch per 1/3 of screen$. it won't sort sub-batches themselves, though. An alternative approach that someone more adept than me could code up fairly easily I think: David Webb's routines from his boo...
by DoctorRad
Wed Apr 03, 2024 5:29 pm
Forum: Showcase your work!
Topic: Abersoft fig-Forth Recompiled
Replies: 109
Views: 3346

Re: Abersoft fig-Forth Recompiled

thank you! but it still doesn't have a source code (or i am unable to extract it). I was assuming that all the entry points to the sprite routines for Machine Lightning would be exposed so you could call them from your own assembler or otherwise compiled code… or is that not what you're seeking to ...
by DoctorRad
Wed Apr 03, 2024 5:22 pm
Forum: Programming
Topic: Hull-Dobell theorem for procedural generation/screen fades etc.
Replies: 21
Views: 770

Re: Hull-Dobell theorem for procedural generation/screen fades etc.

I've had this tatty old photocopy of an old Dr Dobbs article for decades which had a really nice way of doing digital dissolves. I found an online copy of it here https://archive.org/details/1986-11-dr-dobbs-journal/page/48/mode/2up Thanks, very interesting. One thing I'm not getting - maybe it's a...
by DoctorRad
Tue Apr 02, 2024 5:00 pm
Forum: Showcase your work!
Topic: Abersoft fig-Forth Recompiled
Replies: 109
Views: 3346

Re: Abersoft fig-Forth Recompiled

sadly, most of the "laser library" is one blob of machine code, without any headers. i vaguely remember that there was a Laser Basic disassembly around. There's always Machine Lightning, which presumably has similar capabilities. While the software is in the archives, the documentation ap...
by DoctorRad
Tue Apr 02, 2024 4:36 pm
Forum: Programming
Topic: Bank switching issue
Replies: 38
Views: 1377

Re: Bank switching issue

If I have graphics data in bank 3 and a drawing screen in say bank 7, I'd need to instantly swap to the graphics bank, grab the data, then switch to the screen to place it there. This is another good page covering the memory map . http://www.breakintoprogram.co.uk/wp-content/uploads/2020/05/table_s...
by DoctorRad
Thu Mar 28, 2024 5:34 pm
Forum: Graphics
Topic: Bullet Spray routines
Replies: 28
Views: 1925

Re: Bullet Spray routines

There doesn't appear to be a lot of awareness or appreciation of David Webb's book Advanced Spectrum Machine Language, which among other things, includes fast (pixel) plot and draw routines. The latter could probably be adapted into a straight-line bullet animation routine.
by DoctorRad
Wed Mar 27, 2024 2:55 pm
Forum: Programming
Topic: The Definitive Programmer’s Guide to Using the Floating Bus Trick on the ZX Spectrum
Replies: 59
Views: 15002

Re: The Definitive Programmer’s Guide to Using the Floating Bus Trick on the ZX Spectrum

Either that, or the tested area is not wide enough for the loop to catch it. Make sure you have enough consecutive cells with the desired attributes. Depending on which machine you run this on (48K/128K), the loop will take a different amount of time to sync up. To be on the safe side, I recommend ...
by DoctorRad
Wed Mar 27, 2024 12:48 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

When I was deluding myself that Nirvana could do 4x2 colour, I was thinking that a 12x12 grid would be possible, rather than 12x12 characters on a 16x16 grid… but obviously that's not possible. However, there may be some scope for 10x10 or 12x12 sprites to simplify animation. I'm honestly just a bag...
by DoctorRad
Sun Mar 24, 2024 3:54 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

Standing and then flying (without vertical movement for now). I'd like to get the jet exhaust more 'raggedy', but there's limited scope in 8x16.

Image
by DoctorRad
Sun Mar 24, 2024 2:36 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

A couple more ideas…

Stealth mode: no comms or firing, so aerial retracted and gun away.
Image

Shielded mode (with a turn off part way) like stealth, only with a modicum of protection.
Image
by DoctorRad
Sun Mar 24, 2024 1:48 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

Is it supposed to be straddling more than one character cell? Because you've got too many colours per section in those pics. If you draw them in ZX-Paintbrush as a .btile, it forces you to obey the bicolour restrictions. Doh! Yes, for some reason I'd got it in my head that btiles allowed 4x2 colour...
by DoctorRad
Sat Mar 23, 2024 6:33 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

Let's try again with some image embedding then… I changed the head slightly to make it more helmet-like, I think I prefer it this way.

Image
by DoctorRad
Sat Mar 23, 2024 6:15 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

PeterJ wrote: Sat Mar 23, 2024 5:32 pm Are you also @Dr_Rad? If so, we need to merge accounts.
I've only ever used the full spelling as far as I remember :D
by DoctorRad
Sat Mar 23, 2024 6:14 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Re: Totally speculative bicolour 8x8 Jetman ideas…

I thought it would need 9x9 or 10x10 to work, but this is pretty good I think. The walking is monochrome with a one-pixel horizontal resolution and one foot staying put during the step, with a twanging aerial. I would like the aerial to twang back to vertical when stationary, I guess, and also when ...
by DoctorRad
Sat Mar 23, 2024 5:26 pm
Forum: Design/Ideas
Topic: Totally speculative bicolour 8x8 Jetman ideas…
Replies: 10
Views: 958

Totally speculative bicolour 8x8 Jetman ideas…

Resurrecting some ideas from four decades ago, I got sketching… I can't get inline images working, so here's a Google album where I'll also throw any more that I do…

https://photos.app.goo.gl/C5CcoPk4VFRWS8jHA
by DoctorRad
Fri Mar 22, 2024 3:45 pm
Forum: Brand new software!
Topic: Super Sonic Bros. Fast scrolling platform game which tries to not look like a ZX game
Replies: 19
Views: 1415

Re: Super Sonic Bros. Fast scrolling platform game which tries to not look like a ZX game

rothers wrote: Fri Feb 09, 2024 11:47 am Here is a level I made for it this morning:
https://toastyfox.com/zx/sonic.html
Link appears to be broken?
by DoctorRad
Wed Mar 20, 2024 11:52 am
Forum: Programming
Topic: getting sound effects out of the beeper
Replies: 26
Views: 1486

Re: getting sound effects out of the beeper

Cobra on the 48k spectrum has an amazing sound routine, but I can find nothing online explaining even how to make these 1bit samples or what it might be doing to make the sound: My suggestion would be to hook a Spectrum or emulator up to something which allows you to record a WAV of the sound, and ...
by DoctorRad
Wed Mar 20, 2024 9:21 am
Forum: Games/Software
Topic: What was this combat platform game?
Replies: 2
Views: 490

Re: What was this combat platform game?

Yes! That's the one… I was remembering the enemies in spacesuits as 'skeletal'. Many thanks!
by DoctorRad
Tue Mar 19, 2024 11:48 pm
Forum: Games/Software
Topic: What was this combat platform game?
Replies: 2
Views: 490

What was this combat platform game?

A game I only ever played on an emulator, I don't remember seeing it before about 1986 when I sold my Spectrum. It was a combat platformer with what I can only describe as 'skeletal' graphic - very sparse use of ink. I think the hero was 12 pixels tall, and there was a LOT happening on screen in ter...