realtime dithering for 8x8 plasma effect on c64
category: general [glöplog]
Can it be done? Instead of prerenderd charsets I mean.
you must be on drugs to render 8x8 dithered pixels onto a bitmap instead of using a charset. but yes it can be done. ~12 fps if you're tricky enough I'd say.
What would be the point? If the plasma is already 8x8, why wouldn't you use a charset?
Yeah, makes no sense at all.
Even if you were going for something like 8x4 or 4x4, it's still much better to have predithered chars.
"So I have this Ferrari, can I hook up a couple of donkeys before it and use it as a cart?"
"Yeah I guess you could, but it makes more sense to, you know, DRIVE the car!"
Even if you were going for something like 8x4 or 4x4, it's still much better to have predithered chars.
"So I have this Ferrari, can I hook up a couple of donkeys before it and use it as a cart?"
"Yeah I guess you could, but it makes more sense to, you know, DRIVE the car!"
the point is to get splines instead of broken approximative curves (charsets).
why don't you find out by coding it?
because I can't code. I was just asking.
:( Now nobody will never know.
maybe someone will try. who knows.
Anyway I didn't mean rendering the dither on a bitmap. I mean coding a shading routine that renders dither in realtime around plasma splines.
(splines or whatever curves they are)
now, splines on c64! that's a feat!
So, what you're saying really is "can you do a 1x1 plasma effect on c64"?
if you dont use bitmap and dont use chars, then u have ran out of screen modes on c64. frankly you have got no fucking idea what are you blabbling about.
plasma splines also. WTF man, you have no fucking clue.
Another question then: are cone cubes possible on atari xl?
As I said.. whatever curves. I don't know what.. and I am not asking for a 1x1 effect. Using charset I think you are limited, isn't it? You should have ideally 360 chars for every angle the curve makes.. so couldn't it be rendered realtime considering the angle inside the 8x8 space? This is what I mean.
.. probably a lo more than 360 chars by the way, considering narrowing of the curve angles and stuff. So...
Express your angle in radians and you'll get away with just about 6.28 characters. ;)
download & analyze some simple plasma source, your questions make no sense whatsoever
Christ, I'm glad I never ask questions on Pouet. I don't need my enthusiasm or interest in a problem to be annihilated without a second thought.
Chriz74: Use MSPaint to show what you mean and maybe you'll get a more constructive response.
Chriz74: Use MSPaint to show what you mean and maybe you'll get a more constructive response.
Chriz, excuse me for being so rude. Let me explain: there are no splines involved in these plasmas, you are adding up sines for each pixel and done. In c64 basic metacode:
nextframe:
;setting up two tables
xptr1=xptr1+someval1
xptr2=xptr2+someval2
for x=0 to xsize
tabx(x)=sin(xptr1+x*q)+sin(xptr2+x*q)
next x
yptr1=yptr1+someval3
yptr2=yptr2+someval4
for y=0 to ysize
taby(x)=sin(yptr1+y*q)+sin(yptr2+y*q)
next y
;drawing to the screen happens here
for x=0 to xsize
for y=0 to ysize
screen(x,y)=palette(tabx(x)+taby(y))
next y
next x
goto nextframe
q is a scale factor so the offset by x/y will make up reasonable steps in radian. in assembly you dont do this ofcourse as you have 8 bit sine tables and x*q will be replaced by some 8 bit value, and an integer stepping through value.
nextframe:
;setting up two tables
xptr1=xptr1+someval1
xptr2=xptr2+someval2
for x=0 to xsize
tabx(x)=sin(xptr1+x*q)+sin(xptr2+x*q)
next x
yptr1=yptr1+someval3
yptr2=yptr2+someval4
for y=0 to ysize
taby(x)=sin(yptr1+y*q)+sin(yptr2+y*q)
next y
;drawing to the screen happens here
for x=0 to xsize
for y=0 to ysize
screen(x,y)=palette(tabx(x)+taby(y))
next y
next x
goto nextframe
q is a scale factor so the offset by x/y will make up reasonable steps in radian. in assembly you dont do this ofcourse as you have 8 bit sine tables and x*q will be replaced by some 8 bit value, and an integer stepping through value.
maybe i miss sth ( and i know who you are !! )
but aint that the wrong way round ?
shouldnt the loop go through every x in every y instead of from top to down ?
i never coded c64 tho, just amigas and PCs..just seems strange to me, so i gotta ask this ! ;)
but aint that the wrong way round ?
Code:
for x=0 to xsize
for y=0 to ysize
screen(x,y)=palette(tabx(x)+taby(y))
next y
next x
shouldnt the loop go through every x in every y instead of from top to down ?
i never coded c64 tho, just amigas and PCs..just seems strange to me, so i gotta ask this ! ;)
i know it doesnt matter at all, but if x differs from y in size, and they being the resolution-sizes, it would be more right to do it the other way round, aint it ?!
yeah, its better to do horizontal spans, but this is just to show the general idea to chriz & that plasmas have no splines :) on the extreme you just calculate a few horizontal lines and mix those to get a fullscreen and fast plasma. Edge of Disgrace is full of those, you can see it when vertically there's a lot of repetition of the same line, tho you need a fast eye ;)