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

2017/6/16

Sharing Games

BluRogue714 BluRogue714

2017/6/16

#
I'm just curious, is it possible to turn a greenfoot game into a normal java game one can download from the internet? I want to share my game with a few of my friends who don't have the greenfoot software
danpost danpost

2017/6/17

#
You can make an application of it by making an executable jar file. Then either email it to your friends, put it on a flash drive and transfer it to their systems or even include it inside the greenfoot scenario folder and upload it to this site with the 'Publish source code' checkbox checked so they can download it and extract it from the folder. For your friends to be able to run it, however, they still would need a java JRE installed.
Adhim Adhim

2017/6/18

#
danpost can you help me ?
danpost danpost

2017/6/18

#
@Adhim, nobody can help you unless you describe your problem and show your current code. Please start a new discussion thread for your issue.
BluRogue714 BluRogue714

2017/6/20

#
danpost wrote...
You can make an application of it by making an executable jar file. Then either email it to your friends, put it on a flash drive and transfer it to their systems or even include it inside the greenfoot scenario folder and upload it to this site with the 'Publish source code' checkbox checked so they can download it and extract it from the folder. For your friends to be able to run it, however, they still would need a java JRE installed.
I uploaded the scenario to the greenfoot site as I am having trouble opening the jar file. All I get is a tiny greenfoot window with a run and reset button. Sometimes the Jar file doesn't even open. Any help is appreciated Link to scenario
Yehuda Yehuda

2017/6/21

#
The reason the .jar file is just a grey square is because there's an error when a new Space() is constructed.
java.lang.OutOfMemoryError: Java heap space
	at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
	at java.awt.image.Raster.createPackedRaster(Raster.java:467)
	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
	at java.awt.image.BufferedImage.<init>(BufferedImage.java:351)
	at GifImage$GifDecoder.readImage(GifImage.java:853)
	at GifImage$GifDecoder.readContents(GifImage.java:731)
	at GifImage$GifDecoder.read(GifImage.java:439)
	at GifImage$GifDecoder.read(GifImage.java:504)
	at GifImage.loadImages(GifImage.java:115)
	at GifImage.<init>(GifImage.java:48)
	at Space.<init>(Space.java:17)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at greenfoot.core.Simulation.newInstance(Simulation.java:617)
	at greenfoot.localdebugger.LocalDebugger$QueuedInstantiation.run(LocalDebugger.java:155)
	at greenfoot.core.Simulation.runQueuedTasks(Simulation.java:502)
	at greenfoot.core.Simulation.maybePause(Simulation.java:305)
	at greenfoot.core.Simulation.runContent(Simulation.java:218)
	at greenfoot.core.Simulation.run(Simulation.java:211)
danpost danpost

2017/6/21

#
You could probably scroll one background image, as opposed to using the background gif images, to free up some memory.
You need to login to post a reply.