Maze of PPF 2

You can submit your maps here. Both finished and unfinished submissions are welcome.
Forum rules
Finished maps:
• Submitting your own map(s):
One map per topic please! (Or we will have a hard time finding out which comment is for which map)
You can leave your Username@Realm so people can contact you in game. (eg.: 3ICE@USEast, 3ICE@Northrend)
Write a description and don't forget to post some screenshots. (Images and videos are worth a thousand words)
• Submitting a map not made by you:
Do not claim it as yours. We'll find it out (sooner or later) anyway.
Ask the maker to submit it himself is possible.
Or at least let the maker know that his map has a topic here, so he can benefit from your comments and bug reports. (Or request the thread be deleted for whatever reason*.)

Unfinished maps:
You are welcome to post your unfinished maps here and ask for help.
We will look at the map and tell you whats wrong with it or how to continue editing it.

Projects:
Important/cool maps and big projects will have their own forum category inside. (Like the 3ICE's Maze Designer category)
FaMoUs
Posts: 44
Joined: Thu Jan 26, 2012 3:03 pm
Realm: US East
Account: FaMoUs
Clan: AKR

Maze of PPF 2

Unread post by FaMoUs »

Finally finish the new slide map that people were asking for. Should be the hardest slide map out. Let me know if you find any bugs.
Attachments
Maze of PPF 2 v1.1.w3m
Fix few things, Made lvl 1 harder and Added new lvl.
(654.94 KiB) Downloaded 827 times
Last edited by FaMoUs on Tue Apr 10, 2012 10:20 pm, edited 1 time in total.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Maze of PPF 2

Unread post by 3ICE »

Taking a look now.

Edit: I got half way on my first try, woot!

...Then I killed myself 5 times to check if the continues system was working. One issue is that it says "Continues: -1", which isn't right. It should be changed to something like "you ran out of continues". (Both on the multiboard and in the teal colored message.)

My compliments on using Region kill instead of the lazy approach that is terran kill. Scratch that, I found the terran kill code. :P The number of regions was suspiciously low so I went and looked for it.
JASS JASS
        if HM==GetTerrainType(x+hM,y)and HM==GetTerrainType(x-hM,y)and HM==GetTerrainType(x,y+hM)and HM==GetTerrainType(x,y-hM)and GetUnitState(u,UNIT_STATE_LIFE)>0 then             call KillUnit(u)         endif
Although it feels smooth and without issue in game, the sliding calculations could be improved. You use Location(GetLocationX(ap)+np*Cos(Vp*bj_DEGTORAD),GetLocationY(ap)+np*Sin(Vp*bj_DEGTORAD)), which is slow due to the Location(GetLocationX(),GetLocationY()) call. You are unpacking and then repacking the (X,Y) unit positions into a location wrapper for no reason. Use the units' X and Y coordinates directly, for a speed boost. You can cannibalize the code from my Sliding System.

I'm on a quad core so I don't feel the effects of wasted CPU power, but try your map on a PC that just barely meets WC3's system requirements and you will feel the lag.
ImageImageImageImageImage
Image
ImageImage

FaMoUs
Posts: 44
Joined: Thu Jan 26, 2012 3:03 pm
Realm: US East
Account: FaMoUs
Clan: AKR

Re: Maze of PPF 2

Unread post by FaMoUs »

Code: Select all

    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real a = GetOrderPointX()
    local real b = GetOrderPointY()

    if Ice[i] == true and IsUnitInGroup(u, Heroes) then
        call SetUnitFacing(u,Rad2Deg(Atan2(b-y,a-x)))
    endif
For example... do you mean instead of using b a and x y to just put the inside the code so it look like this

Code: Select all

call SetUnitFacing(u,Rad2Deg(Atan2(GetOrderPointY()-GetUnitY(u),GetOrderPointX()- GetUnitX(u))))
And btw for some reason I think optimizers changes the triggers might have to stop using it. I send the map unprotected by pm so you can look at the triggers better plus I don't think that i use GetLocationX for the slide system if I remember right or unless your telling me to use that. Don't know why you just didn't ask me for the map unprotected. I'm guessing you like to unprotect maps for fun. I never got to fully unprotect a map with out using xdept don't know how you do it.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Maze of PPF 2

Unread post by 3ICE »

I can read the protected code, but thanks for the PM. I'll be able to tell you which trigger the Location() call is. Yeah, it is nowhere to be seen...

The code you posted looks good. It uses GetUnitX() (good) and not Location(GetlocationX(),GetlocationY()) (bad)

I don't deprotect maps, I just look inside the mpq archive. My main focus is war3map.j and I check every other file too.

Optimizer only changes triggers for the better. For example it gets rid of BJ calls (not all), inlines code for you, etc.
ImageImageImageImageImage
Image
ImageImage

FaMoUs
Posts: 44
Joined: Thu Jan 26, 2012 3:03 pm
Realm: US East
Account: FaMoUs
Clan: AKR

Re: Maze of PPF 2

Unread post by FaMoUs »

Okay, Anyways about the example I said is that what you meant? And about the terrain kill actually my friend suggested for me to use terrain kill because its more adjustable then Regions and so we can finish the map faster as well.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Maze of PPF 2

Unread post by 3ICE »

I'm reprotecting your map and comparing it to the original right now...

Edit: Found my mistake. The code I complained about is not in the sliding trigger, it is only used a couple times in the Checkpoint function:
call PanCameraToTimedLocForPlayer(p, PolarProjectionBJ(GetRectCenter(r), grid * 3, d), .3)
I associated it with sliding because first generation sliding systems use PolarProjectionBJ. Which is translated to
Location(GetLocationX(ap)+np*Cos(Vp*bj_DEGTORAD),GetLocationY(ap)+np*Sin(Vp*bj_DEGTORAD)) by the Optimizer, a pattern I have come to recognize.
By the way that translation by the Optimizer is actually an improvement over using a BJ function, but it's still quite bad.

You can ignore the problem because it is only used once per checkpoint per player (33 times total). An amount we can calmly overlook.
ImageImageImageImageImage
Image
ImageImage

FaMoUs
Posts: 44
Joined: Thu Jan 26, 2012 3:03 pm
Realm: US East
Account: FaMoUs
Clan: AKR

Re: Maze of PPF 2

Unread post by FaMoUs »

Alright, I was just confuse about the locationX i was wondering were that came from.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Maze of PPF 2

Unread post by 3ICE »

Edited it into my above post.
ImageImageImageImageImage
Image
ImageImage

FaMoUs
Posts: 44
Joined: Thu Jan 26, 2012 3:03 pm
Realm: US East
Account: FaMoUs
Clan: AKR

Re: Maze of PPF 2

Unread post by FaMoUs »

I was actually gonna remake that pan cam but totally forgot about it. I'll be probably be fixing it anyway if I make another version.
Anyways good night heading to bed.
Last edited by FaMoUs on Wed Apr 04, 2012 3:52 pm, edited 2 times in total.

User avatar
3ICE
Admin
Posts: 2629
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

Re: Maze of PPF 2

Unread post by 3ICE »

Personally, I wouldn't bother. Your time is more important than all the computers in the world.

Only optimize a function if it is running on a tight loop. Otherwise, prefer readability, maintainability, and as a general guideline: write what takes the shortest time.
ImageImageImageImageImage
Image
ImageImage

Post Reply

Who is online

Users browsing this forum: No registered users and 150 guests