Your opinion on my elephant pattern movement?

Heya.
Well, im planning that in my first level, my archer will be able to kill elephants and other animals.

So i was wondering some things.

First, he movement :

The elephant will move 10 “steps” left and then 10 “steps” right.In case it cant move to one of the sides, it will move to the other.

For now, the animals will be loaded as soon as the game is loaded, but for optimization, i plan that they will be loaded when the player reaches a certain X;Y;

What you guys think?

Ah, i have another question, when my actor gets hited by an enemy, is there anyway i can make it red"dish" ? without using another image? Is there any method that i can apply a red color on it or some effect ?

Thanks :stuck_out_tongue: ??? :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

Idk what game engine you’re using, but with libgdx, you can just apply the color to the spriteBatch (or whatever batch you use) to draw with a different color setting. You just apply a bit more red and it will look more “reddish” :).

About the elephant, you could load the “default” elephant when loading the game, and then just make copies of it when the player reaches a certain location.

Ah yes im using libgdx :stuck_out_tongue: I will try that haha ty

Anyone have opinions on the movement pattern?

Is it a top-down game? Or isometric? Is the side-to-side movement a dodge? I think that AI should fit the game’s playstyle, and without knowing what that is, I can’t really give an opinion. Although moving a different direction if one is not available seems about right for most scenarios, as you don’t want AI to simply get stuck.

Its a 2D game like sonic :stuck_out_tongue:

Should be fine for a basic movement pattern, just go with what fits, like I said.

Also, for tinting an Actor: Actions

For example:


import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;

actor.addAction(sequence(color(Color.RED), delay(1), color(Color.WHITE)));

Will turn [icode]actor[/icode] red for 1 second, and then back to normal. The colors specified are basically the ‘range’ in which the actor will be drawn, so RED (1.0, 0.0, 0.0) will take out all the green and blue, leaving the actor red-tinted. WHITE has all the color, so the actor renders normally.
It’s subtractive color blending, or something. :point:

Ah, well i had a little image of him being hit so i just made the spritebatch red. But i will note that on my book, i may use soon, very very soon… MUAHAHAHAHAHAH.

!! Thanks :stuck_out_tongue: