151
14
152
8
submitted 6 months ago by dulvui@lemmy.world to c/godot@programming.dev

If you enjoyed playing the old Football Manager games I have great news, this game is very similar, just for Futsal (5 a side indoor soccer) and Open Source.

The game is AGPLv3 licensed and available already on desktop and Android on several platforms (F-Droid will come soon too).

If you have questions or suggestions just let me know :-)

153
95
submitted 6 months ago by cm0002@lemy.lol to c/godot@programming.dev
154
9

There is a distinct lack of random functions for vectors, so I decided to add some to the Mouse Potato Utils Plugin.

However, I'm not sure whether I should make the right end of the range inclusive (make it a maximum) or exclusive (like the range() function) when it comes to integer vectors.

I'll make it inclusive for now, but what do you think?

155
21

Hello, everyone! In this video, I will create a simple shader for generating an animated star using a noise texture. And as usual, we will have plenty of parameters available to customize this effect to suit the needs of our game.

156
15

I've never used global lightmap baking, but it worked really well with the baked material and light emission textures.

157
12

I made some ship pieces as a test in blender. I won't end up using these for anything. They were important for figuring out the next iteration. These are whole pieces, when instead I should break the floor, ceiling, and walls into separate pieces. Does anyone else have any tips for that approach?

158
25
submitted 6 months ago by cm0002@lemdro.id to c/godot@programming.dev
159
33
submitted 6 months ago by Fizz to c/godot@programming.dev

I have a characterbody2d and I want to display the equipment being worn. So this equipment would need to be swapped around during game play.

I currently am using several sprites layered. How is best to handle this situation?

160
27

Hello, everyone! Let’s create a simple effect that resembles a waterfall with several layers of animated water. Something like this can be useful in many 2D games, and it won’t be too computationally demanding.

161
21
162
20
163
25
164
31

Hi everyone! Let’s program a simple effect that simulates looking at a scene through ribbed glass, also known as fluted glass. It’s a straightforward algorithm based on a combination of a few basic principles.

165
56
166
37
167
37

Hello, everyone! Let’s program this interesting effect, which allows us to successfully simulate the view through a glass window during heavy rain. The shader we create this way will have many parameters and customization options, so it can be used in a wide range of situations.

168
138
submitted 7 months ago* (last edited 7 months ago) by unit327@lemmy.zip to c/godot@programming.dev

Pretty happy with what we were able to make! The game has a "flatscreen" mode too so you don't need a VR headset to play it.

https://copper-tunic.itch.io/chrono-crank

169
44

godot-rust goes into the next round with v0.5, just released on crates.io!

On the toolchain side:

  • We now support Rust edition 2024 and Godot 4.6 out of the box, as well as all versions >= 4.2.

  • WebAssembly support no longer needs LLVM/bindgen and is being unit-tested on CI.

  • It's now possible to depend on other godot-rust crates through rlib.

Some features added in this cycle:

Typed dictionary. Also, enums in Godot collections!

let tiles: Dictionary<Vector2i, Tile> = dict! {
   Vector2i::new(1, 2) => Tile::GRASS,
   Vector2i::new(1, 3) => Tile::WATER,
};

Non-null engine APIs:

// Instead of...
let t: Gd<Tween> = node.create_tween().unwrap();
// ...now:
let t: Gd<Tween> = node.create_tween();

Direct == &str comparison, saving allocation:

let s = StringName::from("hello");
if s == "hello" { ... }

Bitfield Debug impl:

assert_eq!(
    format!("{flags:?}"),
    "PropertyUsageFlags { EDITOR | READ_ONLY }"
);

Optional parameters -- call from GDScript as method(1) or method(1, 2):

#[func]
fn method(
    required: i32,
    #[opt(default = 100)] optional: i32,
) { ... }

Export tool button -- click in Godot's inspector to immediately execute Rust code:

#[export_tool_button(fn = Self::on_clicked, icon = "2DNodes")]
click_me: PhantomVar<Callable>, // not a physical property

We now also have a Games page showcasing projects that users made with godot-rust! And I'm still behind on adding new entries there :)

Huge thanks to the community for making this possible! Countless bug reports, PRs, and feedback based on real-world projects have helped godot-rust immensely to reach this point.

If you like the project, consider giving us a star on GitHub. As it's maintained entirely in free time without any financial backing, small GitHub Sponsor contributions are also very appreciated (Yarwin or TitanNano or Bromeon). Thanks to everyone supporting the project -- We are excited to see what will be built on v0.5!

170
34
submitted 7 months ago by cm0002@europe.pub to c/godot@programming.dev
171
23
172
32

I'm building a 2d platformer in Godot, and it's my first time with the engine.

I've followed the First 2D Game tutorial as well as a few others (Brackey's videos and some others) and have a decent grasp on building out a level as well as decent physics for how I want my player character to control.

So far, everything was made underneath one main Scene called "Game" and I'm at the step where I want to start having a Main Menu, a Level Select Menu, and logic on starting/completing a level rather than just one big "Game" Scene with a bunch of stuff I slapped together to test out the platforming.

I'd love some input on how I should be structuring my project and changing scenes around. I've found examples in tutorials but they all differ on some details and I'm not sure what is best. I've built a simple Main Menu and Level Select Menu and am able to go in and start the "Game" scene from it.

This is a big ask, I admit :).


  1. I've created a new main Scene titled "Main". It's jsut a plain Node with this script so far:
class_name Main extends Node


var main_menu_scene: PackedScene = preload("res://scenes/main_menu.tscn")

func _ready() -> void:
	add_child(main_menu_scene.instantiate())

func exit() -> void:
	get_tree().quit()

I've done this partly to follow an example that I found, but also due to how I want the background to work. In some Valve games, the Main Menu background is based upon the level you're at in the campaign. I want that. If you start the game up the first time, I want the background to be the 1st level background. If you're on world 10, I want it to remember and show that background. When the level launches, the background can stay the same as it was on the Main Menu.

I don't have backgrounds started in at all, yet.

  1. My Main Menu scene is a PanelContainer. Above, Main loads the MainMenu scene and adds it as a child. This works but I don't know if it's the best way. Script:
class_name MainMenu extends PanelContainer

@onready var main_scene: Main = get_parent()
var level_select_menu_scene: PackedScene = load("res://scenes/level_select_menu.tscn")
var options_menu_scene: PackedScene = load("res://scenes/options_menu.tscn")

func _on_play_button_pressed() -> void:
	main_scene.remove_child(self)
	main_scene.add_child(level_select_menu_scene.instantiate())

func _on_options_button_pressed() -> void:
	main_scene.remove_child(self)
	main_scene.add_child(options_menu_scene.instantiate())

func _on_exit_button_pressed() -> void:
	main_scene.exit()

This lets you exit (works by calling the Main scene function) go to Options, and go to the Level Select scene as well.

  1. Next is the Level Select Menu. It's similar to the MainMenu. Script:
class_name LevelSelectMenu extends PanelContainer


@onready var main_scene: Main = get_parent()
var main_menu_scene: PackedScene = load("res://scenes/main_menu.tscn")

func _on_back_button_pressed() -> void:
	main_scene.remove_child(self)
	main_scene.add_child(main_menu_scene.instantiate())

func _on_level_1_button_pressed() -> void:
	main_scene.remove_child(self)
	main_scene.add_child(load("res://scenes/game.tscn").instantiate())

func _on_level_2_button_pressed() -> void:
	# main_scene.remove_child(self)
	pass

Here you can go back (works) to the MainMenu, or move forward and start the "Game" scene I mentioned above. I intend to build a few levels and stick them in here in a similar fashion, replacing game.tscn. That will get me to the pre-pre-pre-alpha stage of my game and I hope to get feedback on how the platforming "feels" from there.

My thought is that the Main scene would handle the backgrounds, and always be the main parent Node in the Scene Tree. The Menus and Levels get swapped out as the child node of Main.


Questions:

Does this look ok to any of you Godot veterans?

Any code smells?

All of my scenes are in a /scenes directory. All of my scripts are in a /scripts directory. No sub-directories in either. This is quickly getting messy and I'd also love tips on folder structure.

173
10

Hi, everyone! It’s time to create something small in 2D again, and since simulating old devices can be very useful in games, we’ll take a look at a shader that mimics the behavior of a low-quality analog screen.

174
50

After a lot of tech torture, I finally got selectable provinces working in my map game! The way it works is the script checks the position of a mouse click on the collision mesh of the map against an image of the province map (which is dynamic and can be updated at runtime), which will select the corresponding province associated with that colour. This information is also passed to a shader which highlights the province on the map.

I spent way too long messing around with raycasting before I realised that Godot's _on_input_event signal does all the heavy lifting for you...

175
19
view more: ‹ prev next ›

Godot

8004 readers
12 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 3 years ago
MODERATORS