THREAD NAVIGATION:  
    Where am I?   Original message   Top of thread   Current page 
Displays all thread messages Displays thread map That to which this responds This thread's lead message Your most recent Tavern page

Flying (or is it frying) tonight.
06/24/2014, 16:14:39

    Chandor writes:

    Hmm, not sure about that. I notice that there is a limit to the number of active monsters that there can be at any one time (there can be more monsters, but only a certain number will actually do anything, you have to kill some of the active ones before more become active)
    Not actually counted the max #active at any one time, but I'll go with 64. I doubt it is more than that
    For each, check to see if a flying flag is set. That flag gets set if when the monster moves it moves to a spot that's above the ground, and reset if it moves to a spot on the ground. But that check is done at monster move time, not at fireball time. At fireball time we just check the precomputed flag, so cheap.
    Calculate distance: We COULD use pythagoras and newton-raphson to calculate the square root needed which will take a bit of time, but why not use a crude approximation such as:
    Take difference in X position between the monster and the tower and the difference in Y position. The distance between the monster and the tower is ~(the larger of the diffs + 3/8 the smaller of the diffs)
    Crude, not at all accurate, but no-one is ever likely to notice. It's quite good enough and fast. You can even short-circuit it. If the monster you are looking at has an X diff or Y diff thats greater than the minimum distance then there's no need to calculate the rest.
    All of that has got to be far far cheaper to do than calculate and display the game-world. All of that was apparently done with no HW acceleration. All software. Quite impressive on hardware that age.
    I suspect either they just didn't think of it, or they didn't want people to use the towers to kill monsters they were too weak to kill themselves




Reply to this message   Back to the Tavern  

Replies to this message

  • Towers - Ramillies ( Wed 25-Jun-14 05:40:43 )