Slick Forums

Discuss the Slick 2D Library
It is currently Fri May 24, 2013 9:17 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Jan 23, 2012 10:12 pm 
Offline

Joined: Wed Feb 02, 2011 12:21 am
Posts: 12
I thought I'd share my Mini Ludum Dare #31 submission with you guys (since it used Slick2D!). The theme for the contest was 'fear'.

Blog Post - http://www.ludumdare.com/compo/2012/01/22/107451/
Game Download Location (select the 'Windows' or 'Linux' blue link on the LD page if you miss it) - http://www.ludumdare.com/compo/minild-31/?action=preview&uid=3727

Image

Dark Choices lives out a strange event surrounding one man. The darkness seems alive tonight.

"What is this place? The air is crisp and cool. I know this place but it is not the city. My city. Where am I?
I hear strange whispers tonight. This place is calling out to me. Where am I?"

Image

All in all it was a pleasure using Slick2D. I hope you guys enjoy!


Last edited by CWolf on Tue Jan 24, 2012 5:34 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Jan 23, 2012 10:57 pm 
Offline
Regular

Joined: Sun Oct 11, 2009 8:53 pm
Posts: 219
nice lol!

i saw u got a version of the game in exe, can tell me which program
did you use to convert the game from jar to exe?


Top
 Profile  
 
PostPosted: Tue Jan 24, 2012 5:33 pm 
Offline

Joined: Wed Feb 02, 2011 12:21 am
Posts: 12
I used 'Launch4J' to get it into an .exe. I also used a bundled JRE since I couldn't count on people having Java installed.

I added the Linux version today too.


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 12:26 am 
Offline
Regular

Joined: Sun Oct 11, 2009 8:53 pm
Posts: 219
can you explane more?
maybe give a link to a tut to make it to explane abit how you did it?

i want to do what you did, with the exe and non java depend in my game 2.


Top
 Profile  
 
PostPosted: Wed Jan 25, 2012 8:43 am 
Offline

Joined: Wed Feb 02, 2011 12:21 am
Posts: 12
Sure, no problem. I found there was a severe lack of tutorials to help with this type of thing! Basically I did the following.

How to create a java .exe game bundled with a JRE

[1] (Using Eclipse) Export your game as a runnable jar with the option of 'Extract Required Libraries into generated JAR'
[2] Download Launch4J
[3] Created a folder for my game, in this case 'DarkChoices'
[4] Created two folders in that folder called 'bin' and 'jre'
[5] In the 'jre' folder I navigated to my installed 'jre' and copied the 'bin' and 'lib' folder from it into my newly created 'jre' folder.
[6] In the 'bin' folder you need to copy your game jar, data folders (like I had 'data' and 'sounds') and your native .dlls for the version of the game you're making (Windows, Linux etc).
[7] Open up Launch4J and use the following...

[Basic]
- Select the 'Output File' to be <game_folder_name/bin/<GameName>.exe
- Select the 'Jar' to be your game jar (which should be in <game_folder_name>/bin

[JRE]
- Bundled JRE Path will be ../jre
- Select 'Only use private JDK runtimes'

[8] Save the Launch4J config using the 'Save' icon
[9] Build the .exe using the 'Build Wrapper' icon (the cog)

and there we have it. You have your newly created game .exe. You are now able to delete your .jar file from <game_folder_name>/bin if you so wish as you won't need it anymore for distribution (unless you want to keep it there). I used the above approach since my game didn't pick up my 'data' and 'sound' folder properly. A friend has managed to do away with the 'bin' folder competely and just have the root containing the .dlls, .exe and 'jre' folder. If you do this makes sure when creating your .exe to change the 'JRE Path' to 'jre' instead of '../jre'.

For additional guidance the folder structure will look like this if you follow my step by step instructions

- GameFolder
---- bin
-------- data
-------- sounds
-------- game.exe
-------- (a few .dlls)
---- jre
-------- bin
-------- lib

I hope this helps =).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group