* *
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 18, 2018, 01:10:37 PM

Login with username, password and session length

Shadow Trails 2017 - tech demo

  • 43 Replies
  • 1378 Views
*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5295
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: Shadow Trails 2017 - tech demo
« Reply #30 on: February 13, 2018, 09:30:50 AM »
I just use an old DC animation script and spawn the entity with alpha transparency when the hero move is activated. You can choose from 6 different alpha channels and delay and do whatever you want. Wrong or not, its the way i do shadow trails. I don't like much that effect btw...i like to see clearly my hero doing his move.

Do you mind to share it?

*

Offline masterderico

  • Full Member
  • ***
  • 95
Re: Shadow Trails 2017 - tech demo
« Reply #31 on: February 13, 2018, 10:56:40 AM »
I'm on phone now, i post here when i go home.

But there's no secret. Just create a panel type none with the animation you want (need to be idle).

Example,

You want the shadow on freespecial 2, then u spawn that entity.

If you use follow, u spawn the entity on the anim follow of course.

The key is use the same animation on the none entity and use alpha to do the transparent effect, and use negative value to the trail entity stay a little behind the freespecial.
« Last Edit: February 13, 2018, 11:02:50 AM by masterderico »

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5295
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: Shadow Trails 2017 - tech demo
« Reply #32 on: February 13, 2018, 11:01:10 AM »
Ah, its the how I imagined to work (I use this already on my game).
For just some animations, it could work. But for a whole game, no. You will ending having issues with palettes (unless you change them on the fly), create additional animations and such.

Malik's method is more reliable. But thanks anyway.

*

Offline masterderico

  • Full Member
  • ***
  • 95
Re: Shadow Trails 2017 - tech demo
« Reply #33 on: February 13, 2018, 11:04:07 AM »
Yes, how i don't like much shadow trails, i use just in some situations.

*

Offline masterderico

  • Full Member
  • ***
  • 95
Re: Shadow Trails 2017 - tech demo
« Reply #34 on: February 13, 2018, 11:05:43 AM »
How is the Malik technique?

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5295
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: Shadow Trails 2017 - tech demo
« Reply #35 on: February 13, 2018, 11:06:32 AM »
How is the Malik technique?

It's the one described on this topic :)

@Malik - probably, you will need the get the "colourtable" Entityproperty and use it on those sprites.

*

Offline masterderico

  • Full Member
  • ***
  • 95
Re: Shadow Trails 2017 - tech demo
« Reply #36 on: February 13, 2018, 11:08:40 AM »
Oh, ok.

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1857
    • DC Current
Re: Shadow Trails 2017 - tech demo
« Reply #37 on: February 13, 2018, 11:26:01 AM »
Sorry, I got hit with RL and forgot about this topic. In a nutshell, O'Ill is right. You get the color table from the entity and apply to draw-method as you generate the trails. That's really all there is to it.

Note, it's the color table, NOT the mapping index. Shadow trails are sprites drawn right to the screen, they aren't entities and there's no such thing as a set of color mappings for them.

DC
Projects in progress are now available here: https://github.com/DCurrent

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5295
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: Shadow Trails 2017 - tech demo
« Reply #38 on: February 13, 2018, 11:45:11 AM »
You get the color table from the entity and apply to draw-method as you generate the trails. That's really all there is to it.
changedrawmethod isn't documented at the manual, but looking at the source code, there is a property called "table" (_dm_table), so probably is this, right?

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1857
    • DC Current
Re: Shadow Trails 2017 - tech demo
« Reply #39 on: February 13, 2018, 12:01:53 PM »
Correct.

Code: [Select]
// Get color table pointer from target entity
void table = getentityproperty(entity, "colourmap");

// Apply color table pointer to global drawmethod.
changedrawmethod(NULL(), "table", table);

// Add any other drawmethod effects here. You'll probably want
// transparency for sure. This is also where you could add more stuff
// like that ugly blue Capcom tint if you want.

// Draw the shadow and reset global drawmethods...
Projects in progress are now available here: https://github.com/DCurrent

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1857
    • DC Current
Re: Shadow Trails 2017 - tech demo
« Reply #40 on: February 13, 2018, 01:23:04 PM »
Sorry O' Ilusionista, I accidentally deleted your post!  :-[

To answer your question, no, it is in fact "colourmap" that gets the pointer for an entity's current color table.

The "colortable" property is get the color table pointer by index. You could use it to make your shadow trails always match up to a specific color map index regardless of which one the entity is currently using.

DC
Projects in progress are now available here: https://github.com/DCurrent

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5295
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: Shadow Trails 2017 - tech demo
« Reply #41 on: February 13, 2018, 01:34:09 PM »
Got it. So if we use colourtable, which works by index, we could get, for example, the 4th map from any entity, even if that palette is not the current one.

*

Offline Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1857
    • DC Current
Re: Shadow Trails 2017 - tech demo
« Reply #42 on: February 13, 2018, 01:56:46 PM »
Got it. So if we use colourtable, which works by index, we could get, for example, the 4th map from any entity, even if that palette is not the current one.

Yep. Watch yourself though and make sure the value you want actually exists. Pointers are the ultimate power in OpenBOR script, but one mistake will cause a memory fault. Meaning an honest to goodness crash, not a logged shutdown.

DC
« Last Edit: February 13, 2018, 02:00:42 PM by Damon Caskey »
Projects in progress are now available here: https://github.com/DCurrent

*

Online msmalik681

  • Hero Member
  • *****
  • 956
Re: Shadow Trails 2017 - tech demo
« Reply #43 on: February 15, 2018, 02:04:24 AM »
Could have swore i tried this but anyway it worked here is the new tech demo v3.0 shadows now show in your current map.


BIG thank you DC  ;D

 

Recent

Members
Stats
  • Total Posts: 48704
  • Total Topics: 3342
  • Online Today: 59
  • Online Ever: 316
  • (January 04, 2013, 09:43:02 AM)
Users Online
Users: 3
Guests: 27
Total: 30