This site requires JavaScript, please enable it in your browser!
Greenfoot back

Zerg's Comments

Back to Zerg's profile

ZergZerg

2009/11/21

so long as the arrow is removing itself at the end instead of resetting, you only need the direction and and a life time for the arrow. You can use MTK's code for the direction, and then add to the constructor public Arrow(double angle, int life){ this.life = life; this.angle = angle; } Then in the act method, have a timer variable increment each act and when it is the same as life, then remove the arrow.
ZergZerg

2009/11/21

The code for having the arrow remove itself would be something like getWorld().removeObject(this); The benefit to doing it this way is you don't have to add both an arrow and an archer in the level constructor. You just add the archer, and have the archer add the arrows! Then you can do things like having archers move, or having archers spawn at different locations!
ZergZerg

2009/11/21

What you should do is instead of having the arrow reset when it reaches the end, have it remove itself. Then you can have the Archer1 create a new Arrowleft.
ZergZerg

2009/11/19

Sound effects are always a plus!
ZergZerg

2009/11/17

Odd that it's not lagging for any of you... maybe that's one of the blessings of working with an underpowered computer! What I meant by lagging is that every six isometric redraws it would pause for a half-sec, even with the scenario speed up at max. I believe it has something to do with the fact that I was using a try-catch system every redraw, which Java is not good at doing quickly. This happened at as few as 10 people. Fixed it now, so hopefully that means I can add some extra logic to the little people.
ZergZerg

2009/11/17

yeah, I'm working off an EEEPC... not much screen real-estate.
ZergZerg

2009/11/17

you mean like 4:1 pixel ratio or something? All that would take is a modification of a couple constants and scaling of the images.
ZergZerg

2009/11/17

It's small because the screen I work on is small ^_^ The screen size can be varied, and I am considering a scrolling map as well.
ZergZerg

2009/11/11

True 3D is not practical to do for a project like this. However, since I am incapable of good 2D drawings, isometrics are the only course left.