This sounds like a cool project. I'm no artist but after seeing this thread I got the urge to "make a monster". ^^ I went for something really simple which you can see here: http://opengameart.org/content/floating-eyeball
Hopefully it will inspire a real artist to replace that piece with something decent. :D
Yeah, I see what you mean. I'll continue playing with this for a bit and try to optimise things but I understand if you don't want to make use of this code in the engine.
Well, the old code would link actions (such as a melee attack) to a specific frame of an animation. Because frames were updated sequentially we could be sure no frame and no actions were missed. Now if we want things time based we run into some problems. Here is an example:
Our attack animation has four frames which last 100 ms each. If we call logic() at 88 ticks that results in displaying the first frame of the animation. If we call it again at 213 ticks we have reached the third frame and essentially skipped one frame. If we have an action linked to the second frame then that never takes place.
So my first thought to solving this problem was to simply check whether we have passed the second frame (>= as opposed to ==). But then we also have to keep track of whether we have performed the action or else the character will attack again on the fourth frame and so on. But as well as remembering that we've performed the action we also have to re-enable performing it at some point or else we only get one attack in the whole game. :D So I thought we could simply disable an action after it's been performed for a certain amount of time. It just made sense to introduce a new class for that and it sort of evolved into the concept of Triggers.
This sounds like a cool project. I'm no artist but after seeing this thread I got the urge to "make a monster". ^^ I went for something really simple which you can see here: http://opengameart.org/content/floating-eyeball
Hopefully it will inspire a real artist to replace that piece with something decent. :D
Haha, kewl.
Cool. I really like the blue version.
This is the strangest ogre I've ever seen. I mean that in a good way. It's very original.
Looks good. But it's clipped at the edges. :(
Very nice style. :)
Yeah, I see what you mean. I'll continue playing with this for a bit and try to optimise things but I understand if you don't want to make use of this code in the engine.
This is awesome!
Cool stuff.
Well, the old code would link actions (such as a melee attack) to a specific frame of an animation. Because frames were updated sequentially we could be sure no frame and no actions were missed. Now if we want things time based we run into some problems. Here is an example:
Our attack animation has four frames which last 100 ms each. If we call logic() at 88 ticks that results in displaying the first frame of the animation. If we call it again at 213 ticks we have reached the third frame and essentially skipped one frame. If we have an action linked to the second frame then that never takes place.
So my first thought to solving this problem was to simply check whether we have passed the second frame (>= as opposed to ==). But then we also have to keep track of whether we have performed the action or else the character will attack again on the fourth frame and so on. But as well as remembering that we've performed the action we also have to re-enable performing it at some point or else we only get one attack in the whole game. :D So I thought we could simply disable an action after it's been performed for a certain amount of time. It just made sense to introduce a new class for that and it sort of evolved into the concept of Triggers.
Does that make any sense? ^^
Pages