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

2011/8/25

Now here's a challenge...

2
3
4
5
6
kiarocks kiarocks

2011/10/4

#
posted new scenario
AwesomeNameGuy AwesomeNameGuy

2011/10/4

#
There's a couple free programs I downloaded that can do transparent colors. One is IfranView, open an image in that and save it in whatever format (I use .gif for all my scenarios because of the small file size) and it will ask you to click on a color to make it transparent. The other is paint.net, to be honest I still use microsoft paint whenever I need a quick picture, but paint.net is free and a powerful image editor (at least I think...I don't do much powerful image editing!) Anyway, there is a lot of stuff to be done still, personally, I think I will try to figure out how to stack objects and have them tumble realistically when disturbed. This might take me a while though. Something someone could work on is a screen that follows the pellet, a scrolling background, maybe some sounds, or a class that draws points on the screen if you hit something, stuff like that.
Duta Duta

2011/10/11

#
I call the scoring! :P I'm too nooby to do anything else, although I could attempt them anyway. I'll get it done in a minute
mjrb4 mjrb4

2011/10/11

#
Paint.NET is my free tool of choice - I've never really liked GIMP and good ol' paint is good for quick and easy selection type jobs but not for anything more complicated.
Duta Duta

2011/10/11

#
http://www.greenfoot.org/scenarios/3596
Duta Duta

2011/10/11

#
Trying to work out how panning would be achieved... I have some ideas but they could be better.
Morran Morran

2011/10/12

#
@mik I could make some graphics for an Angry Birds clone. What images do you want, and where do I post them?
Duta Duta

2011/10/12

#
Morran wrote...
@mik I could make some graphics for an Angry Birds clone. What images do you want, and where do I post them?
Use your imagination :) Just don't use birds! :p I think @kiarocks has a hamster image that's being used currently for the 'birds', but feel free to have your own ideas, this is a community project after all :)
kiarocks kiarocks

2011/10/12

#
the hamster is the official image. Try other things!
Duta Duta

2011/10/13

#
@kiarocks Ah, I hadn't realised that. Oh well, @Morran make some more hamster images so that the hamsters don't all look the same! :) Also if you could work on either some backgrounds or some blocks that we'll make the targets out of (like the wood/ice/stone in angry birds), and some enemies, that'd be great! Obviously you don't have to do all of that, but anything would be good. Thanks!
Morran Morran

2011/10/13

#
@Duta Okay! The Wood/Ice blocks are up! Check out the PicuresForGreenfoot scenario to get them(it'd be nicer if we just had a resources page).
Morran Morran

2011/10/13

#
Duta wrote...
Trying to work out how panning would be achieved... I have some ideas but they could be better.
Panning can be worked out by having each Actor on screen that can scroll have a second X variable. Call it "scrollX". Each Actor that can scroll would then be subclasses of "ScrollingActor". ScrollingActor would have a method "scroll(int amount)".
public class ScrollingActor
{
    int scrollX;

    public ScrollingActor()
    {
        super();
        scrollX = getWorld().getScrollPosition();
    }

     //it is important that this is public, and not private. 
     //it gets called by the World every time you want to scroll.
     //@param amount-- the signed distance to scroll. If negative, 
     //then scroll to the left. If positive, scroll right.
     public void scroll(int amount)
     {
           scrollX += amount;
           //redo location for changes to take effect.
           setLocation(getX() , getY());
     }

     //setLocation will also be altered to permit scrolling:
     public void setLocation(int newX, int newY)
     {
           //basically, you set the Actor's location to its location plus(or minus) the screen's scrolling
           super.setLocation(getX() + scrollX, getY());
     }
ScrollingActor has scrollX in it so that every subclass automatically gets it too. The World would tell each actor when they needed to scroll in its act() method. It would have a getScrollPostion() method just in case scrollingActors's scrollX's fall out of sync with the rest of the world's. You can specify how it decides how much to scroll... maybe mouse position?
kiarocks kiarocks

2011/10/13

#
in angry birds it is dependent on 1. where the launched bird is 2. if the user has clicked and dragged.
Morran Morran

2011/10/13

#
@kiarocks So then have the World have a method doScroll().
//doScroll figure out how every ScrollingActor should scroll.
public void doScroll()
{
      if(bird.getX() > firstRightScreenMargin) {
            scrollAmount += someNumber; //(tweak this);
      }
      if(bird.getX() > secondRightScreenMargin) {
            scrollAmount += someOtherNumber; //(tweak this);
      }
    
      if(bird.getX() < firstLeftScreenMargin) {
            scrollAmount -= someNumber; //(tweak this);
      }
      if(bird.getX() < secondLeftScreenMargin) {
            scrollAmount -= someOtherNumber; //(tweak this);
      }

      //now for mouse clicking and dragging
      if(mouseClicked) {
           if(mousePosition > firstRightScreenMargin) {
                  scrollAmount += someNumber; //(tweak this);
           if(mousePosition > secondRightScreenMargin) {
                  scrollAmount += someOtherNumber; //(tweak this);
           if(mousePosition < firstLeftScreenMargin) {
                  scrollAmount -= someNumber; //(tweak this);
           if(mousePosition < secondLeftScreenMargin) {
                  scrollAmount -= someOtherNumber; //(tweak this);

}
this would simply add some number to the world's scrollAmount(an instance variable). Each ScrollingActor would refer to scrollAmount for their scroll() method. scroll(getWorld().getScrollAmount()) would be called in each ScrollingActor's act() method I guess.
delmar delmar

2011/10/13

#
Maybe someone should make a collection for all the work-in-progress versions of this. I had trouble finding them. (I found 2 — are there more?)
There are more replies on the next page.
2
3
4
5
6