epw

  • Feb 27, 2024
  • Joined Jun 22, 2023
  • 0 best answers
  • From what I understand, while the engine itself is compiled, your GDScript is interpreted. The page that you found, packrat, seems to be about rebuilding the engine, which isn't normally part of the export process for an individual game.

    This is one of the reasons why Godot supports custom modules in C++, because this allows compiled sections which can be faster.

    I'm sure that Godot will be a lot larger than a game written wholly "from scratch", using just low-level libraries and compiled down to the specific machine. But, it's worth thinking about whether that matters in context.

    It vaguely looks to me like Godot adds about 20 MB in HTML5 or Android exports, at least. That's a lot compared to game in The Old Days, but for me it's a reasonable tradeoff for all the ease it provides. 20 MB for cross-platform audio alone is probably worth it, and this also gets you inputs, fullscreen options, and so on.

    There's a lot of stuff about speed, optimizations, and benchmarking, but I tend to subscribe to "premature optimization is the root of all evil." Unless you have already made multiple games and know that you're going to need to do things that require every bit of the computer's native speed, you'll probably be better off starting with GDScript, optimizing if it starts to get slow, and finally moving specific logic to C++ if you find it's really causing you problems.

    In summary - GDScript is interpreted and this does add "bloat", but computers are big and fast now, so don't assume this will definitely be a huge problem.

    Of course, if you specifically want to program in constrained environments, there are also communities for things like games on the Raspberry Pi, Arduino, or the virtual PICO-8 console, which can give more of the older experience of having to track all your memory and count your bytes.

    I hope this is helpful!

  • award Oh it goes deeper than that, because Godot also runs on Android.

    There are, of course, some caveats:

    The Android editor is currently in an experimental stage. The UI has not been adapted for touch screens yet; using a hardware keyboard and mouse is strongly recommended.

    Compared to using the editor on desktop platforms, the experience may be suboptimal, especially if you do not use a hardware keyboard and mouse. See the list of known issues affecting the Android editor for more information.

    I may poke at it for fun, but I really don't expect that my poor little phone will be able to run it, let alone be easy to work with. Beyond that, it might actually be bad too have too many functions there, calling me. Better to know all I can do is think about the node structure and name them things to remind me of what I want to do, than to have all the power of the Inspector at my fingertips, encouraging me to fiddle endlessly.

  • Hello!

    I find myself able to daydream about games I want to make more often than I can actually sit down and work on them at a computer with Godot installed, sadly.

    I was thinking that it could be really useful if there were an app (or a nice mobile-friendly web page) for planning scenes: something where you can make a tree of nodes, naming them as you go like the left pane in the editor. I could simulate something kind of like it with just Google Docs, but a dedicated app could have all the standard node names pre-loaded and things. Maybe it could even have an "export" command that would make a .tscn file which could be loaded into Godot directly.

    Does anyone know of something like this that exists already? I wasn't able to find anything with obvious names, but my searches have often failed to bring up Godot community efforts. If not, I may add it to my pile of potential projects...

  • Thanks, both!

    Sosasees: Interesting! I hadn't looked for any of those in particular. It also makes sense that people often wouldn't want to use them in order to learn instead, I completely get that logic.

    synthnostate: Thanks for the warning, though I'm not sure it's quite like you say. It looks like the majority of items in the asset library (about 1600/1900) are MIT-licensed, which is pretty close to Apache 2. I will say admittedly that there are only about 15 that are Apache 2 licensed, but I'd be surprised if that's actually due to material differences between them.

    An interesting side note is that many IP lawyers claim that individuals literally cannot put things into the public domain, and saying "This is in the public domain" is legally meaningless (see "The Problem" on Creative Common's CC0 page.) This is irrelevant to most people, but companies, even small ones, seem to frequently care about it. I also note about 100 projects labeled CC0 in the Asset Library, and it looks like most are non-code.

    Finally, I am thankfully allowed to contribute to most open-source projects that have any of the standard licenses, though I do like to check with the owners first.

    This is all a longwinded way to say, I'll give it a shot! And if people like it but not the license, they are always free to be inspired to make their own versions, I won't be upset.

  • Hello!

    I'm a longtime programmer and hobbyist game developer. For years I've been building up games "from scratch," but recently I found Godot and I've really enjoyed the tools it gives.

    One thing I've noticed is a lot of my games start with some similar logic. Even if I later customize it, it's likely that, for example, in a 2D game I might want an Area2D that can be moved with the arrow keys, or one that I can click and drag around. And I usually add an "Escape to quit" function pretty early on for my root scene, and later expand it to pop up a little context menu with a quit option.

    The thing is, I get tired of writing the same thing over and over, even when it's simple. After all, that's why I'm using Godot and not writing the games from scratch like I used to. But, I also usually don't like to take a large system like Top-Down Action RPG Template and get it into the form I want. I'd rather build up from small, reusable pieces.

    So, I think I'm going to try out writing some nodes that package the logic I find myself reimplementing. They'd be useful for prototyping, not so much in a final game where you'd surely want more customized and specific logic.

    I haven't been able to find evidence of anyone having done this before, but I'd be very interested if there are any I'm missing! I'd much rather use someone else's.

    If I do write these myself, I'm curious if anyone would be interested? I know to some extent the best thing to do is make some and upload them to the Asset Library and see how they do, but I'll be more motivated if I hear there's interest ahead of time.

    Just to give something concrete, here's a trivial example. I'll also note that my employer demands that any code I share like this be copyrighted to them and licensed with Apache 2, so if any of that will be a problem for you, please be aware!

    Example: Quit Node

    Name: QuitNode.tscn
    Usage: Add an instance to the "main" scene, such as the one started by F5, or that you call get_tree().change_scene() on.

    QuitNode.gd:

    # Copyright 2022 Google LLC.
    # SPDX-License-Identifier: Apache-2.0
    extends Node2D
    
    func _input(event):
      if event.is_action_pressed("ui_cancel"):
        get_tree().quit()

    (Again, this is very simple, and many cases would likely need to do some unusual things, like directly adjust get_parent().position in order to work, but again, the idea is to make tools that help with the initial prototyping, and so they should be easy to add and easy to replace later.)

    Thanks for reading!

    • synthnostate replied to this.
    • this sounds great.
      i will make the reusable pieces that i need for myself, because of the learning effect.
      but having them pre-made will be useful for a lot of people.

      this is such a great concept that it's already been done.
      for example there are many game jam templates, each one is a combined game architecture template and menu system, for making the actual game instead of worrying about the game architecture and menus.
      and my favorite Godot add-on (as of June 2023) is my responsive UI plugin, it just adds a few nodes that

      • are especially tedious to recreate from scratch every time
      • should work (almost) the exact same way in every project
      • i need for creating responsive UI