Question: I am new to Java game programming, but the more I read the more I'm confused, because I've seen several different approaches to make a game loop:
1. The standard approach, that uses the Timer class (seems to be less precise).
2. The more precise approach that uses System.nanoTime.
3. A simple approach that uses scheduleAtFixedRate.

Which one should generally be preferred and where are the advantages/disadvantages of each approach? Thanks in advance for any info.

Answer: 
It depends on how you're storing things internally.

Here's an example, though it's not terribly efficient, that uses your format:

```
public Vector<Trainer> loadData(BufferedReader in) throws IOException {
  Vector<Trainer> trainers = new Vector<Trainer>();

  String line = in.readLine();
  String[] split;
  while (line != null) {
    split = line.split(";");
    if (split[0].equals("@Trainer")) {
      int count = Integer.parseInt(split[1]);
      Trainer t = new Trainer();
      for (int i=0; i < count; i++) {
        t.add(Pokemon.createMonster(in.readLine().split(";")));
      }
      trainers.add(t);
    }
    line = in.readLine();
  }
  return trainers;
} // end loadData()

```

I'm also sidestepping the issue of the varying parameter counts for each type of pokemon by passing the split array on to the creation method.

Strictly speaking, you don't *really* need the "@Trainer" and "@Pokemon" bits, because the system will automatically differentiate between trainers and monsters. That's how helpful the monster-count information is.

If you'd rather, you could also store things in a database, like SQLite, and pack things into tables instead.

Here are some example tables:

```
CREATE TABLE Trainers (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL
);
CREATE TABLE Monsters (
  id INTEGER PRIMARY KEY,
  type INTEGER NOT NULL,
  owner INTEGER FOREIGN KEY (Trainers.id),
  parameters TEXT NOT NULL
);

```

By using a `parameters` column, you're avoiding the need for individual columns for each parameter for each monster type. Formatting would be whatever you want, including the semicolon-separated method you mention.
I'll offer an alternative strategy here which might be effective and lets you tack on data fairly easily.

Consider the following object:

```
public class SaveGame
{

   private ArrayList<EventFlags> _eventFlags;
   private TrainerInfo _trainerInfo;
   private SomeBlob _someBlob;
}

```

You'll have to forgive me for it not being explicit Java; but this is a basic "SaveGame" class that just contains a bunch of pointers to various game data. You store things like your story flags, variables and other persistent world information things here. 

Then, just use [Java serialization](http://www.tutorialspoint.com/java/java_serialization.htm) to save this file to the disk when you need to save. You'll be modifying these things in-game as you play anyway, so in a game like Pokemon it makes sense to just flush the state to the disk when you're done.

Nice and simple.