Defold feature set - server and version control

Hello Defold team,

We’ve been looking for a good 2d game engine for mobile & browser, and almost decide a HTML5+JS w/ hybrid app is the way to go. Then we came across Defold, tried the editor for a couple days and checked out the tutorials and talks from Defold developers, it seems to me Defold might be the better route. But I am very curious about these features support as it might affect our decision if we should invest more time.

  1. Websocket, we would need to connect to our own server or 3rd party game server (like Photon), is it supported? or will be supported in the near future?

  2. Git, would it possible to point to our own Git repository? (we are using GitLab) It is quite important as we have some confidential info (from client), it will save us a lot troubles if we can store in 1 version control.

  3. resource loading, I understand that Lua cant control resource loading, however, can we prioritize and load game assets in packages (package doesn’t need right away can be load later)

Really appreciate your answers.

Hello @Rita_Liu and thank you for considering Defold for your next project!

  1. You can use the http module to do calls to a backend. This works on all platforms. We also have the LuaSockets library integrated in the engine, but I haven’t worked with sockets myself in an HTML build. It should work, but read the discussions in this thread and try it yourselves.
  2. It is currently not possible to host the project somewhere else. I don’t know the legal details of the Defold user agreement and what it says about the project hosting we are providing. You could symlink to another folder and use another Git repo for it. Or perhaps Git submodules can be used? When we release our new editor it will be possible to host projects somewhere else entirely.
  3. You can use collections to structure your applications into logic parts, splash, main menu, game etc and load/unload the different parts as needed. You can split things up more as well of course, and perhaps load/unload certain parts of your game as you need them (levels, popups, in-game menus etc). But you are to some extent correct, once you load a collection you hand off that work to the engine and can’t control how it’s done.

Check out http://www.defold.com/doc/collection-proxies for dynamic loading of collections.

1 Like

Thank you so much for your speed reply. When can we see this new editor? :smile:

2 Likes

Hi!

I’ve been lurking the forums and saw that @Rita_Liu would be needing Websockets. I started looking at Websockets but in the end I went with asynchronous communication for my game due to business model reasons.

My findings are that Luasocket library supports only http, tcp, udp (for communication) and ftp, smtp (file transfer, emails)… so no Websocket protocol.

There are few open source networking modules that Defold could probably implement and are needed (we can’t as these are at C level):

  • Websockets - websocket protocol version 13 support (so pretty good… not latest but compatible)
  • Luasec - SSL/TLS and HTTPS support
  • Bit operations - I’ve resorted for my hhtp communication to implement a HMAC-SHA1 algorithm for encrypting my stuff but due to the lack of bitwise operations, the algorithm uses tables for computing hashes (ouch performance). This is required for most crypto libs including Websockets.

Hope this helps someone.

Thanks.

2 Likes

I’ve managed to get WebSockets to work in Defold: Websocket problem

1 Like

wow, that is awesome. will give it a try :wink: