Maze of PPF 2
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)
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)
Maze of PPF 2
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 1039 times
Last edited by FaMoUs on Tue Apr 10, 2012 10:20 pm, edited 1 time in total.
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Maze of PPF 2
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
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.
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.)
![JASS JASS](./images/smilies/icon_t_tri.gif)
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
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.
Re: Maze of PPF 2
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
Code: Select all
call SetUnitFacing(u,Rad2Deg(Atan2(GetOrderPointY()-GetUnitY(u),GetOrderPointX()- GetUnitX(u))))
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Maze of PPF 2
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.
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.
Re: Maze of PPF 2
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.
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Maze of PPF 2
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.
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.
Re: Maze of PPF 2
Alright, I was just confuse about the locationX i was wondering were that came from.
Re: Maze of PPF 2
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.
Anyways good night heading to bed.
Last edited by FaMoUs on Wed Apr 04, 2012 3:52 pm, edited 2 times in total.
- 3ICE
- Admin
- Posts: 2631
- Joined: Sat Mar 01, 2008 11:34 pm
- Realm: Europe
- Account: 3ICE
- Clan: 3ICE
- Location: Hungary
- Contact:
Re: Maze of PPF 2
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.
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.
Who is online
Users browsing this forum: No registered users and 30 guests