Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Plasmas

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Magnus   Members   

122
Like
Likes
Like

Posted 06 January 2000 - 12:52 PM

Could someone quickly sum up the programming theory behind a low res plasma? (13h) Thanks Magnus

#2 NuFAN   Members   

122
Like
Likes
Like

Posted 07 January 2000 - 08:05 PM

Hi,
there are several ways to create a plasma, you could create one based on a sinus curve like this :


procedure PutPixel(x, y : word; col : byte); assembler;
asm;
push 0a000h
pop es
mov ax, y
mul 320
add ax, x
mov di, ax
mol al, byte ptr col
mov es:[di], al
end;

procedure DoPlasma;
var col : byte
begin
for y := 0 to 199 do
for x := 0 to 319 do
begin
col := 127 + 63.5 * sin(x * 10) + 63.5 * sin(y*10);
PutPixel(x, y, col);
end;
end;


There are more ways to create a plasma. You could also create one through palette rotation, but that looks ugly IMO.

CU

Graphix Coding @
Skullpture Entertainment




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.