dgcor / DGEngine

An implementation of the Diablo 1 game engine
Other
243 stars 30 forks source link

Game speed, character teleports rather than walking #8

Closed mewmew closed 6 years ago

mewmew commented 8 years ago

With A* implemented, exploring town is now possible. However, the character seems to be teleporting rather than walking since the game speed is so high. Are you also experiencing this issue?

Note, the following recording was done on rev 40afab360a26f087b2b3e72b8c8f1794e5cb50c2.

Game speed

ghost commented 8 years ago

Hi there,

Pathfinding, Players, Celfiles and levels are still in development and have been and will be subject to significant changes. It is that fast on purpose (for now), although a bit slower on my PC :) You can probably slow it down by setting the maximum framerate to 50/60 by clicking on the bottom right corner in the main menu.

In previous versions the screen moved smoothly, but that was temporary code that was removed as things will be done a bit different once it's done. Expect a smoother player movement in a future commit.

mewmew commented 8 years ago

Expect a smoother player movement in a future commit.

Lovely to hear. I am very happy that you seem to be striving for pixel perfection against the original game. My friend and I have been considering writing a wrapper for verifying Diablo 1 game engines, which would basically mirror the mouse and keyboard input to both the original game and a Diablo 1 game engine, and then capture each frame (and record the sound), and compare to see if they differ. It would be interesting to see how far you may take this approach, as it would also be used to validate random generation of dungons (using the same game seed), items, monster placement, etc.

ghost commented 7 years ago

In the latest revision 4df29d1, a smooth player walking speed is in place.

mewmew commented 7 years ago

Oh, lovely! I'll check it out!

mewmew commented 7 years ago

Tried it out now, and the feel is perfect! Still think NPC animation speed is too quick, but this is an unrelated issue I presume.

Great work!

ghost commented 7 years ago

The animation speed is a configurable parameter that defaults to 50ms. It's a little fast, but then animation speed depends on the current state (standing, walking, attacking), so it will be rewritten to accommodate this in the future.

Edit: On the last commit 1a022c6, walking/animation speed now depends on the current stance (standing, walking, attacking, etc).

mewmew commented 6 years ago

As mentioned by @dgengin this has been fixed. Closing the issue.