Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Confuto

Pages: [1]
Off-topic (Locked) / Re: Realtime Roguelike
« on: October 21, 2009, 02:24:15 PM »
If you try real-time in a 2-D/grid-based rogue (meaning the granularity is lousy - there's no 'partially' between locations), the main problem seems to be player input. If you allow the player to act every time they press a key, their keypresses may be much faster than the monsters act/main-loop processes (unless your main loop is really fast, in which case the player gets massacred) - in essence, the player gets lots of free turns compared to the monsters, or vice versa. Conversely, you can have the players LAST input get acted on each game cycle, which in it's self leads to 2 problems -1) Multiple keypresses between turns get ignored, leading to unresponsive controls, or if you're fast, the ability to correct your key presses before the next main loop cycle, or 2) If you process the entire keypress buffer, you get long periods of real time where the character has to 'act-out' everything that was pressed, leading to the inability to react in real-time.

I must admit, I have't found a satisfactory way to deal with this issue. The best I can come up with is to put it as fast as I can, and try and 'tune' the monster speeds so that they are similar to the players.

Any thoughts on how you could make it work simply from a timing/input perspective??

One solution to this problem is to have certain actions take time. Give each character an activity variable. When they try to perform an action (moving, attacking, etc) check to see if their activity variable is greater than zero. If it is, they cannot perform the action. When they do perform the action, increment their activity variable by some number. Each time the game loops, decrement every character's activity variable by an appropriate amount.

One issue with this solution is that it plays similarly to some turn-based systems. It is, however, fairly similar to how most real-time RPGs do things simply without the animation.

Pages: [1]