I have that idea that I struggle to work alone or in a small group here in the office. So I need some common Defold user wisdom and experience for it.
I think, we should have more templates than just this:
May be 2D mobile game template? Or HTML5 game template? Something else?
Each template would have the camera and the manifest setup for easier deployment, would feature some key assets/libraries as dependencies, would feature some key plugins.
Does this quick-start project templates idea make sense to you?
What assets, libraries and plugins shall be included in the empty project then?
Anything else that a Defold newbie would expect out of the box, that we donât provide currently?
I agree that many templates which lean toward certain kinds of game designs and platforms for distribution would be useful. As the general resources continue to build up, it will be easy and fast to put a few together as new templates.
https://github.com/subsoap/defsp is this kind of thing but DefSP specifically has a lot of loose parts in it that are not really done, and will be redone in near future with using the various public library modules to form a much neater package. DefSP when itâs ready will specifically be a template focused on 2D portrait mobile games with various screens pre-setup and most of the non-game logic setup so that you can download it and put your game on the game screen and have a playable game faster.
Considering that I canât tell if there should be a difference between 2D mobile game templates and HTML5 game templates, I can say that I would need them.
Defold is missing out of the box and has to be added through assets (Iâm taking inspiration from some editors):
A. Camera to solve the issue of mobile phones having different sizes/aspect ratios: fit height, fit width, fit both, or none.
B. Gui system with premades:
Button with transitions (normal, pressed, hover, disabled) and types (sprite, color tint, scaling animation or none)
Scrollbar with direction (vertical, horizontal), autohide if not scrolling (bool), auto hide time
I agree that camera and GUI are the two big things that Defold doesnât provide out of the box. I like to think that Rendercam solves the camera stuff. (It has fixed width, fixed, height, fixed area, and expand/contract options, and the usual screen-to-world helpers for detecting clicks on objects, etc. )The GUI stuff is more complicated, but DirtyLarry and Gooey seem pretty good.
I keep a branch of my empty template with extra stuff in it that I clone whenever I start a new project, but itâs just a random collection of things that I personally always use, not an actual game template, and Iâve been using Defold for almost a year (!), so not necessarily the stuff that beginners want.
It would have a GUI library and menus, but Iâm working on my own GUI library and itâs way more work than I expected . . .
I usually donât get as far as adding sound, but Sergeyâs OpenAL extension is basically a requirement for decent sound with Defold. (pause&resume-able sounds and pitch changing are must-haves.)
@ross.grams do you think you could share your setup on Community Pages the same way you did it with Empty Project Template?
So we can see how actual Defold users do/use these stuffed project templates, and also get feedback from more users. This way we have a better idea of how to make more built-in ones. @Axel and @britzl have this in the backlog.
Great stuff! As Oleg mentioned, me, @britzl and @sicher have been doing some stuff behind the scenes, on this oneâmainly preparing template projects, both regarding templates that has to do with game mechanics, and âactualâ templates.
The templates as they are now, can be found in BjĂśrns github repo, and my idea of how they could be accessed from Defold can be seen in the image below*.
After the global game jam I feel like resurrecting this thread.
I noticed that people often struggle to brute-force their way through Defold because of their previous experience. And it just falls apart making people frustrated with their experience. I noticed that when I point people to specific docs or sample projects, they still tend to use Defold based on experience/gut feeling. I guess it makes sense, but does not help to boot up with Defold faster
From where I am, the hardest thing to start with Defold is to convince oneself to start from a demo project and utilise features built by the devs/community.
Need a camera? Sure, thereâs Rendercam by @ross.grams. Need pathfinding? The A* is there already implemented by @Mathias_Westerdahl, see the example and use in the project. Timer? Sure, @britzl has you covered. Etc. etc.
After a few weeks with Defold it changes to the opposite: I see people get really surprised if their particular case is not on the Asset Portal (or popular githubs). Some take such cases as a challenge and ship their solutions to the Asset Portal. But initially this probably looksâŚunnatural that the engine is so lean, I guess?
Fellow jammers @naktinis@dmitrijus.babicius@jmalijonis (and everyone else really) may have an input here =] Would your first weeks with Defold have been better if we had offered more demo projects, sample templates or small tutorial videos?
Iâve only picked up Defold about a week ago, but weâve managed to build a working proof-of-concept game in the global game jam â with @dmitrijus.babicius and @Oleg_The_Evangelist . For me it was really helpful when @Oleg_The_Evangelist could immediatelly point to the relevant library/example.
I think the Community Assets should be promoted more (maybe mentioned more in tutorials, introductions etc., or maybe they were, but I missed it). Maybe some of your devs could also contribute to it more (as an example, add A* as a proper package, because now I had to copy/paste .lua files manually).
I think there are still some rough edges in Defold (most are known bugs) and downsides of using external packages. It really struck me how hard it was to detect if a game object was clicked. It took me at least an hour to hack my way through just to have something so basic and Iâm not really happy about how it turned out.
Itâs good that you have strong consistent design/architecture principles in Defold, but they shouldnât come at the expense of essential usability.
Really easy if you use rendercam. Use rendercam.screen_to_world_2d with a simple rect.
function M.point_within_rectangle_centroid(point_x, point_y, rectangle_x, rectangle_y, rectangle_width, rectangle_height)
local width_half = rectangle_width / 2
local height_half = rectangle_height / 2
if point_x >= (rectangle_x - width_half) and point_x <= (rectangle_x + width_half) then
if point_y >= (rectangle_y - height_half) and point_y <= (rectangle_y + height_half) then
return true
end
end
return false
end
In the end I did use the rendercamâs function (I wouldnât even know that rendercam exists if not for @Oleg_The_Evangelist help) , but if weâre talking about an object being clicked in a game, I would never call such a solution âreally easyâ. Maybe if message_id == hash("mouse_clicked") ... or a native built-in go.mouse_coordinates_within(mouse_x, mouse_y), but not an external library combined with a 10 line snippet.
Yeah, youâre right. Itâs because the render script is so flexible that a built in universal solution is not so easy to deliver. Iâd still say itâs easy once you are aware of the tools available, and I guarantee you would have been given a good answer on the forum about it! Rendercam is an absolute must in every project I make now.