wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > - Submit a resource -
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 07-02-2011, 11:39 AM   #1
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,052

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default Cinema Workshop

Click image for larger version

Name:	CinemaWorkshop.jpg
Views:	220
Size:	12.2 KB
ID:	50357


Requirements:
ARGB
Table
LinkedList
TimerUtils
UnitAppearanceTracker
DisplayCenteredText
CINEMA WORKSHOP


This is a compilation of vJass libraries intended to replace the old Cinematic System, which is over five years old already. This compilation itself has been in the making for two years now and represents a major leap forward in terms of speed, functionality and user-friendliness.


Like its predecessor, Cinema Workshop consists of three main components:
  • Transition - A library that facilitates gradual changes of various properties such as unit position.
    Additional modules:



    • UnitTransition



    • UnitColorTransition
    • UnitScaleTransition
    • UnitFacingTransition
    • UnitPositionTransition
    • UnitWalk
    • TerrainFog


  • CineCam - A library that takes command of the game camera and gives the user more control over it.

  • CineScript - The core of the system, a powerful library for composing and playing sequences of events.
    Additional modules:


    • UnitAnimationCineScript
    • UnitTransitionCineScript
    • EnvironmentCineScript
    • UtilityCineScript
    • EffectCineScript
    • SoundCineScript
    • CameraCineScript
    • SubtitleCineScript


The new design is completely modular, each component can be used independently from the other two. Transition and CineScript each come with a collection of extensions that can be included in your map as needed. When used for their primary purpose of making cinematics, the three otherwise independent components achieve a strong synergy. The demo map includes both a sample cinematic that uses the entire CinemaWorkshop as well as a sample code for a triggered spell that only uses CineScript.

Expand Transition library:
Expand CineCam library:
Expand CineScript library:
Attached Files
File Type: w3x CinemaWorkshop.w3x (198.4 KB, 18 views)
__________________

Last edited by Anitarf : 01-29-2014 at 04:06 PM.
Anitarf is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 07-02-2011, 12:14 PM   #2
iNfraNe
MSc
 
iNfraNe's Avatar


Cinematics Moderator
 
Join Date: Dec 2003
Posts: 2,174

Submissions (7)

iNfraNe is just really nice (261)iNfraNe is just really nice (261)iNfraNe is just really nice (261)iNfraNe is just really nice (261)iNfraNe is just really nice (261)

Approved Map: Mortar Ball

Send a message via MSN to iNfraNe
Default

Finally! This is amazing Ani!
__________________
Inactive.
Table:
Past Projects:
The Spirit of Vengeance (Cinematic, Blizzard contest winner)
Elimination Tournament
Mortar Ball
iNfraNe is offline   Reply With Quote
Old 07-02-2011, 07:29 PM   #3
Bribe
User
 
Bribe's Avatar
 
Join Date: Mar 2010
Posts: 230

Submissions (1)

Bribe will become famous soon enough (26)

Send a message via AIM to Bribe
Default

Nice to see the this cinematic system finally converted into vJass. I don't see the previous "gc()" calls which, in itself, is a huge change for the better.

The local real array in the CineCam library could be turned into something more efficient, like a global array or a series of individual, properly named variables, due to the huge overhead of local arrays.

I hope that this sees some good public usage.

Last edited by Bribe : 07-02-2011 at 07:30 PM.
Bribe is offline   Reply With Quote
Old 07-02-2011, 09:39 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,052

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Bribe
Nice to see the this cinematic system finally converted into vJass.
CineCam is the only library that I would call a mere conversion. Transition, while still functioning similarly to the old particle subsystem, is so much more general, functional and modular that it really is more of a replacement for, rather than an evolution of, its predecessor. CineScript goes even further, accomplishing things that weren't remotely possible with the old system - see for yourself, try pressing escape while the sample cinematic is playing. ;)

Don't get this the wrong way, I know you didn't mean to say that this was "just a port", I just wanted to point out anyway that considerable improvements have been made beyond the obvious "it's in vJass now", since the first post doesn't mention that beyond the initial description.

Quote:
The local real array in the CineCam library could be turned into something more efficient, like a global array or a series of individual, properly named variables, due to the huge overhead of local arrays.
Well, it has to be an array since I can't use individual variables in a loop. If there is such a big difference between local and global arrays, I could make it global. In the cases where I can replace it with locals, I wonder if declaring those local variables wouldn't be more of an overhead than using an already declared array, especially if I switch to a global one. Were any benchmarks ever done to indicate how many uses of an array justifies a local declaration?

Quote:
I hope that this sees some good public usage.
Is there anyone left making cinematics at all? Even I don't know if I'll be using this for anything beyond the sample cinematic I made for it. Well, I did use CineScript when making my action map and it was incredibly useful there, so I want to point out again that these libraries needn't always be used in tandem, there's plenty of situations where they can be applied individually.
__________________
Anitarf is offline   Reply With Quote
Old 07-02-2011, 10:41 PM   #5
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

BBQ will become famous soon enough (30)BBQ will become famous soon enough (30)

Default

Quote:
Originally Posted by Anitarf
Well, it has to be an array since I can't use individual variables in a loop. If there is such a big difference between local and global arrays, I could make it global.
As far as I know, when using a local array, 32 kilobytes of memory (4 bytes per array slot, 8192 slots) would be allocated each time the function starts, and deallocated when the function returns. In the case of a global array, 32 kilobytes of memory would be allocated upon map initialization, and never deallocated.

But local variables are quite faster than globals, so I think that the use of a local array is absolutely justified, at least in this case.

Perhaps you could use a linked list (similar to the one in grim001's ListModule) instead of an array when looping through the struct instances in the Transition library.

This should most definitely see some good usage, although WC3 modding is slowly dying.

Last edited by BBQ : 07-02-2011 at 10:43 PM.
BBQ is offline   Reply With Quote
Old 07-03-2011, 10:01 PM   #6
Captain Griffen
Dread Lord of the Cookies
 
Captain Griffen's Avatar


Content Director
 
Join Date: Sep 2003
Posts: 5,368

Submissions (2)

Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)

Approved Map: Warlords[Quicksilver #2] - 1st Place

Default

Quote:
But local variables are quite faster than globals, so I think that the use of a local array is absolutely justified, at least in this case.

Citation needed. My testing I seem to recall showed no discernible difference in speed.
__________________
Quote:
Originally Posted by Earth-Fury
Griffen is correct, you are not.
Quote:
[13:32] <Akolyt0r> hmm.. stil i want to have some unused women
Captain Griffen is offline   Reply With Quote
Old 07-03-2011, 10:14 PM   #7
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

BBQ will become famous soon enough (30)BBQ will become famous soon enough (30)

Default

Quote:
Originally Posted by Captain Griffen
Citation needed. My testing I seem to recall showed no discernible difference in speed.
I can't provide you with any citations, but I am very sure that the speed at which variables can be accessed depends on how many variables are there in the scope.

And you know it yourself that vJass can generate hundreds of globals, which in turn makes them slower.
BBQ is offline   Reply With Quote
Old 07-03-2011, 11:11 PM   #8
Captain Griffen
Dread Lord of the Cookies
 
Captain Griffen's Avatar


Content Director
 
Join Date: Sep 2003
Posts: 5,368

Submissions (2)

Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)Captain Griffen is a glorious beacon of light (497)

Approved Map: Warlords[Quicksilver #2] - 1st Place

Default

Quote:
I can't provide you with any citations, but I am very sure that the speed at which variables can be accessed depends on how many variables are there in the scope.

Why would you be very sure of that? Consider that we aren't just dealing with a VM, we're dealing with a Blizzard VM.
__________________
Quote:
Originally Posted by Earth-Fury
Griffen is correct, you are not.
Quote:
[13:32] <Akolyt0r> hmm.. stil i want to have some unused women
Captain Griffen is offline   Reply With Quote
Old 07-04-2011, 12:38 PM   #9
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,052

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Captain Griffen
Why would you be very sure of that? Consider that we aren't just dealing with a VM, we're dealing with a Blizzard VM.
We'd need to test this in a map where you can easily switch between having no and a few hundred declared variables/arrays (by the use of nested textmacros) and then do a hundred get/set operations (again with textmacros, no loops) and test how long that takes depending on the number of global variables in the map and depending on whether the get/set operations are being done on a global or a local, so four test cases in total. Someone with a working japi would need to do this since I don't trust fps tests with something as fast as variable operations, but this is really a subject for a new thread.

Quote:
Originally Posted by BBQ
As far as I know, when using a local array, 32 kilobytes of memory (4 bytes per array slot, 8192 slots) would be allocated each time the function starts, and deallocated when the function returns. In the case of a global array, 32 kilobytes of memory would be allocated upon map initialization, and never deallocated.
It was my understanding that arrays were allocated incrementally as needed, but maybe I misunderstood what this post says. In either case, if local variables are indeed faster than globals when there are many globals in the map then this is a moot point as the amount of operations I do on the local array should out-weight the cost of its allocation.

Quote:
Originally Posted by BBQ
Perhaps you could use a linked list (similar to the one in grim001's ListModule) instead of an array when looping through the struct instances in the Transition library.
I could do that, but the speed gain would be insignificant. If I was having performance issues with Transition, the first thing I would do would be to rewrite UnitPositionTransition, since that one is likely to see the most use and its onTransition method is uninlineable, so I would copy&paste the Transition code into it instead of implementing the module so that I could inline the onTransition method manually. If I were to go this far, then it would make sense to also use grim001's module, but considering how ugly this solution is I would rather not go this far unless I need to.
__________________
Anitarf is offline   Reply With Quote
Old 07-04-2011, 02:35 PM   #10
BBQ
User
 
Join Date: May 2011
Posts: 85

Submissions (2)

BBQ will become famous soon enough (30)BBQ will become famous soon enough (30)

Default

Quote:
Originally Posted by Captain Griffen
Why would you be very sure of that? Consider that we aren't just dealing with a VM, we're dealing with a Blizzard VM.
Okay, here's a post by grim001 that I stumbled upon:
"I once had the idea that it would be better to use only global vars in my engine in order to avoid repeatedly initializing locals. The result is that the whole engine ran about 20% slower.

According to Pipedream the speed of variable access depends on how many other vars there are in that scope. vJASS maps can create thousands of global vars for structs, so globals have a very long list to sort through, whereas locals typically only have a few.

So basically, whichever you have fewer of (locals or globals) should be faster, but you will always have more globals than locals unless you are a freak."
Perhaps you trust him more than you trust me.

Quote:
Originally Posted by Anitarf
We'd need to test this in a map where you can easily switch between having no and a few hundred declared variables/arrays (by the use of nested textmacros) and then do a hundred get/set operations (again with textmacros, no loops) and test how long that takes depending on the number of global variables in the map and depending on whether the get/set operations are being done on a global or a local, so four test cases in total. Someone with a working japi would need to do this since I don't trust fps tests with something as fast as variable operations, but this is really a subject for a new thread.
Unfortunately, textmacros cannot be nested.

Quote:
Originally Posted by Anitarf
It was my understanding that arrays were allocated incrementally as needed, but maybe I misunderstood what this post says. In either case, if local variables are indeed faster than globals when there are many globals in the map then this is a moot point as the amount of operations I do on the local array should out-weight the cost of its allocation.
While the thread you linked to is very awesome (thanks!), it doesn't seem to show whether the memory is allocated incrementally or not.

But anyway, here's a post by weaaddar:
"An array in jass will always use 8192 elements. No matter if your only using 1 or 400. Its very bad to use arrays that you do not need to use. As each type in war3 uses a 4kb integer as its pointer. So you are using roughly 32kb of ram per array. Sure it doesn't seem like much but remember that types also have there own memory usage on the handling stack."
BBQ is offline   Reply With Quote
Old 07-06-2011, 11:25 AM   #11
BlackRose
User
 
Join Date: Apr 2009
Posts: 35

BlackRose is on a distinguished road (12)

Default

Amazing sample cinematic, I crave more.
BlackRose is offline   Reply With Quote
Old 07-10-2011, 04:00 AM   #12
PurgeandFire111
User
 
PurgeandFire111's Avatar
 
Join Date: Dec 2006
Posts: 249

PurgeandFire111 will become famous soon enough (58)PurgeandFire111 will become famous soon enough (58)

Default

Awesome! I was always waiting for vJASS cine libs. I'll definitely check this out.
PurgeandFire111 is offline   Reply With Quote
Old 08-18-2011, 09:04 PM   #13
TotallyAwesome
User
 
TotallyAwesome's Avatar


Project Member: TBR
 
Join Date: Apr 2008
Posts: 582

Submissions (7)

TotallyAwesome is a jewel in the rough (164)TotallyAwesome is a jewel in the rough (164)

Send a message via ICQ to TotallyAwesome Send a message via AIM to TotallyAwesome Send a message via MSN to TotallyAwesome Send a message via Yahoo to TotallyAwesome
Default

Wow, this is a really incredible system, wish I had noticed this earlier! Learning to use it now, I first thought of using your old system, but was put off by a lot of outdated stuff (which, still, worked really well in practice).
__________________
Quote:
[23-56-42] Captain Griffen orders Hakeem to say: /me is going to bed now, with Wulfy, and he hopes that he will come out again with his manhood still attached...
TotallyAwesome is offline   Reply With Quote
Old 01-29-2014, 12:28 PM   #14
BlackRose
User
 
Join Date: Apr 2009
Posts: 35

BlackRose is on a distinguished road (12)

Default

Reupload map?
BlackRose is offline   Reply With Quote
Old 01-29-2014, 04:09 PM   #15
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,052

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by BlackRose
Reupload map?
Ah, I didn't realize the download link was broken from the downtime. Should be fixed now.

I have some further updates planned for this, at the moment I am waiting to see if I'll be able to convince Vex to add a feature I'd like to use to JassHelper.
__________________
Anitarf is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 06:44 AM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services