Sandbox Game Specification
Inspired by Harvest Moon and Animal Crossing
Title
Anything works, really, from wacky Japanese-type names like “Mani Mani The Village of Dreams” to simple ones like “Sim Village” work. I like the idea of focusing it around a Village, however.
General Concept
The game is called “sandbox” because it has no obvious goal. You, as a player, will exist in some sort of village where you will own a home. There will be lots of things to do in the village so that rather than adding linearity to occupy the player we will simply have a large number of things to do. Overall, however, the goal of improving your home and your village will be the main thing.
More Detailed Description
For some reason, the player is buying a new home in a new village. Reasons could be: a) As a young person you are just moving out on your own or b) The economy crash caused the bank to foreclose your house, so you’ve got to get a cheaper one or c) You’ve just retired and want to leave the city life to go live in the country. Or any other number of possibilities. Either way, you’re at a new home, and it’s a tiny rickety shack. You’re also in a rather barren and scarce village without only a handful of people.
You are able to do any and every job as a means of making income. These jobs include errands/missions for the villagers, cutting down trees to sell for wood, collecting rare objects like fruits or gems, hunting and killing game to sell the meat, winning competitions in town, etc. These jobs all fall into two categories: 1) Errands/missions, where you are told to do a specific thing and you go do it. These are more complicated and many must be individually scripted, but interesting storylines and character development can result from them and 2) Sandbox/gatherer jobs, where you simply utilize the world around you to find/make something that can be sold.
Using your money, you can buy better tools and equipment, upgrade your home, buy interesting furniture/outfits, and travel. Travel is one of the most important parts of the game. An online multiplayer component will allow you to upload your village to a website, and then other players can visit it at any time. This is not simultaneous play, unfortunately, but you will be able to leave notes and the like, and potentially modify other peoples’ villages. This means the networking can all be SQL based, rather than through Sockets. Then later on we can potentially adapt to Darkstar or sockets so people can be in the same village together.
What Makes it Unique?
What I put up there sounds pretty verbatim like Animal Crossing or Harvest Moon, with a few small differences or additions. However, what makes this concept stand out is that we can avoid the shallow nature of those two games. Neither had any storyline or character personalities to speak of, and the tasks you do for the villagers in Animal Crossing are all reiterations of around 5 different quest types. By introducing a larger variety of quests and by putting serious dialog into them, we can really have something that’s very interesting. Similarly, if we add some traditional MMORPG elements like crafts, we can make it so that a lot of the obtainable items to decorate your home are actually the result of you building them.
Implementation
This would probably work just fine in 2D, however if we ended up with some 3D experts / artists it could work just fine in that as well. As such, using OpenGL could certainly be done, and potentially will be necessary if we can’t get good performance from Java2D. The game would hopefully be able to run in an applet, although this is not totally necessary. If we really make it feel like a community game and part of a website, however, that will be to its strength.
Being able to generate custom images from the game that people can use as avatars and the like will be very important, so we should keep in mind that we want there to be some easy way of screen-shotting specific pieces of the game.
There will have to be a lot of content, but it will all be very easy to keep separate per developer by using an intelligent resource system.
public abstract class Resource
{
//The money value for each of this resource.
int value;
//What this resource looks like.
Image image;
//etc.
}
public abstract class Job
{
//The rewards you get from this Job.
int[] rewardCounts;
Resource[] rewards;
//What time you started this job.
long timeStarted;
//The person who is doing this job.
PlayerEntity jobTaker;
//The Entity who gave this job.
Entity jobGiver;
//Called when a player is given this job.
public void assignJob(PlayerEntity u)
{
jobTaker = u;
jobTaker.giveJob(this);
}
//Called when a job is completed successfully.
public abstract boolean jobIsCompleted();
//Called when a job has been failed.
public abstract boolean jobIsFailed();
//Updates this job. Anything can go here from receiving input to
//catching position to checking the clock.
public void updateJob()
{
if (jobIsCompleted())
completeJob();
else if (jobIsFailed())
failJob();
}
public void completeJob()
{
for (int i = 0; i < rewards.length; i++)
jobOwner.giveResources(rewards[i], rewardCounts[i]);
}
public void failJob()
{
jobTaker.failJob(this);
}
}
//Job examples:
//1) Cutting down a tree.
public class TreeJob extends Job
{
int hitPoints = 10;
rewardCounts = new int[]{3};
rewards = new Resource[]{new WoodResource()};
public boolean jobIsCompleted()
{
//We complete cutting down a tree when it's all the way dead.
if (hitPoints <= 0)
return true;
return false;
}
public boolean jobIsFailed()
{
//We fail if we walk away from the tree.
if (!jobTaker.isCloseTo(jobOwner))
return true;
return false;
}
public void updateJob()
{
super.updateJob();
//If the player is swinging their axe, lose some HP.
if (Keyboard.IsKeyDown(Keyboard.KEY_SPACE))
hitPoints--;
}
public void completeJob()
{
super.completeJob();
//Kill this tree after it got cut down.
jobGiver.setMarkedForDeletion(true);
}
}
//This would be in some other class, like a TreeEntity or something.
if (player.isCloseTo(tree))
{
Job treeJob = new TreeJob();
treeJob.assignJob(player);
}
//Job examples:
//2) Part of a long quest chain with the local priest.
public class PriestJob12 extends Job
{
rewardCounts = new int[]{5,1,17};
rewards = new Resource[]{new HolyWaterResource(), new SilverCrossResource(), new GetOutOfConfessionsFreeResource()};
public void assignJob(PlayerEntity u)
{
super.assignJob(u);
u.recieveMessage(jobGiver, "All right, good luck getting those school girls to confess. They certainly are naughty!");
}
public boolean jobIsCompleted()
{
//We complete this job when we've satisfied certain conditions.
if ( ((Boolean)Globals.getJobProperty("SchoolGirlsConfessed")).booleanValue() == true)
{
//Also, we've got to be nearby the priest at the moment.
if (Vector2.getDistance(jobGiver.getPosition(),jobTaker.getPosition()) <= 15)
return true;
}
return false;
}
public boolean jobIsFailed()
{
//This job is failed if we've taken too long to do it.
if (System.nanoTime() - timeStarted >= 1000000000L)
return true;
return false;
}
public void completeJob()
{
super.completeJob();
//A happy message from the priest.
u.recieveMessage(jobGiver, "Thanks for helping me get those school girls to confess! Have some stuff!");
}
public void failJob()
{
super.failJob();
//Show a dialog message because the priest is angry!
u.recieveMessage(jobGiver, "Arg! Now I'll never hear their tantalizing stories!");
}
}
//This would probably be called from the Conversation that the player has with the Priest.
if (player.hasFinishedJobType(PriestJob11.getClass()))
{
Job priestJob = new PriestJob12();
priestJob.assignJob(player);
}
//Now what can you do with your resources? Make items of course.
public abstract class CraftedItem extends Item
{
int[] requiredResourceCounts;
Resource[] requiredResources;
//etc.
}
And I think you get the idea. Through doing this, people can really modularize absolutely anything and we can very quickly add a huge amount of stuff that you can do, and lots of quests. I wrote all those classes in only 20 minutes and you really could consider them fully functional, for the most part. This is what will make the sandbox game truly awesome; having countless numbers of resources, jobs, missions, and characters. All very quickly and easily added in.