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

Comments for Throwing things

Return to Throwing things

DutaDuta

2012/3/10

When I say the physics are all off, I meant that this isn't using proper equations, just a kind of make-believe method of calculations I put together for simplicity
A new version of this scenario was uploaded on Sat Mar 10 22:43:03 UTC 2012 Forgot to include source code :L
A new version of this scenario was uploaded on Sat Mar 10 22:46:17 UTC 2012 Minor change
dlannidlanni

2012/3/11

All i can do is click on the funny head and it jumps out, once. Then nothing. No bird. Huh? Pretty.
danpostdanpost

2012/3/11

@dlanni, drag the bird just a little down-left and release!
dlannidlanni

2012/3/11

Tres cool!! What kind of mind came up with this bizarre concept?
MorranMorran

2012/3/12

This is great, Duta! I just don't know why nobody could have made it for this... http://www.greenfoot.org/topics/261/0
DutaDuta

2012/3/12

@Morran I actually participated in that thread, but it was when I was just starting so I didn't do much. Anyway if this was to be a true clone I'd have to add in all the levels, boxes, collisions etcera that I don't have the time for - This scenario took almost no time to make
DutaDuta

2012/3/12

Also check out this: http://www.greenfoot.org/scenarios/3596
MorranMorran

2012/3/12

That's true. Only your new one has so much cleaner graphics. Oh, and scrolling. Scrolling is great.
danpostdanpost

2012/3/12

@Morran, maybe you want to download the source and see how Duta managed to create such clean scrolling graphics.
A new version of this scenario was uploaded on Tue Mar 13 00:02:20 UTC 2012 Just a quick update meaning there are many different bird images now.
DutaDuta

2012/3/13

@danpost actually its the first time I've used this particular method for scrolling (generally I have a different approach) - I'd recommend this method for ease of use. This is what I'm talking about btw: while(((Actor)getObjects(Bird.class).get(0)).getX() > getWidth() - 65) for(Actor a : (List<Actor>)getObjects(null)) a.setLocation(a.getX()-1, a.getY()); ^That (though you need to either always have an instance of Bird.class in the world or enclose it in an if(!getObjects(Bird.class).isEmpty()) check
DutaDuta

2012/3/13

Actually ignore that I've just realised a more efficient method
A new version of this scenario was uploaded on Tue Mar 13 00:20:12 UTC 2012 New scroll method - looks better and is more efficient
DutaDuta

2012/3/13

int d = ((Actor)getObjects(Bird.class).get(0)).getX() - (getWidth() - 65); if(d > 0) for(Actor a : (List<Actor>)getObjects(null)) a.setLocation(a.getX()-d, a.getY());
danpostdanpost

2012/3/13

How about: if(((Actor)getObjects(Bird.class).get(0)).getX() > getWidth() - 65)
danpostdanpost

2012/3/13

NVM, I see you need the 'd' to set the locations.
DutaDuta

2012/3/13

However when it comes to setLocation(...) I'd have to write out all that again in the x parameter. Instead I stored it as a variable so that i can access it twice while only calculating it once.
DutaDuta

2012/3/13

Oh ignore my comment then, I posted it before you did the 2nd reply saying nvm
danpostdanpost

2012/3/13

@Duta, are you still working on the 'Grapher'?
DutaDuta

2012/3/13

I haven't been no - I didn't realize anyone had noticed it. When I get home from college tomorrow I'll implement zooming (I'm 95% sure I know exactly how to do it). Well, once I've done an english essay anyway Its nice to know that it has actually got seen (well maybe not much, but at least _someone_'s seen it) :p
danpostdanpost

2012/3/13

I created one. It is complete, even to the point of accepting formulas. But have not quite got the parsing of them done.
DutaDuta

2012/3/13

Ah yeah - I was going to attempt an equation parser, however I couldn't see myself getting one fully functioning, and less than fully functioning I saw as pointless. Good luck though :) I hope to see it uploaded in the not-too-distant future!
A new version of this scenario was uploaded on Thu Mar 15 23:44:36 UTC 2012 Height indicator when bird goes off the top of the world
A new version of this scenario was uploaded on Thu Mar 15 23:50:49 UTC 2012 Clearer height indicator.