1
Programming / Re: question regarding time management
« on: November 20, 2015, 11:35:13 AM »Looks like you understand perfectly.Thank you very much!
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.
Looks like you understand perfectly.Thank you very much!
You should take a look at two things: Vector and List.Vector seems nice. I don't know I'm on a right path, but... maybe I can use vector as a list of Actor objects(pc, npc, etc.) and each Actor has its own queue of actions. So every click, front of that queue executed and if I iterate vector from front to end, then (global variable) CLICK++ executed!
A Vector is a dynamically resized array.
You would need to check each unit in the entire Vector every click, to see if any unit was up to act on that click.
You would just add a unit to the Vector and not care where it got placed.
You could add the player at the head of the Vector, so the player will always win ties for who is up to act that click.
List is a doubly linked list
So when you add an element you do it as an Insertion Sort priority que.
You use the click that the unit is up to act next as the value to check and insert at the right place.
When you get the next unit up to act, the List is already sorted so you just get the unit at the head of the list.
For a turn based game it doesn't really matter which you use, just pick the one you feel comfortable with.
D&D also has that quite ridiculous power fantasy, from noob to demi-god character development. In a way it works as it should, but alternative gameplay systems are possible. I think the reason why we don't see them often is that just as ascii graphics the style of gameplay in roguelikes is conservative.Conservative... Well since roguelikes are evolving these days, there will be some rooms for alternatives I think thanks for reply!
Why stop there? Get rid of damage and hit points entirely, make everything based on statuses. Forces far more interesting interactions.That's nice. But I don't think I can handle that. My skills are quit limited so I'm trying to add some stuffs to basics.