Defold good choice for a Drawing Game?

I want to build a drawing game like Draw Something and I would need to draw on the screen. Is defold a good choice or does its structure hinder that in any way?(Like being build on the premise the the screen is redrawn every frame or something)

Thanks

I would say itā€™s depending on how you want to do stuff.
Itā€™s definitely possible to create such a thing drawing lines and curves directly to a render target (I guess using some custom shaders) but if you are looking for an engine with commands like ā€œline_to(x,y)ā€ and similar which can be found in eg actionscript you wont find them here. In short: Nothing in Defold is hindering you to create such an app but there are no inbuilt vector drawing functionality to help you quickly try it out.

1 Like

@Andreas_Jirenius I know that doing a message post ā€˜draw_lineā€™ is documented to be a debugging type of feature. How would one achieve it in defold as a best practice.

What would be the equivalent in defold in drawing GL lines, line strips, etc.

Assuming that you want to have changeable size of the brush (which directly removes the use of the debug drawfunction).
First method that pops into mind would be probably to check for all points where cursor is at the moment.
Create a rotated box between the current point and the last one and then add a circleshape at the end of the boxes (to smoothen angles).

Then render this to a target (that isnā€™t cleared every update).
I believe I would do all this in the gui scene as tinting and scaling somewhat is more intuitive there and it seems like the scope wonā€™t cover a lot of things needed in the gameobject scene.

2 Likes

@Andreas_Jirenius Thank you. That is somewhat the similar way I would approach it in cocos2dx. Can you elaborate how to in defold: render to target, what it means ā€˜in the gui sceneā€™ and where in souce code should it draw?

I seems that Defold is not the perfect choice for such a game. Did some of the recent update change anything?