<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
main
<script LANGUAGE=java-script><!--

function getMail() {
sEmail = "http://192.251.67.23/fansignup.asp?ReleaseID=13&BGColor=FF9900&FGColor=black&Email=" + SearchAndReplace(document.emailform.email.value, " ", "%20")
window.open(sEmail,''newWindow'',''toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=10,left=50,width=341,height=455'')
;
}
function SearchAndReplace(Content, SearchFor, ReplaceWith) {

var tmpContent = Content;
var tmpBefore = new String();
var tmpAfter = new String();
var tmpOutput = new String();
var intBefore = 0;
var intAfter = 0;

if (SearchFor.length == 0)
return;


while (tmpContent.toUpperCase().indexOf(SearchFor.toUpperCase()) > -1) {

// Get all content before the match
intBefore = tmpContent.toUpperCase().indexOf(SearchFor.toUpperCase());
tmpBefore = tmpContent.substring(0, intBefore);
tmpOutput = tmpOutput + tmpBefore;

// Get the string to replace
tmpOutput = tmpOutput + ReplaceWith;


// Get the rest of the content after the match until
// the next match or the end of the content
intAfter = tmpContent.length - SearchFor.length + 1;
tmpContent = tmpContent.substring(intBefore + SearchFor.length);

}

return tmpOutput + tmpContent;

}
function SubmitOnEnter(e)
{

if(document.layers){var key=e.which}
else if (document.all){var key=event.keyCode}

if(key==13){

getMail()

}

}

// --></script>


<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
main
<script LANGUAGE=java-script><!--

function getMail() {
sEmail = "http://192.251.67.23/fansignup.asp?ReleaseID=13&BGColor=FF9900&FGColor=black&Email=" + SearchAndReplace(document.emailform.email.value, " ", "%20")
window.open(sEmail,''newWindow'',''toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=10,left=50,width=341,height=455'')
;
}
function SearchAndReplace(Content, SearchFor, ReplaceWith) {

var tmpContent = Content;
var tmpBefore = new String();
var tmpAfter = new String();
var tmpOutput = new String();
var intBefore = 0;
var intAfter = 0;

if (SearchFor.length == 0)
return;


while (tmpContent.toUpperCase().indexOf(SearchFor.toUpperCase()) > -1) {

// Get all content before the match
intBefore = tmpContent.toUpperCase().indexOf(SearchFor.toUpperCase());
tmpBefore = tmpContent.substring(0, intBefore);
tmpOutput = tmpOutput + tmpBefore;

// Get the string to replace
tmpOutput = tmpOutput + ReplaceWith;


// Get the rest of the content after the match until
// the next match or the end of the content
intAfter = tmpContent.length - SearchFor.length + 1;
tmpContent = tmpContent.substring(intBefore + SearchFor.length);

}

return tmpOutput + tmpContent;

}
function SubmitOnEnter(e)
{

if(document.layers){var key=e.which}
else if (document.all){var key=event.keyCode}

if(key==13){

getMail()

}

}

// --></script>

Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bios

Blood effect!

This topic is 6144 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I need help in producing a blood effect with particles. How should particles behave to give a cool looking blood? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I don''t know if this will help too much, but I had a blood effect in one of my very first games. It was a 2d game where all the characters were represented by different sized circles done with BGI graphics. lol. The blood effect was probably the coolest thing in the game.

I had a loop go through 100 or 200 times (depending on how big the blood stain was). Every time it passed through the loop, it would update the xpos and ypos of the blood randomly, then draw a pixel at that updated point. This would give a completely random blood stain every time.

Example code:


int bloodxpos=BloodSourceXpos, //the source is where the
bloodypos=BloodSourceYpos; // blood starts at.

for(x=0;x<100;x++)
{
bloodxpos+=(rand()%3)-1;
bloodypos+=(rand()%3)-1;

//draw pixel on screen
putpixel(bloodxpos, bloodypos, COLOR_RED);
}


That is the basic idea behind my first (and only ) blood effect. I think it looks pretty cool.

Share this post


Link to post
Share on other sites
I had a similar code for my particle blood effect in a game some while ago. I don''w have the code (I think i lost it somwehere), but you can check the game at
http://hem.passagen.se/electrom/myprogs/linkf.zip

Share this post


Link to post
Share on other sites
Random blood is easy to make, looks somewhat nice. But I would prefer a better engine for it. You could use both particles and bitmaps. Using only particles look to ''thin'' and only bitmaps to ''static''. Add the two shouldn''t be such a problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster







<form name="emailform">
<table border="0" cellpadding="0" cellspacing="0" width="480" height="460">
<tr height="230">
<td width="480" height="230" colspan="3"></td>
</tr>
<tr height="115">
<td width="480" height="115" colspan="3"> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width=480 height=115>






</td>
</tr>
<tr height="115">
<td width="10" height="115" align="left" valign="top"></td>
<td width="235" height="115" align="left" valign="top">

UPCOMING EVENTS

SHOW:9/16/2001Arrowhead Pond Anaheim,
more events
</td>
<td width="230" height="115">
<table border="0" cellpadding="0" cellspacing="0" width="230" height="115">
<tr height="115">
<td width="200" height="115">  </td>
<td width="280" height="115">
<table border="0" cellpadding="0" cellspacing="0" width="230" height="115">
<tr height="29">
<td width="230" height="10"> </td>
</tr>
<tr height="48">
<td width="230" height="48">
<table cellpadding="0" cellspacing="0" width="230" height="48">
<tr height="48">
<td width="70" height="48" valign="bottom">
</td>
<td width="160" height="48">
<table border="0" cellpadding="0" cellspacing="0" width="160" height="24">
<tr height="28">
<td width="160" height="10" class="bodycopy" align="left" valign="bottom"> blink-182
mailing list
</td>
</tr>
<tr height="20">
<td valign="top" align="left">
<input name="email" type="TEXT" onKeyPress="SubmitOnEnter(event)" maxlength="50" value="email" size="16">
<input type="button" name="submit" value="ok" whenclickedon="getMail()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr height="38">
<td width="230" height="38"> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

</body>



</html>

Share this post


Link to post
Share on other sites
Guest Anonymous Poster







<form name="emailform">
<table border="0" cellpadding="0" cellspacing="0" width="480" height="460">
<tr height="230">
<td width="480" height="230" colspan="3"></td>
</tr>
<tr height="115">
<td width="480" height="115" colspan="3"> codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
width=480 height=115>






</td>
</tr>
<tr height="115">
<td width="10" height="115" align="left" valign="top"></td>
<td width="235" height="115" align="left" valign="top">

UPCOMING EVENTS

SHOW:9/16/2001Arrowhead Pond Anaheim,
more events
</td>
<td width="230" height="115">
<table border="0" cellpadding="0" cellspacing="0" width="230" height="115">
<tr height="115">
<td width="200" height="115">  </td>
<td width="280" height="115">
<table border="0" cellpadding="0" cellspacing="0" width="230" height="115">
<tr height="29">
<td width="230" height="10"> </td>
</tr>
<tr height="48">
<td width="230" height="48">
<table cellpadding="0" cellspacing="0" width="230" height="48">
<tr height="48">
<td width="70" height="48" valign="bottom">
</td>
<td width="160" height="48">
<table border="0" cellpadding="0" cellspacing="0" width="160" height="24">
<tr height="28">
<td width="160" height="10" class="bodycopy" align="left" valign="bottom"> blink-182
mailing list
</td>
</tr>
<tr height="20">
<td valign="top" align="left">
<input name="email" type="TEXT" onKeyPress="SubmitOnEnter(event)" maxlength="50" value="email" size="16">
<input type="button" name="submit" value="ok" whenclickedon="getMail()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr height="38">
<td width="230" height="38"> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>

</body>



</html>

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What the heck...?

Somebody please fix that . . . that thread pollution! Grrrrr. . . .

---
blahpers

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!