This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
Multiple worlds?
By ttamasu, with 4 replies.
Last reply by davmac, over 12 years ago:
Its Greenfoot.SetWorld(World). It associates another world the with same actors.
This might just be a matter of terminology, but, no, Greenfoot.setWorld(...) doesn't associate another world with the same actors - it just makes another world active. The other world might have a completely different set of actors in it (or none at all).
I was hoping there was a way to keep two independent sets of worlds so I can do some background processing while the current one is being played.
You can do this by manually calling the act() method of each actor in the othe
how would you create levels
By -nic-, with 6 replies.
Last reply by -nic-, over 12 years ago:
ok i got it working
Char to integer
By nooby123, with 5 replies.
Last reply by nooby123, over 12 years ago:
Thanks very much!
My world disappeared right after I compiled!
By MakerOfGames, with 10 replies.
Last reply by davmac, over 12 years ago:
tylers, exact same problem = exact same solution :p ... but please start a new discussion to post your code to avoid getting things mixed up in this one.
adding a copy of itself
By Razzo, with no replies.
I've been using an ArrayList for an Inventory, And bound to each item is a variable; amt, (Amount) When I drop something, I want it to, if amt > 1; addClone if amt == 1; addItself.. Ive been doing this but I dont know how to add its own class.. This is what I have been doing <Code Omitted>
turn towards
By tylers, with 5 replies.
Last reply by tylers, over 12 years ago:
yes forgot to put that.
when are you online?
By tylers, with 2 replies.
Last reply by tylers, over 12 years ago:
no I meant this as like a survey type thing. what time are you online on greenfoot. thank for replying i need this for something im doing on a scenario.
I need help on some code.
By MakerOfGames, with 1 reply.
Replied to by SPower, over 12 years ago:
If(getX() == aNumber && getY() == anotherNumber) { turn } That wasn't so hard, was it?
Adventure Game Collision
By RedPhoneBooth, with no replies.
Hey, I have just spent like 30 minutes working on a simple adventure game, its looking pretty good but now ive been stuck for a while with collision detection. I decided to make the cells 1 pixel so I have the freedom to make good looking and complicated scenery but the problem is I want the player to be able to go under bridges or partially under trees and stuff like that. So far everything ive tried just ballzed stuff up, so like I was wanting like a specific solid area for each object that I could "draw" into the world. Btw, im using the getX, getY, and setLocation methods for movement. Thx for the help! PS: Also, ive decided to scrap the idea of scrolling and go old school, u know, like the games where each screen was a new "area" that was mainly static and had the player walk from tile to tile, but how would I do somthing like that? I could have like shittons of World Classes and like switch between each one, but I could also just switch the background image between a two dimensional array in one world class, I might do that, but if you have any ideas... PPS: Sorry for the triple whammy of questions but I wouldn't mind creating multilayer as well, although I have no clue how to do so, how do you code servers and stuff like that? just give me the basic knowledge so I can decide weather its worth my time and effort to do cause that would be really fun but I imagine really hard to do. oh well, ill focus on single player for now.
TRacking ojects
By -nic-, with 4 replies.
Last reply by tkiesel, over 12 years ago:
My //comment above should have read close TO 90% of distance to target. Oops. ;)
How to get the hight and width of the computer screen?
By K_O_P, with 5 replies.
Last reply by ttamasu, over 12 years ago:
What tkiesel said works... All you need is the toolkit. Here is simple mock up, for instance: ---------------------- import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Dimension; import java.awt.Toolkit; /** * Write a description of class goo here. * * @author Takashi * @version 1 */ public class goo extends World{ public goo(){ super((int)Toolkit.getDefaultToolkit().getScreenSize().getWidth(), (int)Toolkit.getDefaultToolkit().getScreenSize().getHeight(),1); //Debug
online
By tylers, with no replies.
when are most people online
static
By tylers, with 3 replies.
Last reply by tylers, over 12 years ago:
thanks it works now
incresing varible
By -nic-, with 6 replies.
Last reply by -nic-, over 12 years ago:
gulp thx i have a look
Creating a nice looking counter
By SPower, with 9 replies.
Last reply by SPower, over 12 years ago:
@nccb Again, this it great. I won't go back using my own ScoreBoard, this is much, much better. Check it out if you want, I already updated it.
988
989
990
991
992
993
994
X