Questions

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Emjayen
Posts: 7
Joined: Sun Jun 30, 2013 2:07 pm

Questions

Post by Emjayen » Tue Aug 08, 2017 8:31 am

1. How is guided arrow's targetting (BS aswell I believe) implemented? this post asserts it's LoS-based, if so, would this mean for instance if you launched GA, then orientated yourself 180 degrees from the target, it would not be acquired? Also, the post mentions a discrepency in simulation between client/server -- could this be elaborated on?

2. How is LoS implemented?

3. Are there any more synchronization hacks like this one around?

4. Ideally the game logic should be decoupled from the graphical representation, however reading about how the game is implemented I get the impression the two are tightly coupled (e.g, "breakpoints" seem just directly related to how many frames an artist decided to come up with for a particular animation)

5. Is there any documentation on the game's path-finding? I've scoured PK and couldn't find a thing, strangely. It appears it uses the usual A*, albeit crippled, presumably for performance reasons.

6. What's the underlying cause for the synchronization issues with the Charge skill?

Also, regarding the issue with what users refer to as "invisible missiles", my theory for the longest time to explain this behaviour has been that: as missiles aren't synchronized as other state information is (players, units, etc), events that generate missiles outside the player's 3x3 sector radius of awareness can produce this behaviour. I haven't actually verified this as being the cause, so I'd be interested in any remarks.

User avatar
Necrolis
Senior Admin
Throne
Posts: 9125
Joined: Sat Mar 25, 2006 1:22 pm
Location: The Land of the Dead
South Africa

Hand-picked

Re: Questions

Post by Necrolis » Tue Aug 08, 2017 11:55 am

1. I haven't looked into GA so can't really give you details there. But the discrepancies to to be the client using one search mask while the server uses a different one, sometimes its the init params for the searching not being the same.
2. the collision bit field, a massive bit array that gets searched using various sets of masks, one of which includes light blocking; from there is just some maths; from 1.10:

Code: Select all

/* 
	Date: Sun Apr 04 19:36:05 2010
	Author: Necrolis
	Function: DUNGEON_CheckLOS
	Address: D2Common.#10362
	Comments: 
*/

BOOL __fastcall DUNGEON_CheckLOS(D2UnitStrc* pUnit, D2UnitStrc* pTarget, int nType)
3. "Everywhere". The code is littered with poorly done "predictive-sync" code; have a look at chain lightning for a great example of this, the client uses different search masks to the server, so on the client it chains to targets that it doesn't damage very noticeably.
4. The cof files and animdata.d2 control these, it isn't specifically linked to the animation directly (but there are oodles of bugs around this, most notably with how the server does partial frame rollbacks for skills).
5. None on the keep, it was specifically banned due to hacks making use of the path stuff in the past, but again it uses the same bit field for collision and LOS. its easily to track down from the AI movement to target.
6. See 4. Basically the server doesn't correctly handle interrupts and rollbacks properly, and then doesn't sync this to the client, which just causes major issues; that coupled with a whole bunch of other bugs causes a multitude of skill issues. those ghost missile bugs are from this and miss-matched client server info. Give this post by Nefarius a read for more info: viewtopic.php?f=8&t=53570
Image
Netiquette, Do you USE it?!?! | Nefarius' Fixed TXT Files | Terms Of Service
Blackened | Day of Death | D2GFEx
"What was yours is mine. Your land, your people, and now your life." - Lim-Dul, the Necromancer
Judgement is Final, Death is Eternal

Return to “General Mod Making”