I have been working on a spare-time project for a while, and I work on it so intermittently that I feel uncomfortable with some areas of the code.
For example, I have a decent working game right now, but I’m not sure how exactly to package it up into a webstart or anything of the sort.
But that’s not my big concern right now. My biggest problem is that my game loads .txt (I can probably switch that to xml) files describing how to draw certain units in my game. I want my game to be fairly editable when it is completed, so I would like to give people the option of creating their own files to describe the shape of various game objects.
Looking at my code, I see that I have a problem:
public linemap(String filename){
String newfilename = “C:\Documents and Settings\Dan\Desktop\race\design\” + filename;
I’m pretty sure that most people will not have the same path as me for their files. Is there a way to define a general path for saving these things? Is there a way to have the program just look for a text file within its own path?
I know I sound very clueless about this, and that’s because I happen to have huge holes in my knowledge of java despite my natural affinity for logic.
If somebody has an answer to this, I would really appreciate it. If there is a tutorial somewhere on the net that I obviously need to read about this, that would be great too. This is one of the obstacles between me and my goal of finally completing this game that has consumed me.