Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Plasmas


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   -  Reputation: 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

Sponsor:

#2 NuFAN   Members   -  Reputation: 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.



PARTNERS