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 > Code Resources > Systems
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-03-2009, 09:45 PM   #16
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

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

Default

Quote:
Originally Posted by Opossum
That link doesn't work for me
Right, my mistake. Fixed the link now.

Quote:
True and that's exactly what the function does. Its name is just a bit outdated. Sorry about that. Guess I'll just inline that function into the camera function anyway. That will also get rid of the struct as you've mentioned.
It seems I missed a few lines in there. I suppose I was confused because you were returning a point when in fact the function could have just returned the minimum angle of attack allowed.

By the way, when calling the function, why do you check the distance twice of the actual camera's distance to target? Also, the terrain height sampling step should be a calibrateable constant.

Quote:
This might be another good idea. I guess I'll keep my original method for the DISTANCE values though as it's easier for the user to adjust the camera settings then.
I don't know about that. The user can choose whatever angle interval he wants so a capped system gives him more options, since choosing 300:600 330:700 would give a different result from 285:550 345:750. With your current method those two cases work the same though, which I think is an unfortunate loss of functionality. If the user wants it to work like it currently does he could always chose something like 270:500 360:800.

Quote:
I don't think I need such a complex library featuring key sequences and stuff.
It doesn't feature anything of the sorts. It does pretty much what you need it to do and nothing more.
__________________
Anitarf is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-05-2009, 09:14 PM   #17
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Updated to 1.1

Quote:
Originally Posted by Anitarf
It seems I missed a few lines in there. I suppose I was confused because you were returning a point when in fact the function could have just returned the minimum angle of attack allowed.

By the way, when calling the function, why do you check the distance twice of the actual camera's distance to target? Also, the terrain height sampling step should be a calibrateable constant.
Yeh I had quite some weird things in there. The code should be much more sensible now - though still not commented.

Quote:
I don't know about that. The user can choose whatever angle interval he wants so a capped system gives him more options, since choosing 300:600 330:700 would give a different result from 285:550 345:750. With your current method those two cases work the same though, which I think is an unfortunate loss of functionality. If the user wants it to work like it currently does he could always chose something like 270:500 360:800.
Well the actual idea behind that was that the user could just create two camera objects in the world editor and copy its settings to the constants so he'd have a smooth camera transition in the end.
In 1.1 I'm now trying what you suggested though and see how it will work out. It already came up with some convenient advantages for the settings though.
Opossum is offline   Reply With Quote
Old 03-06-2009, 12:48 AM   #18
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

You still have the UseFixedCamForPlayer function in the FixedCam library, I can't honestly see a use for this anymore as you can just call FixedCam_Use with the PAN_DURATION value if you don't want a different firstPan duration.

Speaking of the firstPan.. it's somewhat inaccurate/bugged:
Collapse JASS:
    public function Use takes player whichPlayer, unit whichUnit, real x, real y, real z, real firstPan returns nothing
        local integer p = GetPlayerId(whichPlayer)
        
        set Unit[p] = whichUnit
        set X[p] = x
        set Y[p] = y
        set Z[p] = z
        call TimerStart(FirstPan[p], firstPan, false, null)
        if GetLocalPlayer() == Player(p) then
            call StopCamera()
            if whichUnit != null then
                call ApplyCam(p, firstPan)
            endif
        endif

Collapse JASS:
    private function CamPeriodic takes nothing returns nothing
        local integer i = 0
        
        loop
            exitwhen i == MAX_PLAYERS
            if Unit[i] != null and GetLocalPlayer() == Player(i) then
                if TimerGetRemaining(FirstPan[i]) == 0 then
                    call ApplyCam(i, PAN_DURATION)
                else
                    call ApplyCam(i, TimerGetRemaining(FirstPan[i])+PAN_DURATION)
                endif
            endif
            set i = i+1
        endloop
    endfunction

Say you do call FixedCam_Use(Player(0), unit, 32, 54, 100, 3) it will initially start to pan to the x, y and z over 3 seconds but when the CamPeriodic callback fires, it will then pan there over 3 + PAN_DURATION seconds (minus a maximum of TIMEOUT seconds).
I'd suggest something like this:
Collapse JASS:
private function CamPeriodic takes nothing returns nothing
        local integer i = 0
        
        loop
            exitwhen i == MAX_PLAYERS
            if Unit[i] != null and GetLocalPlayer() == Player(i) then
                if TimerGetRemaining(FirstPan[i]) <= PAN_DURATION then
                    call ApplyCam(i, PAN_DURATION)
                else
                    call ApplyCam(i, TimerGetRemaining(FirstPan[i]))
                endif
            endif
            set i = i+1
        endloop
    endfunction

Also the documentation in the map is outdated (it's still talking about OppiCamBase).

Last edited by Fledermaus : 03-06-2009 at 12:59 AM.
Fledermaus is offline   Reply With Quote
Old 03-06-2009, 06:24 PM   #19
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Quote:
Originally Posted by Fledermaus
You still have the UseFixedCamForPlayer function in the FixedCam library, I can't honestly see a use for this anymore as you can just call FixedCam_Use with the PAN_DURATION value if you don't want a different firstPan duration.

Also the documentation in the map is outdated (it's still talking about OppiCamBase).
Bwuh... fixed both.

Quote:
Speaking of the firstPan.. it's somewhat inaccurate/bugged:
Expand JASS:

Expand JASS:

Say you do call FixedCam_Use(Player(0), unit, 32, 54, 100, 3) it will initially start to pan to the x, y and z over 3 seconds but when the CamPeriodic callback fires, it will then pan there over 3 + PAN_DURATION seconds (minus a maximum of TIMEOUT seconds).
I'd suggest something like this:
Expand JASS:

That's actually fine too. I had the problem that without the additional PAN_DURATION the camera could sometimes pan over like 0.012 seconds or whatever when the timer was still > 0 but which made the camera a bit jerky in the last moments of firstPan.
That condition should be a smarter way to solve that though.

Although I think it wouldn't have been much of an issue using the additional PAN_DURATION. A firstPan of 0 would still be instant and at higher values you don't notice it anyway.

Anyway... updated to 1.1b fixing the things mentioned by Fleddy.
Opossum is offline   Reply With Quote
Old 03-08-2009, 06:49 PM   #20
jorgmundgand
User
 
jorgmundgand's Avatar
 
Join Date: Aug 2008
Posts: 4

jorgmundgand has a little shameless behaviour in the past (-1)

Default

How can I implement this in a map of mine? 'Cos just c&p doesn't work. BTW I have no knowledge of JASS
__________________
jorgmundgand is offline   Reply With Quote
Old 03-11-2009, 11:18 PM   #21
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Quote:
Originally Posted by jorgmundgand
How can I implement this in a map of mine? 'Cos just c&p doesn't work. BTW I have no knowledge of JASS

You probably need JassHelper so your editor can compile vJass code.


@system: I'm thinking about setting and calling all variables locally again so I don't need arrays and loops. I already tried that in the past but it caused desyncs... I think I know why it did now so I might eventually save some lines and arrays again.
If I do it properly it shouldn't be any different than calling and setting camera fields which imo could be considered "local global" variables too. Gonna see how that works out.
Edit: uuuh... arrays are fine.

Last edited by Opossum : 03-12-2009 at 09:09 PM.
Opossum is offline   Reply With Quote
Old 03-14-2009, 11:55 PM   #22
Ardnived
User
 
Ardnived's Avatar
 
Join Date: Feb 2009
Posts: 19

Ardnived has little to show at this moment (0)

Default

Okay I've copied all the triggers and attempted to read the manual thing, but I cant really see how to activate the camera, I have no knowledge of JASS, all I really need to know is what line of code or whatever I need to put to activate the camera.
Ardnived is offline   Reply With Quote
Old 03-15-2009, 07:12 PM   #23
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Quote:
Originally Posted by Ardnived
Okay I've copied all the triggers and attempted to read the manual thing, but I cant really see how to activate the camera, I have no knowledge of JASS, all I really need to know is what line of code or whatever I need to put to activate the camera.

Trigger:
Custom Script: call ThirdPersonCam_Use(<player>, <unit>, <firstPan>)
Custom Script: call FixedCam_Use(<player>, <unit>, <x>, <y>, <z>, <firstPan>)
should do it. I recommend learning some (v)Jass though if you want to experience this (or any) system's full potential.

Read this thread if you need some serious motivation for learning Jass :).
Opossum is offline   Reply With Quote
Old 04-06-2009, 12:25 PM   #24
Karawasa
Element Tower Defense
 
Karawasa's Avatar
 
Join Date: Feb 2006
Posts: 1,094

Submissions (2)

Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)

Approved Map: Tropical TagApproved Map: Element TD

Send a message via AIM to Karawasa Send a message via MSN to Karawasa
Default

If third person view didn't result in so much lag in my map (not the system's fault, but rather too much commotion up close) I would surely use this system. Only one that I know of that can handle any sort of height change you throw at it (cliffs etc.).

Wondering why this hasn't been approved yet...
__________________

Element Tower Defense - Premier WC3 Custom Game

Last edited by Karawasa : 04-06-2009 at 12:26 PM.
Karawasa is offline   Reply With Quote
Old 04-06-2009, 04:00 PM   #25
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Karawasa
Wondering why this hasn't been approved yet...
I haven't had the chance to go through it, Anitarf has. Therefore it sits until Ani approves it as Development Director or finds more wrong with it. He's better with fine details than I and others are, so.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-10-2009, 08:49 AM   #26
Karawasa
Element Tower Defense
 
Karawasa's Avatar
 
Join Date: Feb 2006
Posts: 1,094

Submissions (2)

Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)Karawasa has a spectacular aura about (78)

Approved Map: Tropical TagApproved Map: Element TD

Send a message via AIM to Karawasa Send a message via MSN to Karawasa
Default

I find it disheartening that Anitarf has time for his own submissions, but not those of others. I've read the entire thread and I guess your response isn't really adequate. Fine details are great to analyze, but holding up a submission for them (if that is even the case) is stupid if you don't have time to check back. I realize you guys all do this for free, and I am not really complaining here. More like trying to point out that letting most of your submissions just sit and rot makes you guys look bad.

PS: I also find it ironic that most of Flame_Phoneix's submissions have made it in, but gems like this just sit and collect dust. What do I mean? http://www.wc3c.net/showthread.php?t=102558, why is a simple nova spell making it into our spells section? Are we that desperate that we are just accepting crap now? In fact most (not all, just most) of his spells don't seem worthy of being in the database when compared to what else is in there.
__________________

Element Tower Defense - Premier WC3 Custom Game

Last edited by Karawasa : 04-10-2009 at 08:59 AM.
Karawasa is offline   Reply With Quote
Old 04-10-2009, 01:14 PM   #27
Anitarf
Procrastination Incarnate


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

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

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

Default

Quote:
Originally Posted by Karawasa
I find it disheartening that Anitarf has time for his own submissions, but not those of others. I've read the entire thread and I guess your response isn't really adequate. Fine details are great to analyze, but holding up a submission for them (if that is even the case) is stupid if you don't have time to check back. I realize you guys all do this for free, and I am not really complaining here. More like trying to point out that letting most of your submissions just sit and rot makes you guys look bad.
Note that writing code is not the same as reviewing code. For example, I can't do the latter when the site is down. Also, I tend to pick submissions to review from the last page of the submission forum (since those have been "sitting and rotting" the longest) so you're not really helping this submission get a second review by posting unrelated rants in it and thus bumping it.

Quote:
PS: I also find it ironic that most of Flame_Phoneix's submissions have made it in, but gems like this just sit and collect dust. What do I mean? http://www.wc3c.net/showthread.php?t=102558, why is a simple nova spell making it into our spells section? Are we that desperate that we are just accepting crap now? In fact most (not all, just most) of his spells don't seem worthy of being in the database when compared to what else is in there.
What I find ironic is that you chose as your example a spell that took longer to get approved than this system has been in the submission section. In the two months that spell was in the submission section you had ample opportunity to criticise it yourself and thus influence the review and approval process, but didn't. Now you do it too late and in the wrong thread and at the same time complain that resources are stuck for too long in the review process.
__________________
Anitarf is offline   Reply With Quote
Old 04-10-2009, 03:55 PM   #28
Rising_Dusk
Obscurity, the Art


Projects Director
Project Leader: OD
 
Join Date: Feb 2006
Posts: 9,729

Submissions (27)

Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)Rising_Dusk has a reputation beyond repute (1192)

Hero Contest #3 - 1st PlaceApproved Map: Desert of ExileApproved Map: Advent of the ZenithHero Contest #2 - 1st PlaceHero Contest - Third place>

Send a message via AIM to Rising_Dusk Send a message via MSN to Rising_Dusk
Default

Quote:
Originally Posted by Karawasa
More like trying to point out that letting most of your submissions just sit and rot makes you guys look bad.
I'm sorry, but we all either go to university, work, do both, have lives, and an assortment of other things. The fact anything gets reviewed at all stands as a testament for our dedication to the website, its users, and the time they put into resources. Please do not question our integrity or dignity by posting such unnecessary and incendiary comments as you do; it makes you appear ignorant and I know that you're not.
Quote:
Originally Posted by Anitarf
In the two months that spell was in the submission section you had ample opportunity to criticise it yourself and thus influence the review and approval process, but didn't
This is an important point. If you find a spell unoriginal or unfit for the database, make a point to say that in the thread during the approval process. I say that it is slow by design for a reason - it is for submissions to receive ample feedback.
__________________
Rising_Dusk is offline   Reply With Quote
Old 04-10-2009, 04:54 PM   #29
Opossum
User
 
Opossum's Avatar
 
Join Date: Mar 2008
Posts: 205

Submissions (4)

Opossum will become famous soon enough (59)Opossum will become famous soon enough (59)

Default

Quote:
Originally Posted by Karawasa
If third person view didn't result in so much lag in my map (not the system's fault, but rather too much commotion up close) I would surely use this system. Only one that I know of that can handle any sort of height change you throw at it (cliffs etc.).
If you want to use this system on a somewhat bigger/laggier map just reduce the FAR_Z constant. By default it's maxed at 10.000 which probably owns any bigger map.
5.000 should still look fine using the right fog settings and stuff. The new alpha versions of "Legacies: Tides of the Serpent" (totally sublimal advertisement here!) already use this camera at a FAR_Z setting of 5.000 and you hardly see any clipping in the distance.

@approvement discussion: Meh... patience! I mean it's always good to know that there are only high quality ressources in the database on wc3c and the bit of a waiting time seems like a fair price to me.
It's not like you can't use this system without it being approved anyway :P
Opossum is offline   Reply With Quote
Old 04-11-2009, 01:37 AM   #30
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

lol at FAR_Z of 5, I just use your default of 5000 and 3500 for the fixed cam.
Fledermaus 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:36 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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