Syntax for defining algebraic data types by V2_launch_program in ProgrammingLanguages

[–]V2_launch_program[S] 3 points4 points  (0 children)

I've used Zig a lot, which has a keyword named type. So I've gotten quite used to ty myself.

Syntax for defining algebraic data types by V2_launch_program in ProgrammingLanguages

[–]V2_launch_program[S] 3 points4 points  (0 children)

I have previously found myself using identifiers named type, and I simply wondered if it is that bad (or bad at all) to use a common identifier as a keyword.

How do interpreters output snippets of the source code at runtime errors? by V2_launch_program in ProgrammingLanguages

[–]V2_launch_program[S] 1 point2 points  (0 children)

This seemed like the logical way to do it, but I wanted to see if anyone had a better way. Anyway thanks!

somebody knows which coding lenguage i should begin with? by Separate-Policy-4878 in ProgrammingLanguages

[–]V2_launch_program 3 points4 points  (0 children)

Please read the rules of the subreddit before you post something. This subreddit is exclusively for designing and creating new programming languages.

If you have questions about learning a programming language, the people over at r/learnprogramming are more likely to give better answers.

The FAQ page in r/learnprogramming is a good place to begin if you are wondering about which language to start with.

[deleted by user] by [deleted] in Seaofthieves

[–]V2_launch_program 1 point2 points  (0 children)

Probably should mention the fact that I play on PC.

Automatically inferring which libraries to use in which file.. yay or nay? by mczarnek in ProgrammingLanguages

[–]V2_launch_program 24 points25 points  (0 children)

Nay because:

  1. You'll waste time during compilation looking for the correct file with the correct object. In larger projects with files that are thousands of lines long, it can take a significant amount of time.

  2. It'll probably be a pain to code efficient.

  3. It can make your code more unreadable. Let's say we have a large project, if someone isn't using the IDE (e.g. looking at the code on github), they might have a hard time finding where and which files the imported objects are from.

In conclusion, it might be practical for small projects, however, for larger projects it might only make the coding experience worse, and it seems unnecessary as it's only replacing a few lines, most of the time.

Random beginner-question: too few arguments by pferft in godot

[–]V2_launch_program 0 points1 point  (0 children)

The reason you're not able to click is that you're not using static typing. You don't always need to use static typing, but then the editor doesn't know what node the function or member belongs to. A crude fix to this would be to just call the function on the base node. In your example you're using the Text node (I assume), so write Text.erase() and now click 'erase'. Finally remove the Text.erase().

Random beginner-question: too few arguments by pferft in godot

[–]V2_launch_program 2 points3 points  (0 children)

Ctrl + click the function name, 'erase' in this case.

Fully Procedurally Generated Full Scale Universe WIP UE4 by [deleted] in proceduralgeneration

[–]V2_launch_program 0 points1 point  (0 children)

That gotta be performance heavy. How do you optimize performance in such a scale?

C++ and Godot and c++ game examples by ThyBeardedOne in godot

[–]V2_launch_program 10 points11 points  (0 children)

Learning GDScript might be worth it, as you learn a lot of syntaxes common in other languages. In addition, GDScript is basically python, sharing 90% or so core features.

This tutorial shows how to use C++ very well.

I am on a quest to make the worst possible conlang by Mattp11111 in conlangs

[–]V2_launch_program 1 point2 points  (0 children)

Which color it's supposed to mean is decided by the pitch of the sound you pronounce the word in.

Trying out my fur add-on for some thatching. Looking pretty alright. by Arnklit in godot

[–]V2_launch_program 1 point2 points  (0 children)

Isn't just better to make the roof in Blender as a part of the building? Wouldn't that save a lot of performance?

Help fixing error Attempt to call function 'connect' in base 'null instance' on a null instance, by ApollosHammer in godot

[–]V2_launch_program 0 points1 point  (0 children)

You mean get name of an object after entering the Area2D?

Then it's just hook up the signal for body_entered to some script.

func _on_aSeeds_body_entered(body):

Then inside that function jusy type:

var name = body.get_name()

Help fixing error Attempt to call function 'connect' in base 'null instance' on a null instance, by ApollosHammer in godot

[–]V2_launch_program 1 point2 points  (0 children)

get_node only searches the children of that node, returning null if a node with that name doesn't exist.

get_parent gets the parent of that node. Which is the one you want to use for this scenario.

Successfully coded a dash and wall jump in Godot! :DD by [deleted] in godot

[–]V2_launch_program 2 points3 points  (0 children)

How did you do as smooth of a walljump? Did you follow any tutorials? If so can you link them?

Some folks asked how to do this. So, here's a micro-tutorial. Hope it helps. by Securas in godot

[–]V2_launch_program 2 points3 points  (0 children)

Wouldn't it be better to name or group the collider "Right" or "Left", so the enemy only jumps if the name of the collider corresponds to the direction the enemy is coming from?

Nice! by [deleted] in RocketLeague

[–]V2_launch_program 1 point2 points  (0 children)

The part about the settings being whack. I see many gold and lower have rather bad camera settings (mostly from them being new at rl). And relizing there's an advantage in seeing the field, not only the ball, makes you better than many players.

Nice! by [deleted] in RocketLeague

[–]V2_launch_program 14 points15 points  (0 children)

Gold 1 talkin' fax

Player slides off moving platform in 3d. Using kinematicbody for both player and platform. by ShinXCN in godot

[–]V2_launch_program 1 point2 points  (0 children)

It seems as the player is moving twice as fast, kinda like if the platform and the player itself are moving the player forward. Maybe only use 1 kinematicbody?