Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Thank you! It still lags a bit too much for me (processing monster movement takes a few frames) -- I wanted to move this calculation to when the player is animating, but didn't have time.

How would you do that?  Split up the processing between the several frames of animation?  That sounds rough.  Also don't they move at the same time the character is moving?  So I'd assume they HAVE to be calculated after input but before movement happens.  Unless you calculate all 4 potential next scenarios before input but that probably wouldn't play well with item usage.

The player has 8 frames of animation after the user presses a button, but before the monsters take their turn. So I was thinking I could split up the AI calculations over these 8 frames, perhaps using LY as a signal to bail out for this frame. For the most part this would work since the player's new location is updated immediately. The only trouble is some of the powers have delayed effects (e.g. bolt doesn't hurt a monster until the sprite reaches its destination). So you can't easily calculate mob AI during the player's animation since the game state hasn't been updated yet. That said, I know at the time of using the power what the effect will be, so I _could_ do it, but it would be tricky to get right.