Skip to content
Adrijaned edited this page Jan 19, 2018 · 5 revisions

Introduction

During your work on adding new content to DestinationSol, you might encounter few common issues. On this page, we would like to try to provide you with some resources you might find helpful in resolving those issues.

JSON

If you are planning on adding new ships/weapons/factions into DestinationSol, most of the time,, you will be dealing with JSON. If you have never worked with JSON/you don't know what JSON is, we HIGLY suggest you to look through the Beginner section before continuing to explore this wiki. If you have, however, worked with JSON before, you might consider looking through the Reminder category to freshen your skills a bit if you feel the need.

Beginner

What is JSON?

JSON is a data file format, the same way .txt or .zip is.

Where to create JSON?

For creation of JSON files you may use any text editor you wish, although use of MS Notepad is discouraged upon. If you are looking for more complex solution that you can easy implement with the rest of our workflow, and you are potentially even thinking about improving the engine of the game, our recommended tool is IntelliJ IDEA (Community).

What to put into JSON?

Each JSON file starts with { and ends with }. Inside those, there may be an unlimited amount of key-value pairs. If you don't know what key-value pairs are, imagine the following: You are working in a large conference areal, and there is conference taking place right now. You carry a list of all the attending organizations with you at times, where you got listed the room organization is showcasing in along with its name. This way, if anybody happens to ask you 'Where is the organization XYZ', you can simply look up that name in the list and answer with the correct room. In this example, the 'key' was the organization name, something you can easily look up in list, and the 'value' was the conference room, or basically anything that could have interested you in connection with the organization-the key. In JSON, the key must be always of a String type, which means some word enclosed in double quotes, like "key". Value may than be of any type, which will be discussed later. Each key is separated from its value with colon :, and individual key-value pars are separated by commas ,. You can also insert new lines and spaces wherever you want to make the file more readable. Thus, some example JSON file may look like this:

{
  "organizationName": "MovingBlocks",
  "organizationGame": "DestinationSol",
  "gameLeader": "The awesome leader vampcat"
}

What are JSON value types?

In JSON, keys can be only of type String. However, values can be of any of the following listed types:

Type Example Explanation
String "The awesome leader vampcat" Some word or sentence, enclosed within double quotes ""
Number 42 Some number,which may or may not contain decimal part
Boolean true One of the values true or false
Array ["vampcat", 42, true] An array is an arbitrary amount of values enclosed in [], separated by commas ,
Object {"name": "DestSol", "array": [5,6]} Object is a value, that may itself contain an arbitrary amount of key-value pairs. You can think of objects as of new JSON files.

Example JSON

Now, you should have a basic idea of how JSON file should look. To sum all these things up, there is some example JSON showcasing all the features mentioned above:

{
  "displayName": "Federal battleship",
  "price": 500,
  "playable": true,
  "possibleCaptainNames": [
    "Jack",
    "John",
    "Steve"
  ],
  "drone": {
    "type": "repair",
    "level" 2
  },
  "engines": [
    {
      "position": {
          "x": 3.152,
          "y": 4.987
      },
      "thrust": 8
    }, {
      "position": {
          "x": 5.211,
          "y": 1
      },
      "thrust": 0.00001
    }
  ]
}

Reminder

JSON resource 1
JSON resource 2
JSON resource 3

Graphics

If you are planning on adding new content to DestSol, you will most probably need to add some graphics. Please, when looking for graphics, keep in mind few simple things:

  • Always use only graphics you are licensed to use this way
  • Check that the graphics style fits into the game overalls style
  • Check that your graphics isn't used in the game already
  • Always include a link to the original author of the graphics

Ideal, of course, would be to create your own graphics and release it for the use in this game under appropriate license :)
If you are planning on going this way, for the drawing, please use only software you are licensed to use, e.g. free software or software you own copy of for commercial use. If you are looking for free raster graphics editors, take a look at these:

Sound and music

When working on DestinationSol, you might encounter the need for adding new sound effects/music. Again, the same as with graphics, check for these few things first:

  • Always use only sounds you are licensed to use this way
  • Check that your sound isn't present in the game already
  • Always include a link to the original author of the sound

Ideal, of course, would be to create or record your own sounds and release them for the use in this game under appropriate license :)
If you are planning on going this way, for the recording, please use only software you are licensed to use, e.g. free software or software you own copy of for commercial use. If you are looking for free sound recorders/editors or sites to take your sounds from, take a look at these: