Shadow Trails Demo

Exhibition Shadow Trails 2017 - tech demo 3.0

No permission to download
Projects meant as a technical demonstrator or instructional tutorial.
Damon Caskey said:
Getting after images to use the entity's active color set is actually super easy



Do you mind sharing how I am guessing using the "table" drawmethod function but all my tests fail.
 
This causes a few issues with bloodbane's scripts.
The build I'm using is the latest one (4453).
Am I missing something?

Code:
Total Ram: 2146619392 Bytes
 Free Ram: 883732480 Bytes
 Used Ram: 3682304 Bytes

debug:nativeWidth, nativeHeight, bpp, Hz  1440, 900, 24, 60

0 joystick(s) found!
OpenBoR v3.0 Build , Compile Date: Apr  8 2017

Game Selected: ./Paks/My Mod.pak

FileCaching System Init......	Disabled
Initializing video............
Reading video settings from 'data/video.txt'.

Colordepth is depreciated. All modules are displayed with a 32bit color screen.

Initialized video.............	480x272 (Mode: 1, Depth: 8 Bit)

Loading menu.txt.............	Done!
Loading fonts................	1 2 3 4 Done!
Timer init...................	Done!
Initialize Sound..............	
Loading sprites..............	Done!
Loading level order..........	Done!
Loading model constants......	Done!
Loading script settings......	Done!
Loading scripts..............	Done!
Loading models...............

Cacheing 'Flash' from data/chars/misc/flash.txt
Cacheing 'Ryu' from data/chars/Ryu/Ryu.txt
Cacheing 'Shimo' from data/chars/Shimo/Shimo.txt
Cacheing 'Kenshiro' from data/chars/Kenshiro/Kenshiro.txt
Cacheing 'Apple' from data/chars/misc/apple.txt
Cacheing 'Meat' from data/chars/misc/meat.txt
Cacheing '1up' from data/chars/misc/1up.txt
Cacheing 'Money' from data/chars/misc/money.txt
Cacheing 'Gold' from data/chars/misc/gold.txt
Cacheing 'Time' from data/chars/misc/time.txt
Cacheing 'Box' from data/chars/misc/box.txt
Cacheing 'Crate' from data/chars/misc/crate.txt
Cacheing 'Trash' from data/chars/misc/trash.txt
Cacheing 'Table' from data/chars/misc/table.txt
Cacheing 'Chair' from data/chars/misc/chair.txt
Cacheing 'Fence' from data/chars/misc/fence.txt
Cacheing 'Drum' from data/chars/misc/drum.txt
Cacheing 'Trolly' from data/chars/misc/trolly.txt
Cacheing 'K'' from data/chars/k/k.txt
Cacheing 'biker-K'' from data/chars/biker-k/biker-k.txt
Cacheing 'Yashiro' from data/chars/yashiro/yashiro.txt
Cacheing 'Ralf' from data/chars/ralf/ralf.txt
Cacheing 'Shermie' from data/chars/shermie/shermie.txt
Cacheing 'Kang' from data/chars/Kang/kang.txt
Cacheing 'Joe' from data/chars/joe/joe.txt
Cacheing 'Yamazaki' from data/chars/yamazaki/yamazaki.txt
Cacheing 'Angel' from data/chars/angel/angel.txt
Cacheing 'Billy' from data/chars/billy/billy.txt
Cacheing 'Jhun' from data/chars/jhun/jhun.txt
Cacheing 'Mrbig' from data/chars/mrbig/mrbig.txt
Cacheing 'Robert' from data/chars/robert/robert.txt
Cacheing 'Heavy' from data/chars/heavy/heavy.txt
Cacheing 'K9999' from data/chars/K9999/K9999.txt
Cacheing 'Rugal' from data/chars/Rugal/Rugal.txt
Cacheing 'Ramon' from data/chars/ramon/ramon.txt
Cacheing 'Knife' from data/chars/misc/knife.txt
Cacheing 'Shot' from data/chars/misc/shot.txt
Cacheing 'Star' from data/chars/misc/star.txt
Cacheing 'Steam' from data/chars/misc/steam.txt
Cacheing 'Steamer' from data/chars/misc/steamer.txt
Cacheing 'Furnace' from data/chars/misc/furnace.txt
Cacheing 'Crab' from data/chars/crab/crab.txt
Cacheing 'Lobster' from data/chars/Lobster/Lobster.txt
Cacheing 'mezupr' from data/chars/misc/mezupr/mezupr.txt

Loading 'Flash' from data/chars/misc/flash.txt
Loading 'Ryu' from data/chars/Ryu/Ryu.txt
Loading 'Shimo' from data/chars/Shimo/Shimo.txt
Script compile error: can't find function 'slamstart2'

Script compile error in 'Kenshiro': slamstart2 line 36, column 12

********** An Error Occurred **********
*            Shutting Down            *

Can't compile script 'Kenshiro' data/chars/Kenshiro/Kenshiro.txt
Total Ram: 2146619392 Bytes
 Free Ram: 749703168 Bytes
 Used Ram: 34394112 Bytes

Release level data...........
Done!

Release graphics data........	Done!
Release game data............


Release game data............	Done!
Release timer................	Done!
Release input hardware.......	Done!
Release sound system.........	Done!
Release FileCaching System...	Done!

**************** Done *****************

Can't compile script 'Kenshiro' data/chars/Kenshiro/Kenshiro.txt
 
the log says "slamstart2" is missing from your animation scripts maybe you replaced your animation scripts with just the shadow trails animation script
 
Usually, the script declaration on my player characters goes like this:
animationscript data/scripts/player.c
animationscript data/scripts/shadow.c
ondrawscript data/scripts/shadowon.c

There's no way I can be replacing something when the scripts are in the folder AND being declared.
It's getting out of hand right now.
 
Kurisu said:
animationscript data/scripts/player.c
animationscript data/scripts/shadow.c

There's your trouble. You can't declare more than one animation script, or pretty much any other identical model attribute like that. If you try, the last one in order "wins", which is why your slam scripts are missing. The animation script itself needs to include the parts you'll be using.

DC
 
So I need to declare this on script.c:
#import "data/scripts/shadow.c"

and this on the character's txt file:
animationscript data/scripts/script.c
ondrawscript data/scripts/shadowon.c

Deal. Let's check now with the shadow trails and...
Yay! It worked like a charm. I knew I was doing something wrong. Thanks guys.
 
Damon Caskey said:
Getting after images to use the entity's active color set is actually super easy.
DC


DC I have been patiently waiting for this solution when you are free could you share how to apply the current palette to the sprite please.
 
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.
 
masterderico said:
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?
 
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.
 
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.
 
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
 
Damon Caskey said:
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?
 
Correct.

Code:
// 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...
 
Back
Top Bottom