Hello to everyone in defold land
I wanted to show you guys what is I’m working on right now, before that I should tell that I am a c# and .net developer but from a long time ago I was always interested to make games and I made two or three ones with unity some years ago. newly I looked for new game engines especially 2d focused ones and I found defold, I did look at Godot and it is support c# (kinda) but Lua and defold are just amazing, not to forget it has an amazing community. so I tried to put myself on a learning curve of learning Lua and defold with building my module extension and it was a challenge for me to get my mind of .net and visual studio land to Lua but the more I worked with Lua the more I loved it.
so this is my first try at building something from ground up with defold, DefGraph
extension.
In this extension, I have 3 modules, one for building graph, one for drawing debug info and one that takes care of moving inside the graph.
You can define a graph with several nodes and routes between them and the extension takes care of finding and moving your go inside this graph with just one call inside player update function.
the gif bellow shows you this exactly when the destination for all red circles is node number 6. (if you saw some interruption in moving circles it’s because of recording quality, not the actual performance)
As you can see staying on the routes is the number one rule for red circles and they are going to the destination with minimum distance. all you have seen in this gif except for red circles, drawn by defGraph debug module and all of them are customizable using global variables from colors to sizes.
defGraph is adaptable to map change so even if you add or remove routes in the middle of the game extension tries to find the better road for you.
So the reason I showed you guys this is, in the end, I wanted to open source this extension to community and before that, I want to do some cleaning up in source code and get your advice about improving performance and writing better code especially for modules, I’m thinking to combine these 3 modules, it seems passing data between them cause performance to drop a bit, or am I wrong completely and I haven’t played with defold profiler yet.
thank you all for your time and attention.
PS: sorry if this post is a bit cheesy, I’m still improving my English writing