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 / How do you add Ex-Gen special effects to DarkBASIC?

Author
Message
ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 15th Mar 2005 10:43 Edited at: 1st Jul 2009 09:06
1

hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 15th Mar 2005 11:38
Well there are several ways. I usually texture some plains with the explosion texture and then add some ghosting and lighting. Then you can rotate it around, adjust its size, etc.

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 15th Mar 2005 23:54 Edited at: 1st Jul 2009 09:06
2

Robin
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location: United Kingdom
Posted: 16th Mar 2005 20:29
When you export the bitmap with the explosion pictures on, you have 16 different pictures don't you? (one bitmap which you can divide into 4 accross and four down?)
- In DB, load the bitmap using the load bitmap command
- then get the 16 images from the bitmap using the 'get image' command. you will need to change the coordinates for the top, bottom, left and right accordingly for each section of the bitmap.
- you have now loaded the 16 images (make sure you numbered them consecutively ie. 1->16). You can delete the bitmap using the delete bitmap command
-make a plain, set it to the camera orientation, and ghost it/set transparency on as you wish
-Use something like (assuming the plain is object number one and you have numbered the images 1 to 16):


And it should work let me know if you have any difficulties!
Robin

http://www.thegameszone.tk | [email protected]

MMMBop, ba duba dop ba do bop, Ba duba dop ba do bop, Ba duba dop ba do. Oh yeah
ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 17th Mar 2005 08:56 Edited at: 1st Jul 2009 09:06
3

Robin
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location: United Kingdom
Posted: 17th Mar 2005 20:30
Ok I don't have Dbp on this computer at the moment, but off the top of my head, the get image command is:
get image (image number),top,left,bottom,right
basically, once you've loaded your bitmap as mentioned above, you can cut it up into sections and use bits of the bitmap as seperate images. I don't have exgen, but I'll guess it exports bitmaps sized 512x512. If you look at the bitmap you will see it can be divided into four accross and four down to make all the different frames of the animation. you would use the get image command as follows


This gets the four images from the top row. the top,left,bottom,right parameters are the coordinates on the bitmap of the image you want to get. I'll post a bit later when I get home with a fuller code snippet.

The code to actually animate it is very simple:

you've got a variable called 'texture' which is increasing every loop by 1.
we are texturing the plain (object number 1) with whatever image the texture variable's value represents. The
if texture>16 then texture=1
bit makes sure the texture number doesn't go above 16, as then when we use the texture object command, we will get a image doesn't exist error.
basically, you are texturing the plain with the 16 different images you've got from the bitmap, one after the other in numerical order, and this will create the illusion of it being animated.

I'll post again when I get home with a complete version of the code snippet

Robin

ps. to find out how to use most commands in DB, put the cursor over the command and press F1

http://www.thegameszone.tk | [email protected]

MMMBop, ba duba dop ba do bop, Ba duba dop ba do bop, Ba duba dop ba do. Oh yeah
ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 17th Mar 2005 23:47 Edited at: 1st Jul 2009 09:06
4

Robin
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location: United Kingdom
Posted: 18th Mar 2005 03:52
Heres a better, commented snippet I just wrote, should work now, and I hope it answers your questions :


Robin

http://www.thegameszone.tk | [email protected]

MMMBop, ba duba dop ba do bop, Ba duba dop ba do bop, Ba duba dop ba do. Oh yeah
ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 18th Mar 2005 05:04 Edited at: 1st Jul 2009 09:06
5

Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 18th Mar 2005 08:12
If you suck at get image, how about splitting the file made by exgen into iduvidual images, loading them all in and then texturing a plain one by one with the images and viola!...animated effect.
ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 18th Mar 2005 09:23 Edited at: 1st Jul 2009 09:06
6

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:25 Edited at: 1st Jul 2009 09:06
7

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:26 Edited at: 1st Jul 2009 09:06
8

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:29 Edited at: 1st Jul 2009 09:06
9

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:30 Edited at: 1st Jul 2009 09:07
123

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:55 Edited at: 1st Jul 2009 09:07
12

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:57 Edited at: 1st Jul 2009 09:07
1234

ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 19th Mar 2005 02:59 Edited at: 1st Jul 2009 09:07
142

Robin
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location: United Kingdom
Posted: 21st Mar 2005 17:40 Edited at: 21st Mar 2005 17:40
No, you have to be a mod to lock threads lol
You can always split your bitmap into seperate images, but the get image command is much easier. I made this diagram to help you understand the command:



the left,top,right and bottom parameters are the coordinates on the bitmap of the section you want to 'cut out' and use as an image. As you can see the coordinates start from (0,0) in the top left of the picture, and in this case, go to (256,256) in the bottom right corner. In the above diagram I have shown the section of the bitmap which will be the first image, and the coordinated of the corners of this section (The 256x256 bitmap divides up into 16 64x64 images which are the dirrerent frames of the animation). In DB, the left,top,right and bottom parameters are the coordinates on the original bitmap of the respective sides.
eg. to get the first image, you would use


Robin

http://www.thegameszone.tk | [email protected]

MMMBop, ba duba dop ba do bop, Ba duba dop ba do bop, Ba duba dop ba do. Oh yeah

Attachments

Login to view attachments
ADGamer
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 21st Mar 2005 23:10 Edited at: 1st Jul 2009 09:07
152

Login to post a reply

Server time is: 2025-05-31 05:37:46
Your offset time is: 2025-05-31 05:37:46