Thanks i’m following some of those tips now, i have been intentionally away from eclipse for this seasons holidays, so there is no changes yet, but there will be.
[quote]Only thing that crosses my mind, though you’re probably already doing this, is to make sure you’re not drawing two circles for each sheep, and you’re just pasting a pregenerated image where needed. Java circles are pretty slow.
[/quote]
in fact i’m drawing the ovals each cicle, it’s slower, but it saves me some bytes from image variables and drawing the ovals into them for the first time, but i’ll maybe do so, and put something else than ovals for all the actors
[quote]do you really need more sheep?
[/quote]
i’m working in a litle gameplay twist (for the levels to make some sense, and to be a litle more playable) wich implies a limited number of sheeps anyway implement a tree for the sheeps could be too mucho for the space remaining ;D
i have left that loop like this, for now
dist = ((sheep[i] - sheep[o]) * (sheep[i] - sheep[o]));
dy = ((sheep[i + 1] - sheep[o + 1]) * (sheep[i + 1] - sheep[o + 1]));
if ((dist + dy) < (SHEEP_VIEW_RANGE * SHEEP_VIEW_RANGE)) {
num_on_range++;
dist = (float) Math.sqrt(dist + dy) + 0.1f;
thanks alot