Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Packaging files inside jars  (Read 772 times)
0 Members and 1 Guest are viewing this topic.
Offline relminator
« Posted 2013-10-13 07:59:53 »

Hi, I got some free time yesterday and coded this:

www.http://www.rel.phatcode.net/Temp/HangFighter.zip

It's a game I prototyped trying to combine hangman and space  invaders.

Kinda bad looking but I like the idea.  Nice game to port to droid.

How do I pack other files inside the jar when I export it?  For graphics I just put them inside the src/gfx/ folder.  Can I do that say with text files and  audio?

Also, anyone knows of a royalty free dictionary I could read words from?  My current build has 1 single word.

Thanks!
Offline Jeremy
« Reply #1 - Posted 2013-10-13 10:32:02 »

You can acquire a stream to any resource in the JAR, it doesn't matter what kind of data is contained in that resource. You will need to decorate\adapt the stream appropriately though if you're going to read text from it.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline relminator
« Reply #2 - Posted 2013-10-13 11:27:18 »

You can acquire a stream to any resource in the JAR, it doesn't matter what kind of data is contained in that resource. You will need to decorate\adapt the stream appropriately though if you're going to read text from it.

Do I could say, add a /resource folder under /src and load it like I load gfx?

Can't code right now to test it. Sad
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeremy
« Reply #3 - Posted 2013-10-13 12:45:58 »

Whatever you do with your graphics resources you should be able to do with your plain-text resources.

JevaEngine, Latest Playthrough (This demo is networked with a centralized server model)

http://www.youtube.com/watch?v=rWA8bajpVXg
Offline relminator
« Reply #4 - Posted 2013-10-13 14:05:19 »

Thanks!


Now, if I could only get my hands on that dictionary.
Offline zngga
« Reply #5 - Posted 2013-10-13 19:03:05 »

This is the dictionary file I use for Eclipse, should be meet your needs fairly well.

My code never has bugs... it just develops unexpected features!
Offline relminator
« Reply #6 - Posted 2013-10-14 03:52:31 »

This is the dictionary file I use for Eclipse, should be meet your needs fairly well.

Thanks!  This should make my life easier.  Btw, what do you mean by "dictionary I use for eclipse" and for what purpose.
Offline philfrei
« Reply #7 - Posted 2013-10-14 04:59:50 »

I thought I posted this a couple hours ago. Oops. Must have hit preview instead of post.

Another dictionary, provided by Oracle, actually, as demo data. I use it in a Boggle-clone.

http://docs.oracle.com/javase/tutorial/collections/interfaces/examples/dictionary.txt

"Greetings my friends! We are all interested in the future, for that is where you and I are going to spend the rest of our lives!" -- The Amazing Criswell
Offline zngga
« Reply #8 - Posted 2013-10-14 17:47:41 »

This is the dictionary file I use for Eclipse, should be meet your needs fairly well.

Thanks!  This should make my life easier.  Btw, what do you mean by "dictionary I use for eclipse" and for what purpose.

You can add a dictionary file to Eclipse to use for spell check. If it is good enough for spelling, then it should be good enough for a hangman game!  Grin

My code never has bugs... it just develops unexpected features!
Offline pjt33
« Reply #9 - Posted 2013-10-14 17:54:20 »

Also, anyone knows of a royalty free dictionary I could read words from?
12dict 2of12inf is supposed to be suitable for word games. It's not perfect, but for Hangman-style applications (as opposed to Scrabble-style games where people get upset if QAT isn't in your dictionary) it should be fine.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (38 views)
2014-04-15 18:08:23

BurntPizza (34 views)
2014-04-15 03:46:01

UprightPath (50 views)
2014-04-14 17:39:50

UprightPath (32 views)
2014-04-14 17:35:47

Porlus (49 views)
2014-04-14 15:48:38

tom_mai78101 (71 views)
2014-04-10 04:04:31

BurntPizza (130 views)
2014-04-08 23:06:04

tom_mai78101 (230 views)
2014-04-05 13:34:39

trollwarrior1 (193 views)
2014-04-04 12:06:45

CJLetsGame (200 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!