|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
|
someone good with art can help me with some VU needles?
Posted: Thu Nov 07, 2019 11:10 pm
|
I'm working on this. I had put a red dot now, but I'd like to draw proper needles (sprites). Any taker?
|
|
|
Posted: Thu Nov 07, 2019 11:20 pm |
I guess a single pixel line is what’s needed - so you could generate them on the fly. If you are plotting PSG volumes then you only have 16 possibilities - so you could pre-render (perhaps with antialiasing and shadows) and do it without sprites at all. | |
|
Posted: Thu Nov 07, 2019 11:33 pm |
I guess I'm lazy and I prefer sprites ;) | |
|
Posted: Fri Nov 08, 2019 1:42 am |
If you’re looking for smooth rotation, may I introduce you to my friend Mr. Bresenham?
https://en.m.wikipedia.org/wiki/Bresenham's_line_algorithm |
|
|
Posted: Fri Nov 08, 2019 9:50 am |
I think I know him. Still I'd like to keep a very lazy approach to this ;) | |
|
Posted: Fri Nov 08, 2019 10:25 am |
So you want someone to draw some lines? Is this for PSG volume levels? Should they be linear or logarithmic on this scale? A “proper” VU meter should smooth the needles between levels, and rendering 60fps transitions would be nice. Failing that, you’re just drawing lines in a paint program... | |
|
Posted: Fri Nov 08, 2019 5:40 pm |
No, I'm not just showing the current volume, even if I can switch to that mode with a button.
OK I know, I shouldn't be so lazy. Actually rendering the lines myself I could even display some 256 levels, and that would work as I'm adding the volume level over 17 frames (so max is 17*15=255)... should I render over empty tiles and use them with sprites or should I render over existing tiles? Again I'm probably seeking the cheapest solution in terms of work to do ;) also probably using color 15 for that it would mean that I have just to OR my rendered byte with all the 4 bitplanes... mmm... |
|
|
Posted: Fri Nov 08, 2019 7:47 pm |
If you're going to use sprites, you will probably hit the 8 sprites on a line. I would suggest realtime compositing them in BG.
I wrote some compositing routines which may be of use? https://github.com/SavagePencil/SMSFramework/blob/master/Utils/tile_routines.asm... |
|
|
Posted: Fri Nov 08, 2019 8:01 pm |
If your background is 8 colours or less you can draw into the high bit plane. | |
|
Posted: Mon Nov 11, 2019 2:31 pm |
lines will mostly be vertical so I think I won't really hit that limit Will see what I can do and will post news. |
|
|
Posted: Tue Nov 12, 2019 9:25 am |
OK, I'm using this very simple line algorithm with some pre-rendered line segments (sprites) that I'm assembling so to build a longer segment and results seems interesting so far :)
|
|
|
Posted: Tue Nov 12, 2019 4:25 pm |
I'd be interested to see how that differs from Bresenham's (or the integer-only variant linked in the Wikipedia article above). At some point this weekend I should revisit how Michael Abrash's highly optimized assembly version for x86 worked. | |
|
Posted: Wed Nov 13, 2019 9:54 am |
Bresenham's accumulates the 'error' and each time this goes over 0.5, it will increment the other coordinate. This is sort of less precise, but still effective enough for my needs, I'd say. | |