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 Professional Discussion / Question about sword "trail" effect.

Author
Message
Nack
22
Years of Service
User Offline
Joined: 29th Jul 2003
Location:
Posted: 29th Jul 2003 18:35
Hi everyone,

I am new to this forum so not sure if this is in the right section to post this in.
Anyway, is it possible to make a "trail" effect similar to Zelda or Shinobi? For example, when you move the sword, a blue or white trail will follow the sword. Is it possible to do that in DBpro?

Thank you for your time.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Jul 2003 18:58 Edited at: 29th Jul 2003 18:59
Of course its possible. The correct way to do it would involve some beam effect using the memblocks commands. However thats a little complicated if you haven't used them before.

The easiest way to do it would be to create several copies of the sword object, and ghost the copies (not the original), you then rotate the copies just behind the main sword. Eg if the main sword is at an angle of 150 degrees, rotate the copies to 149, 148, 147 to give the impression of a trail.

That would only work for when the sword is swung, but normally that is the only time you see the trail in Zelda.

When the sword comes to a stop, hide the ghosted swords so they can't be seen.

AzureZeal
23
Years of Service
User Offline
Joined: 10th May 2003
Location:
Posted: 29th Jul 2003 19:04
Im curioous about the whole "beam" effect using memblocks. What do you mean?

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Jul 2003 19:08 Edited at: 29th Jul 2003 19:09
You create a mesh in the shape of the trail, and texture it. Using memblocks, you can position the verticies on the trail so that they follow the object which "casts" the trail. You can also make the trail fade out towards the end using the vertex alpha of each vertex (only words if the mesh has an FVF format of eg. 338 which supports diffuse).

I'm afraid I don't have any source code to do it (at least, not DarkBASIC code)
- however I have seen it done using this method in other languages.

Login to post a reply

Server time is: 2026-07-23 00:44:19
Your offset time is: 2026-07-23 00:44:19