Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

It may depend on what you want to do with them. I've used this for my game, where the game engine is written in JavaScript, and the data is stored in a separate file. In this case, I just made the data file another .js file, and stored the data as one big Javascript object.

e.g.

data.js

var gameObj = {

"house": {text: "My house",  directions: ["north"]},

"garden": {text: "My garden", directions: ["south", "east"]}

};

engine.js

function beginGame() {

doSomething(gameObj["house"]);

}

index.html

<head>

<script src="data.js"></script>

<script src="engine.js"></script>

</head>


You can check out an example in more detail by looking at the source of my first game (although please only use this for inspiration, don't reuse the actual code!): https://korosia.itch.io/the-witch-of-gingerglade