Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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 892 times)
0 Members and 1 Guest are viewing this topic.
Offline wessles

JGO Wizard


Medals: 77
Projects: 4
Exp: 3 years


Radirius Games


« 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?

EDIT:
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

Junior Devvie


Medals: 2
Projects: 1


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.

Need an amateur composer for your project? I charge $4~ (depending on the length) a song, and need the practice. Check out examples here: https://soundcloud.com/literature-corner

I also might help with game jams free of charge (keyword: might).
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online opiop65

JGO Kernel


Medals: 161
Projects: 7
Exp: 4 years


JumpButton Studios


« 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): http://gedankenweber.wordpress.com
Offline Grunnt

JGO Kernel


Medals: 95
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: 246
Projects: 2
Exp: 1 year


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 - Survival Sim/Builder/Roguelike!
LIVE-STREAMING DEVELOPMENT: http://www.twitch.tv/SG_Rayvolution
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.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!