Go to bottom

realtime dithering for 8x8 plasma effect on c64

category: general [glöplog]
Can it be done? Instead of prerenderd charsets I mean.
added on the 2009-11-25 01:13:52 by chriz74 chriz74
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.
added on the 2009-11-25 04:41:03 by Oswald Oswald
What would be the point? If the plasma is already 8x8, why wouldn't you use a charset?
added on the 2009-11-25 10:53:42 by xeron xeron
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!"
added on the 2009-11-25 11:11:27 by Sdw Sdw
the point is to get splines instead of broken approximative curves (charsets).
added on the 2009-11-25 13:13:11 by chriz74 chriz74
why don't you find out by coding it?
added on the 2009-11-25 13:15:42 by britelite britelite
because I can't code. I was just asking.
added on the 2009-11-25 13:19:45 by chriz74 chriz74
:( Now nobody will never know.
added on the 2009-11-25 14:38:59 by scoutski scoutski
maybe someone will try. who knows.
added on the 2009-11-25 15:03:01 by chriz74 chriz74
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.
added on the 2009-11-25 15:04:13 by chriz74 chriz74
(splines or whatever curves they are)
added on the 2009-11-25 15:04:39 by chriz74 chriz74
now, splines on c64! that's a feat!
added on the 2009-11-25 15:51:00 by rudi rudi
So, what you're saying really is "can you do a 1x1 plasma effect on c64"?
added on the 2009-11-25 15:54:32 by xeron xeron
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.
added on the 2009-11-25 16:17:38 by Oswald Oswald
plasma splines also. WTF man, you have no fucking clue.
added on the 2009-11-25 16:18:57 by Oswald Oswald
Another question then: are cone cubes possible on atari xl?
added on the 2009-11-25 17:20:19 by psonice psonice
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.
added on the 2009-11-25 18:07:42 by chriz74 chriz74
.. probably a lo more than 360 chars by the way, considering narrowing of the curve angles and stuff. So...
added on the 2009-11-25 18:19:14 by chriz74 chriz74
Express your angle in radians and you'll get away with just about 6.28 characters. ;)
added on the 2009-11-25 18:23:34 by KK KK
download & analyze some simple plasma source, your questions make no sense whatsoever
added on the 2009-11-25 18:23:53 by havoc havoc
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.
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:


;setting up two tables

for x=0 to xsize
next x

for y=0 to ysize
next y

;drawing to the screen happens here

for x=0 to xsize
for y=0 to ysize
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.
added on the 2009-11-25 19:46:04 by Oswald Oswald
maybe i miss sth ( and i know who you are !! )
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 ;)
added on the 2009-11-25 21:51:09 by Oswald Oswald


Go to top