Sign Up, Lost Password
You need to login to take part
@pump_upp - best crypto pumps on telegram !
By AreebRaza, with no replies.
https://t.me/pump_upp - best crypto pumps on telegram Make 1000% and more within 1 day, join channel @pump_upp !
By CookieMonster, with 1 reply.
Replied to by danpost, 2 days ago:
Hey, I want to make a dark maze, like the only part of the maze you can see being the actor and a bit around the actor. Is there a way to do this?
Yes, but it involves extensive work on images. Nitty-gritty stuff. I might decide to put up a demo for this one. At least it will portray one way of accomplishing it.
Code only execute on first instance
By Makuro, with 3 replies.
Last reply by danpost, 2 days ago:
<< Codes Omitted >> Thanks for your reply and here are the Game Manager and Background class respectively
I really do not see the need of the
class. All the information stored in fields there can be determined on the fly, with fair programming. A
could be used to show victory or failure and at the same time be used to stop the scenario when added into the world with (in
class): <Code Omitted>Instead of setting fields
Saving the caracter
By Guy68, with 5 replies.
Last reply by danpost, 3 days ago:
What is static field? How can i save the player in that?
field is a field that is declared from the onset. It does not belong to any object created from the class it is in. It belongs to the class itself. All objects created from the class (when cast as that type object) can access it. If set
(as opposed to
), any class can access the field. For example:
By Wiwhyweirdo, with 2 replies.
Last reply by danpost, 4 days ago:
After some more testing I have noticed that whenever I receive damage the game speeds up at gets less laggy. Do what you want with this Information .
You might be doing something with images that is causing the lag issue. Make sure you pre-load your images. Make sure you always reference those pre-loaded images when setting an image. Keep your world at a reasonable size. I stick to not much more than (900, 600) world size (depending on the scenario). If using an unbounded world, make sure all actors are removed from the world after they leave the viewport
Greenfoot scenario freezing in browser
By epm, with no replies.
Hey, I tried to share my scenario but it keeps initialising. After a long time it loads but when changing the world it start freezing again. I really don't know why :( It is working in Greenfoot. You can find my scenario
How to reset a World while the Program is running?
By Bankspeers, with 5 replies.
Last reply by Bankspeers, 9 days ago:
Thank you, now it works
How to detect if all objects are gone
By Psg, with 11 replies.
Last reply by danpost, 10 days ago:
hey, dan I need your help. I have a problem. I believe this if statement is working, but reading the wrong value of the integer rotate. What should i do
First, you should understand that the rotation is already being held in the Actor class, meaning you do not need to declare another field for it. You could use something like the following: <Code Omitted> It is not really clear by your code as to exactly what you are trying to achieve with the turn methods Obviously, you want the crab to turn sharp at an edge, whic
How to stop actors from "sliding" after calling the move() function and changing orientation
By TheGrrMan, with 5 replies.
Last reply by danpost, 12 days ago:
your QActor class, how do I access this?
It can be found in my
Asteroids w/Improved QActor class
scenario. Again, it is not to be modified in any way -- just used as is. Download the scenario and open in greenfoot. Then, you can copy/paste the class into your scenario. It does work differently than the
class, however. Open the class and read through the instructions carefully.
subclasses requiring it should extend the
How do you rotate an object to spawn in a different way?
By zlm, with 2 replies.
Last reply by zlm, 13 days ago:
Yes, thank you so much!
How do you make an object move along with another object
By jeremyneedshelp, with 1 reply.
Replied to by danpost, 13 days ago:
I cannot make my frog to move along with the boat that allow the frog to cross the river. i managed to get the frog to go on top of the boat but it wouldnt move at all. it would just get stuck on the boat and it would die.
You need to show your current codes for both the frog and the boat. Also, you can look at other codes that do similar things. For example, my
Jump and Run Demo w/Moving Platform
scenario has an independently moving actor moving on a platform.
Adding a method to superclass Actor directly
By ChristophT, with 2 replies.
Last reply by ChristophT, 15 days ago:
Thank you for your reply. At least I am not going to waste my time then. To bad, I can't do that however.
Gradually decrease and increasing speed
By lightbringer, with 4 replies.
Last reply by danpost, 17 days ago:
cap out in a particular value
<Code Omitted> or <Code Omitted>
Need to execute sound.stop() once a sound has played through once
By lilnasX, with 1 reply.
Replied to by danpost, 18 days ago:
I want the class to play through the wasted sound once, and then once it has finished playing play the gameOverBGM sound in a loop. However, the if statements condition is never met and the gameOverBGM line is never reached. I can't just input wasted.stop() after wasted.play otherwise the sound will not play through once and it will immediately play my gameOverBGM. need some advice, thanks. << Code Omitted >>
You cannot track the progress of the sound from the constructor of the class. Use the
method for this control. Also, line 22 is a bit redundant. T
Getting Neighbours with Certain Traits?
By Foofoo99, with 7 replies.
Last reply by Foofoo99, 18 days ago:
Thank you so so much danpost! You have worked wonders in the progression of my remake of Stratego and I wish you a good night. I will try to let you know when the game is done.