Porting from Solar2D to Defold?

Hi all the Community of Defold,

I’m newbie here and I’m a Solar2D developer. I was looking for a good engine that was lightweight and have support for html5 because Solar2D doesn’t have enough suport for it. I’m glad to find Defold.

I pretend to port my best games from Solar2D to Defold and I would like you tell me what coud be my challenges to do this, having in account that I’ve never do anything with Defold and I’m completely newbie with this engine. As a note, I’m not a bad developer and my games are puzzle games.

Thanks in advance,
Alexis

4 Likes

I’m not an expert on Solar2D and I did use it when it was Corona. Overall the most parts are similar. Lua is Lua. But of course you have to learn Defold Lua API which is quite simple. Defold Native Extensions and Solar2D Native is quite similar in the principle(but different workflows and coding style)
I think the most challenging difference is the editor(which is a big plus for me) and the assets pipeline. You have to get used to the Editor and learn the component types.

2 Likes

Thank you @selimanac
In Solar2D all the management of a scene is within the scene. Each scene is a simple file… of course, each scene has calls to various resources (sounds, images and many other files), but all the scripts for a scene are in the scene file, unlike Defold, where a scene has more than one code file associated with it, right?

Scenes are similar to Collections in Defold. They are kind of a largest container totally like a scene. But also you can use Collection in a Collection. All components are just a file in Defold too(they should be protobuf format if I’m not mistaken), but editing on Editor is way simpler. Collections can contain sound, sprites, models…

In Defold they are .script files. Those files are pure Lua but they had some special life cycle(init, update, final vs…) functions. You can use them as much as you want and anywhere you want.

1 Like

Thanks a lot for your explanations, @selimanac

1 Like

Welcome to Defold @AleCGames ! I hope you find Defold to be a good fit for you! I think it would be valuable to have a Solar2D to Defold guide, or perhaps a glossary. Perhaps you could write down some notes in this thread that we could turn into a page in our documentation?

3 Likes

Thank you @britzl … That’s an good idea. I promise to share my porting process through this thread. It would be a great help to those who might be in my shoes.

2 Likes

I’m an experienced Solar2D developer and I can tell that Defold’s paradigm is quite different.
It would be hard to port a game one to one so to say. I had to make my own little framework on top of Defold to feel more like in Solar2D, it allows to port a game much easier reusing parts of the code.

I can recommend redoing your game in Defold from scratch (some Lua logic can remain of course).

Thank you for your advice @sergey.lerg
I also have experience in Solar2D and I already realized what you said regarding the Solar2D port.

1 Like