Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / FireScript Animation! Open source functions to make fire effects cooler!

Author
Message
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 2nd Apr 2006 20:38 Edited at: 2nd Apr 2006 20:40
Welcome to FireScript Animation. FireScript is a new WIP script of functions that will make fire effects in your game easier. The fire effects were initially made for KRO (Kaos Realm Online) but I decided to start building it up to release it for everyone.

V 1.0

Here is a short Video capture of Firescript in work. (the video might make the fire look choppy, but its actually alot smoother)
http://www.kaosrealmonline.com/FireScript.wmv
And here is the media.
[href]http://www.kaosrealmonline.com/Fire Images-EXTRACT.zip[/href]


As you can see, in V 1.0 you can have multiple fires simultaeneosly running. The images used for the fire are not mine, and I do not intend to take all the credit for them. I did not draw them, I used them.

Here are the 3 easy WIP functions used to use FireScript.

Function 1
loadfire(i1#,i2#,i3#,i4#,i5#,i6#,i7#,i8#)

What this function does, placed at the top of your program (after sync setup) is load the 8 fire images for the fire into the 8 image numbers you choose.

Put this function at the end of your entire game code.


Function 2
setupfire(onum#,sx,sy,x,y,z)

This function, placed right after the first function, is used to make the fire object. 'onum#' would be the object number of the fire you are making. 'sx' and 'sy' and the size on the x and y axis' of the fire you are making. 'x' 'y' and 'z' are the positions of the fire object you are making.

Put this function at the end of your entire game code.


Function 3
controlfire(onum#,i1#,i2#,i3#,i4#,i5#,i6#,i7#,i8#)

This funtion, used inside the main loop, is of course used to control the fire. 'onum#' would be the fire object number you are controling. 'i' 1 through 8 would be the image numbers of the fire images you loaded in the first function.

Put this function at the end of your entire game code.


The only last thing you have to do is place the code:
global firecount#
firecount#=-2

-Right after your sync setup to make the variable 'firecount#' usable in all functions.

An Example of all this is right here (be sure to have the media in the same folder as the EXE) :


Thanks, hope it helps,
-Xeno

P.S. remember there will be more functions and the current 3 functions will be updated in the new versions.

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 2nd Apr 2006 20:43
Great work btw i have a new msn now add me

Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 2nd Apr 2006 21:08
Thanks, and I'll add you...


ALSO I am open to any suggestions for FireScript.

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 2nd Apr 2006 21:36
I have one

Give us screenies

FunkyStickmen: Battle of the Races (1%)
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 2nd Apr 2006 22:34
They wouldn't be very appealing, or effective. It will only capture one frame of the fire... and the video is only 1 mb, it captures the whole sequence. It downloads in 2 seconds from my comp...

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Nack
21
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 2nd Apr 2006 23:39
It doesnt look too bad! Speed isnt affected too much with this rite? lol
nice work!
nack


DC got a name change.....^^
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 2nd Apr 2006 23:46
Thanks!

By speed, if you mean FPS, then no, cuz they are 2 polies each fire. If you meant the speed of the fire, then in the the video it looks slow and choppy but its actually very smooth.

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 2nd Apr 2006 23:46
this is soo not advanced code.. lol
its nice, but not that good though

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 2nd Apr 2006 23:47
Yeah, I'm improving, thanks... since you are the only one who said it is not that good... what do you think there should be?

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 3rd Apr 2006 00:53
- Automatic Get "FreeObject" function
- arrays to save object number and use "For loop" instead of the bunch of the same commands.


make something like:


basicly thats the code. i havent tryed it yet. i just wrote it on the forum's window and thats all..

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 3rd Apr 2006 02:00
Free object is a bad idea for some people, because most poeple dont make MMO's... and they need their object numbers orginized...

Saving and loading of fires will be a pretty cool feature

And a for next loop doesn't work, the different fires have to wait for the other fire to be textured a different texture, and that looks like a fire changing textures every 5 seconds.

So after I get 3D sound working for the nest version, I will add saving and loading of fires.

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 3rd Apr 2006 03:48
V 1.1
Functions:


I added 3D sound to it...

Example:



The fire looks better, and the 3D sound is pretty good.

MEDIA:
[href]http://www.kaosrealmonline.com/Fire Images-EXTRACT.zip[/href]
http://www.kaosrealmonline.com/Sound1.wav

Video:

Well, the sound in this is really horrible, but trust me it sounds much better in DB!

http://www.kaosrealmonline.com/FireVid.wmv

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 3rd Apr 2006 14:24
Quote: "Free object is a bad idea for some people, because most poeple dont make MMO's... and they need their object numbers orginized..."

huh?! do u know what you have just said?!

then how about:
MyPlayer = FreeObj()
load object "Player",MyPlayer

so you replacing object number in variable.. is that bad?

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 3rd Apr 2006 23:05
But Gogeta, the majority of the poeple on these forums dont use freeobj(). They would do something like: 'Buildings, objects 100 to 300' or 'Fire Particles, objects 1500 to 1600 for fornext loop'. Some people specify the object numbers for every single object...but if you want, I can create an extra function for those few freeobj and freeimage users

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 4th Apr 2006 07:51 Edited at: 4th Apr 2006 07:51
Quote: "But Gogeta, the majority of the poeple on these forums dont use freeobj(). "

because they dont understand the method.

just like i was before i understood how FreeObj() is useful.

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 4th Apr 2006 10:00
Looks nice...one problem, why are you passing float values into arguments that require integers ?



M.I.A is pending
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 4th Apr 2006 12:56
yeah..
# means shortcut of float
$ means shortcut of string
and nothing in the end of the variable, means shortcut of integer.

and much better if you will do something like:
a as Integer
a as String
a as Dword
etc.

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 4th Apr 2006 15:14
Quote: "
a as Integer
a as String
a as Dword
"


I personally dont like using this method other than for UDT's as I have the memory of a retarded goldish after a quick swim in a acid bath, so i'd forget what type of varibale it was if I didnt have the '#'.

M.I.A is pending
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 4th Apr 2006 17:28
well, actually i think its better even for me to understand the error line

for example,
u got variable:
myhouse$ = "Hello World"

and you just didnt wrote the "myhouse$" variable rightly. the compiler wont notice that its an error. the compiler will compile it anyway..

but in my case,
if u doing something like:
MyHouse as String = "Hello world"

and im misspelling with the "MyHouse" variable. the compiler will notice that problem and report to you.

i hope i explained it right.. lol

MyNewSite:http://gogetax.com
Forums(About BLO and more):http://gogetax.com/forum
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 5th Apr 2006 00:11
Oh, lol, I was trying something and forgot to change that back, will fix in V 1.2

Did anyone try the 3D sound in V 1.1? How was it?

"Forgiveness is a good thing"
"Forgiveness is between them, and God. I set up the meeting"
-Man on Fire

Login to post a reply

Server time is: 2024-09-29 12:24:39
Your offset time is: 2024-09-29 12:24:39