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.

DarkBASIC Discussion / Smoke on *.X

Author
Message
Freezer
21
Years of Service
User Offline
Joined: 12th Nov 2002
Location:
Posted: 12th Nov 2002 23:30
Hello!
I wonder how i can do at smoke effect back on my Space ship?
Whould be greatful if some body could write it down for me =) //Freezer
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 13th Nov 2002 00:36
i am so glad that i know how to make smoke after all this time. i learned it all by myself(no tutorials). it was a really long time that i finally learned it. so here is the code so you dont have to kill yourself to know it like i did. the shipx# varibles is the position of your ship. plus i coded it from my head,so if it does not work, try to fix it yourself. but if you dont understand it, i will put together a little "rem" into it saying what the commands do.
enjoy!


sync on
sync rate 30
dim up(10)
dim position(10)
load image "",1
for x=1 to 10
make object plain x,10,10
texture object x,1
next x
do
for x=1 to 10
position(x)=object position y(x)
position object x,cos(shipx#)*10,position(x),sin(shipz#)*10
up(x)=up(x)+1
if up(x)>200 then up(x)=0:position object x,shipx#,position(),shipz#:position(x)=shipy#
next x
sync
loop

Freezer
21
Years of Service
User Offline
Joined: 12th Nov 2002
Location:
Posted: 13th Nov 2002 23:00
Okey! it didn´t work it can be me who is a newbie at darkbasic or that the code doesn´t work =).. So please do a rem explonation... //Freezer

Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 13th Nov 2002 23:14
Did you copy the code directly? Instead of load image "",1 put the name of a texture i.e a 256x256 image of smoke and put it in there i.e

load image "putyourimagenamehere.jpg", 1.

Whatever I did I didn't do it!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 13th Nov 2002 23:53
Also in that code the position array has no parameter in this line:
if up(x)>200 then up(x)=0:position object x,shipx#,position(),shipz#:position(x)=shipy#

I'd imagine x would go in between the brackets.
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 14th Nov 2002 12:54
yeah, add a texture like what Kentaree said. and i will soon fix up so it is easier for you. i will also put the "rem" to explian. plus i think if up(x)>200 then up(x)=0:position object x,shipx#,position(),shipz#:position(x)=shipy# will work when it runs. but remember, i did not right this in darkbasic and runned the code, i wrote it using all the syntax that i could remember in my head.

TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 17th Nov 2002 17:41
remember me? yeah, i did not forget and do what i say. here it is. just pop it in and run. in 1.13. though, add texture to it. if you save it in the tutorials folder, take out the two rems. the texture is added. try to figure out and study it rather then me have to do extra work as of an explaination with rem

dim up#(10)
dim x#(10)
dim z#(10)
sync on
sync rate 30
make object cube 1,10
rem load image "fire.bmp",1
position object 1,0,0,0
for x=2 to 10
make object plain x,5,5
rem texture object x,1
ghost object on x
position object x,cos(rnd(100))*5,(x)*2,cos(rnd(100))*5
next x

position camera 10,0,50
point camera 0,0,0
do
for x=2 to 10
up#(x)=object position y(x)+.5
x#(x)=object position x(x)
z#(x)=object position z(x)
position object x,x#(x),up#(x),z#(x)
if up#(x)>20 then position object x,cos(rnd(100))*5,0,cos(rnd(100))*5
next x
sync
loop

TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 27th Nov 2002 01:10
hey, i know it has been a long time from the last post but u did not here from you guys if this helps. plus i made the code better. it is like fire but you could make it into smoke. plus, add a fire or smoke texture to it.



Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 29th Nov 2002 23:59
or you could look for the MageFX demos, or ask Van-B

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 30th Nov 2002 00:00
there were alot of cool examples and great files on the madmerlin forums... now gone though and on the dbtoolz.50megs site too

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 30th Nov 2002 03:19
Madmerlins has become RGT forums and is one of the biggest database you can find...At least easy since you can search the records...I can't imagine myself going through the whole Apollo forums just to find a particle example lmao.

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 30th Nov 2002 21:16
are you guys talking to me or Freezer? or everyone.

Freezer
21
Years of Service
User Offline
Joined: 12th Nov 2002
Location:
Posted: 1st Dec 2002 02:02
Okey thanks.. By the way.. Does someone no how to do a game into LAN multi-player support?? /Freezer

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 1st Dec 2002 03:16
If your a noob, I wouldnt try that right now

Check the Dark Matter enhancement pack and db v 1.13

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 1st Dec 2002 03:58
RPGgamer is right. you have to at least understand my example to do a game into LAN multi-player support. its more complicated... trust me.

Freezer
21
Years of Service
User Offline
Joined: 12th Nov 2002
Location:
Posted: 1st Dec 2002 19:52
I under stand it and i have begun to work on my Multi-Player game.. But it would help if someone with experiens looked on the code and saw what they can do.. //Freezer

Login to post a reply

Server time is: 2024-03-29 09:28:03
Your offset time is: 2024-03-29 09:28:03