Page 1 of 1

[227] Projector beta release (update)

Posted: Sun Dec 30, 2007 7:21 pm
by Raven
I've decided to release beta of my projector. "Projector" is used to spawn decal on bsp surface (co texture is required). Features:

* can trace other actors rotation/location
* can change size with distance (grow/shrink)
* can be used to create flickering light effect
* can be used as static projector (just spawns decal)

I dunno why, but states: TriggerControl, TriggerToggle, TriggerTurnsOff and TriggerTurnsOn doesn't work online. It's kinda strange because state Flicker uses similar code and it works fine.

Here's link: http://www.sendspace.com/file/ckwzgr archive contain sources. Please do not use it on maps or in mods. It's test release only.

EDIT:

I forgot to set bHidden in projector class to false. I've also included one sample configuration (tree shadow) and screenshot:

[URL=http://imageshock.eu/?img=1581177,Shot0007.jpg][img]http://imageshock.eu/img_small/1581177,Shot0007.jpg[/img][/URL]

Re: [227] Projector beta release (update)

Posted: Tue Jan 01, 2008 3:28 am
by .:..:
You could have done the replication a bit simplier, I.E:

Code: Select all

var bool bTimeToEnd,bSimTimeEnded;

replication
{
      // Variables the server should send to the client.
      reliable if( Role==ROLE_Authority )
            bTimeToEnd;
}

simulated function Tick( float Delta )
{
      if( Level.NetMode!=NM_Client )
      {
            Disable('Tick');
            Return;
      }
      if( bSimTimeEnded!=bTimeToEnd )
      {
            bSimTimeEnded = bTimeToEnd;
            if( bTimeToEnd )
                  OnEnd();
            else OnRecall();
      }
}

//Example on state
simulated state() TriggerTurnsOn
{
      simulated function Trigger( Actor Other, Pawn EventInstigator )
      {
           SetToEnd(false);
           OnRecall();
      }
Begin:
      SetToEnd(true);
}

defaultproperties
{
      bSimTimeEnded=True
}
This would ensure it actually works online

Re: [227] Projector beta release (update)

Posted: Tue Jan 01, 2008 3:33 am
by .:..:
As for your flicker state, there is no need to replicate whenever its on or off, let the client do it itself:

Code: Select all

simulated state() Flicker
{
      simulated function Timer()
      {
           if( ProjectorDecal!=None )
           {
                 //SetToEnd(true);
                 OnEnd();
                 if(bRandom) SetTimer(InActiveTime+(FRand() * RandomModifier), false);
                 else SetTimer(InActiveTime, false);
           }
           else
           {
                 //SetToEnd(false);
                 OnRecall();
                 if(bRandom) SetTimer(ActiveTime+(FRand() * RandomModifier), false);
                 else SetTimer(ActiveTime, false);
           }
      }
Begin:
      if( Level.NetMode==NM_DedicatedServer ) Stop; // If on dedicated server, go to sleep mode.
      SetTimer(InActiveTime, false);
}
Also I dont think its any good idea to Spawn and Destroy the decal all the time over there, rather deattach/attach it.
Becouse every time you spawn a new actor, a new name entry is added to name table taking up a little more memory:
"Projector0", "Projector1", "Projector2".

Re: [227] Projector beta release (update)

Posted: Tue Jan 01, 2008 5:53 pm
by Raven
http://www.sendspace.com/file/39up01 - updated version. In states Flicker, TriggerToggle, TriggerControl decls are detached not destroyed. Done what you've said dots, and still only states which works online are StaticProjector, ContinousUpdate and Flicker. It seems that other states are not even called on the client (or they never go to Loop label).

Re: [227] Projector beta release (update)

Posted: Fri Jan 04, 2008 2:00 pm
by Raven
Updated version. I've added new function to rotation tracing and new template - fan shadow from Vortex. I've made online tests and following states are 100% working:

- StaticProjector
- ContinousUpdate (with all tracing/rotation and stuff)
- Flicker

In all other states it seems that trigger function is not called online. Below sshot from Vortex Rikers:

[URL=http://imageshock.eu/?img=1664931,Shot0008.jpg][img]http://imageshock.eu/img_small/1664931,Shot0008.jpg[/img][/URL]

and download link: http://www.sendspace.com/file/704bd0

Mind, that I'm lame texture artist, and this shadow can look bad in-game. It just shows what can be done with projectors.

EDIT: [url=http://turniej.unreal.pl/files/uifx/u1emitter/uiprojector.html]temporary documentation[/url]

Re: [227] Projector beta release (update)

Posted: Fri Jan 04, 2008 3:04 pm
by Turboman.
my all these updates... ok i'll spare the comments in here as i've already said it in usp ;)

i'm hoping to get into using these once the final stable 227 is out :D

Re: [227] Projector beta release (update)

Posted: Fri Jan 04, 2008 10:48 pm
by fxsr789
my all these updates... ok i'll spare the comments in here as i've already said it in usp ;)

i'm hoping to get into using these once the final stable 227 is out :D

I can imagine the use of projectors in Firestorm, Turboman.

What a nice thing to make Raven, maybe I can make a forest map like that DM-TokaraForest off UT2004! When 227 gets stable enough... maybe..

- Fenix

Re: [227] Projector beta release (update)

Posted: Sat Jan 05, 2008 5:27 pm
by Raven
Tnx, done some changes. UIProjector will contain non-replicated stuff only. Rest off it (all trigger states) will go to UIExtendedProjector class. I've realized, that all triggered stuff will be used rarely, common type will be static and dynamic shadows (for instance tree shadow and rotating fan shadow). That's why there has to be one client-side only class for this effects, and other for everything which will involve replication.

Re: [227] Projector beta release (update)

Posted: Sat Jan 05, 2008 6:50 pm
by Turboman.
I can imagine the use of projectors in Firestorm, Turboman.
i would love too, unfortunately i'm keeping it developed under a 224 platform to provide maximum compatibility with older unreal's (i'm pretty sure its out before final 227 anyway :P)

but i'm keeping my eye on this for my later projects, much like the skeletal animation features ;D

Re: [227] Projector beta release (update)

Posted: Sat Jan 05, 2008 9:36 pm
by fxsr789
I feel like learning how to use 3DSMax again or something so I can model out my real self instead of using that other mesh I somehow like to use, oh wow my nose ring I almost forgot about it! Hahaha!

Wow from what you said, it looks like the next release of 227 will be out probably sooner before you can get Firestorm out! And hey I never knew you used 224v to make maps, I've always used 225f....

- Fenix