Diablo 2 Engine

Started by
13 comments, last by Unreal 23 years, 2 months ago
I really liked Diablo, but I can''t stand D2 - it was soooo boring ;-(

I would say the engine isn''t anything special, I really have my problems with this 640x480 shit. DOn''t like to see black lines between the graphics ;-(

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
Advertisement
Hmmn, Diablo 2 was prity crap, although I managed to stay awake long enough to defeat diablo.

I don''t see how 5 diffrent charcters and random maps make the game any more playable. Klik and Kill sucks big time.

However, if you are not going to take the time to play the game, at least hack the movie files (which may be more fun than acutaly playing) and view them. Diablo 2 has a (IMO) great story line, as well as stunning cut scenes.

ANDREW RUSSELL STUDIOS
nobody has given this dude a straight answer, he didn''t ask for a debate on RPG''s, he wanna know how it works.

Well, i really have no idea. But then, you can''t just ask how an engine works, want part of the engine do you want to know about

Well, I agree that arguing about whether or not the game is cool is going to do absolutely nothing to settle the issue of how the thing works.

Allow me to add my $.02 worth on the subject before getting into the real content speculation. Diablo II is not really a RPG, but it is nonetheless a fun game. The cinematics are the best I''ve ever seen on a computer game, and the gameplay is repetitive, yet suprisingly addictive.

You don''t need deep gameplay in order to have a fun game, folks. Can we say "Lode Runner"?

Anyway, onto the real meat:

The short answer to your question of "How does the engine work?" is "I don''t know." However, I can make some good educated guesses.

<Speculation>
Firstly, the world is divided up into tiles, which are placed together using a "room generation" algorithm. What that does is put together a set of rooms, which are composed of a set of tiles, and link them together at the seams, then close them after some designated number of rooms. That''s how the random dungeons and other maps are generated. There are some maps, of course, that are not randomly generated but are preset (the Arcane Sanctuary and the towns, for example) and those are stored somewhere for quick retreival.

The maps are huge, so what the game does is, as you''re running around, it precalculates and precaches the map images that it''ll need, or at least as many as it can. This would happen in any "idle" cycles that you have, much the same way that the Distributed.net RC5 program or Seti@Home work.

Now, every tile may or may not be populated by a creature or player (which are both doubtless derived from the same actor base class, but I won''t speculate that deeply into the code structure), and the location is stored in the information for the actor.

When you click the mouse, it figures out by querying the graphics engine and extrapolating with what actors and other entities are visible, along with the keyboard state, what it is that you''ve clicked on, and performs an action based on a large if/elseif/else or switch block. Actions could be use a skill (or case a spell), move, attack, talk to, etc.

Each area of the map contains a set of creatures that exist, which is doubtless drawn from a set of probabilities and chosen based on a random number. If you''ve ever roleplayed a D&D type adventure with dice, then it probably makes sense. Probabilities are assigned. EG, you have an X% chance of having Hellspawns in this area. A random number is chosen, and if it''s below X, then you have Hellspawns. That''s a bit of a simplification, but there it is.

AI seems to work per creature type, and is probably a function pointer of some sort, so that it only needs to be loaded into memory once, and then can be called for every instance of that creature that is on the screen (or is active).

Item creation is based on probabilities and random choices. Whenever a creature dies or a chest/log/rock/whatever is opened, it has an X percent chance of dropping an item. If it drops an item, then it has various probabilities of dropping low quality, regular quality, high quality, socketed, magical, rare, set, or unique items (those are pretty much in order from most likely to least likely, btw. I believe that there''s more probability of dropping regular quality than low, but there it is). Bosses always drop one or more magical/set/rare/unique items, and champions always drop either a lot of gold or a magical/set/rare/unique item.
</Speculation>

Whew! There''s more, to be sure, but those are some of the salient features of the game. Remember that all of the preceding has been speculation and my analysis of the game engine. I hope it''s accurate, or at least that it helped to answer some of your question.

For a lot more detail and specifics, visit:
http://www.battle.net/diablo2

Adiss
a.k.a. Magic Card
Diablo 2? Role Playing? ABSOLUTLY NO RELATION.
The only CRPG''s I''ve seen that "allow" roleplaying are the online ones such as ultima online or everquest. But still, no one roleplays. I''ve seen people sit in one spot killing monsters as they respawn to gain levels. That''s not roleplaying. I myself play D&D, and I''ll tell you now, it will be a LONG time before a computer is a good platform for roleplaying.
I never understood why Bill Gates named his company after his penis

This topic is closed to new replies.

Advertisement