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

2013/12/15

Game isn't the same? (rhyme not intended)

Doge Doge

2013/12/15

#
I recently made a game in Greenfoot and it took very long to make. I decided to upload it to the greenfoot website and it is no where NEAR the same as it was offline. Offline the graphics were better, the game actually worked and much more. My game online is unplayable since you can't move my person. Can someone please explain? Any help would be great, thanks!
bourne bourne

2013/12/15

#
Exactly how are the graphics different? What doesn't work as it's suppose to? And can you move the player at all?
Doge Doge

2013/12/15

#
The graphics look worse than they did online, mainly the text for the scoreboard in the corner. Also, the player moving basically doesn't work, I can move it once one way but never again. It is very confusing.
bourne bourne

2013/12/15

#
Are you on a mac?
Doge Doge

2013/12/15

#
Yes
bourne bourne

2013/12/15

#
I have the same issues. Java applets in browsers on macs have text drawing using aliasing by default, and key releases are faulty.
Doge Doge

2013/12/15

#
Ah. Im going to try a different browser and see if that fixes anything. Also I really like your game, good job.
bourne bourne

2013/12/15

#
I've tried FireFox and Safari. You can fix the text, but I believe the key release problem is an issue with Java. And thanks, if you hit the like button that would be awesome.
Doge Doge

2013/12/15

#
Do you know how to fix the text? Im on Safari, I have also tried: Google Chrome (can't load it, nothing shows up) Opera (can't load it, nothing shows up) FireFox (can't go to greenfoot.org?) Also I liked your game :D
bourne bourne

2013/12/15

#
My workaround for the text is something like this:
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Color;
import java.awt.RenderingHints;
...
Font myFont;
Color myColor;
GreenfootImage image;
...
Graphics2D g = image.getAwtImage().createGraphics();
g.setFont(myFont);
g.setColor(myColor);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // This here is what does it
g.drawString(aString, xCoord, yCoord);
g.dispose(); // Call this when you are done using 'g' for good
Doge Doge

2013/12/15

#
Alright thank you so much. How do you deal with the key release problems? Because my game is unplayable with the bug.
bourne bourne

2013/12/15

#
I use a Windows partition if I really need to try out a scenario without trying to get by, pausing/resuming the scenario to reset the key presses/releases
bourne bourne

2013/12/15

#
Unfortunately, it seems this problem has existed a year or so. Wish it could get fixed
Doge Doge

2013/12/15

#
Me too. Thanks for the help man I really appreciate it.
You need to login to post a reply.