Source Control
kolkat

Hello

I am considering using Wade for a collaborative project (isometric RPG). They key point being it's collaborative - I want to work on it with other people. We need some form of source control, like Git.

So my question is: is it possible to use Wade with Git? How? I could not find an obvious way.

All 3 Comments
Gio

Hi kolkat

It all depends on what you mean by "Wade" :) I mean it's an authoring tool, but can also be used as a simple framework,

If you want to use the editor to do everything (design your maps, write code, and all that), AND want to do this with other people using git, then you're right there isn't an obvious way yet (as of version 4). You will have to download your project from the editor every so often, unzip it in a local folder, reconcile your changes and then do a git commit / push. I agree this is not ideal, and we do have plans to make collaborative projects in the editor easier going forward.

However, you can also use wade like any other JS framework. Keep all your files in a local folder, use something like WebStorm or Sublime to write code, and use git normally like you would use it with any other JS framework. In that sense, wade is the same as any other library, you can easily integrate it with your own tools.

But when you do that, you can still use the wade editor to design your maps. Once you've created a map, simply download the map file (.wsc) from the editor, and save it to your local project directory, so it becomes part of your own git repo. Same thing for tilesets, characters, animations... you can design them in the editor and then save the relevant files in your local directory that is under source control.

I hope that makes sense, but feel free to ask more questions if you need assistance with setting that up.

kolkat

Thank you for your quick response Gio.

So if I understand everything correctly... I start the editor, create a new project. Then download the (empty) project's source code from the editor and unzip it to a local folder. I create a Git repository linked to this folder. I use an IDE or text editor to write my scripts in that folder, save my images in that folder, etc. I assume I can use Visual Studio Code too, right?

Then when I want to create a map, I go to the editor again, and I do what you did in your isometric tutorial video to create an isometric map. Where is the map data saved exactly? And how do I load this map from my scripts that are in my local folder?

Gio

Yes that's a good way of doing it. And yes you can use Visual Studio Code (or whatever you like really).

Wade doesn't really have "maps", it's got "scenes". A scene can contain a lot of things (scene objects, isometric terrain, sounds, scripts, images, and more). So when you create an isometric map, you're really creating a scene that contains an isometric terrain.

All the scene data (including your isometric terrain) is contained in a .wsc file. By default, when you create a new project and start editing the scene, your are editing scene1.wsc. Of course you can rename it, or create new scene files and edit them (by double-clicking a scene file, you change the scene that you're editing). You can then get this file by right-clicking it in the editor and selecting Download.

You can later load these scenes using wade.loadScene('scene1.wsc') or whatever name you've used for your wsc file.

You can load multiple scenes on top of each other too. So you can have one scene that contains your terrain, and one that contains your UI for example, and then load both.

The one thing to be careful with, is that your scene data may contain references to some other files. For example if you're creating an isometric terrain using a texture atlas called myTerrain.png, then you want to make sure that myTerrain.png is both in the editor AND in your local project folder.

Post a reply
Add Attachment
Submit Reply
Login to Reply