Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  Do you put resources in or out of the .jar?  (Read 3071 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles
« Posted 2014-01-24 00:10:20 »

I do it outside of the jar, since it is easier to access the files, and you don't need to troubleshoot with streams.

What do you do?

And  why?
Offline zFollette

Junior Devvie

Exp: 2 years

I like jokes

« Reply #1 - Posted 2014-01-24 03:01:11 »

I always put my resources in the jar (unless they are of a really large size).

Humor will keep you alive.
Offline Ashedragon

JGO Coder

Medals: 27
Projects: 1
Exp: 4 years

The best person you could possibly be is yourself.

« Reply #2 - Posted 2014-01-24 04:54:14 »

I put my resources inside the jar, unless there's modding.  In which case I do both.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Opiop
« Reply #3 - Posted 2014-01-24 11:12:25 »

I put mine inside just so the user has less to worry about when trying to start the game. If you have a folder your game relies on, what happens if a user thinks its ok to delete it or move it to a different directory? Sure, I guess you could put it in a secret directory people have never heard of so they can't mess with it, but I still like containing my resources I guess. Looks much nicer to me!
Offline lcass
« Reply #4 - Posted 2014-02-23 22:24:59 »

it depends on how you access it, if you access a static link to a directory stored on the persons computer then it should be outside and needs to be referenced directly , if it is inside the jar then it can b referenced without setting a directory outside the jar
Offline UprightPath
« Reply #5 - Posted 2014-02-24 01:17:18 »

I try to do it depending on the skill/knowledge of the potential user and on how much chance there is that I'd need to change the resources on the fly, or whether the users should be able to.

That said, I think that the 'inside' works best for any case where you're planning on writing an installation system or something like that. The less that the user has to do themselves the better. So an installer (Point it at a directory) or a .jar with everything in it seems best. If your expecting your Use to understand the jargon and the like? Well detailed instructions with an outside resource might work as well. Hah.

Offline Varkas
« Reply #6 - Posted 2014-02-24 10:15:48 »

If I want resources to be edited even after building the application, I put them outside. If resources are constant, I put them in the jar file.

if (error) throw new Brick(); // Blog (german):
Offline Grunnt

JGO Kernel

Medals: 143
Projects: 8
Exp: 5 years

Complex != complicated

« Reply #7 - Posted 2014-02-24 11:41:05 »

As @UprightPath says, its probably best to think of the user's experience when making this decision. The choice for including resources inside a jar or not then depends on how you plan to distribute & deploy your game:
- Download & run a .jar file: include resources inside the jar, as this makes it easier to move the game to another location
- Download an installer that installs the game in some directory and makes links to the start menu: doesnt really matter as the file location will not change
- Download an installer that automatically updates then game (e.g. minecraft style): better keep resources seperate, as otherwise you will have to download all resouces (even ones that have not changed) every single update, wasting bandwidth

Offline Rayvolution

« JGO Spiffy Duke »

Medals: 379
Projects: 2
Exp: 2 years

Resident Crazyman

« Reply #8 - Posted 2014-02-24 16:05:35 »

Both! Well, for my latest project anyway.

I plan to add a "Run external mode" setting in my game's config default to false. When flagged to true the resources will unpack out of the .jar, that way people who want to edit files can, or just for those people who want the microscopic performance boost. But, it still leaves the jar in it's default state as mobile as possible.

My end-goal is to make the game "Thumb drive compatible", AKA: Storing all the settings/resources/save files encapsulated in whatever folder the user puts the jar in. That way the game can be played "anywhere" easily. (AKA: On school and work computers, muwhahaha)

- Raymond "Rayvolution" Doerr.
Retro-Pixel Castles - Now on Steam!
Pages: [1]
  ignore  |  Print  

EgonOlsen (61 views)
2018-06-10 19:43:48

EgonOlsen (42 views)
2018-06-10 19:43:44

EgonOlsen (61 views)
2018-06-10 19:43:20

DesertCoockie (241 views)
2018-05-13 18:23:11

nelsongames (142 views)
2018-04-24 18:15:36

nelsongames (141 views)
2018-04-24 18:14:32

ivj94 (883 views)
2018-03-24 14:47:39

ivj94 (144 views)
2018-03-24 14:46:31

ivj94 (795 views)
2018-03-24 14:43:53

Solater (159 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!