this post was submitted on 08 Mar 2025
15 points (100.0% liked)

Godot

6351 readers
53 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

[email protected]

Credits

founded 2 years ago
MODERATORS
 

Hello, ๐Ÿ™‚

I created a new language called FuncSug. Its purpose is to make GUI programming in the browser easier and so game programming. The facility consists on eliminating asynchronism: In FuncSug, the code is no longer managed by an implicit/explicit global loop (I don't speak about implementation).

I intend, if I have time, to implement it for Godot as well. In FuncSug, the first tutorial of Godot would be roughly coded as this:

func showMessage(p_message):
	parallel exitWith branch 2 ||
		showIn(p_message, $MessageLabel)
	||
		waitSeconds(2)

parallel ||
	while true:
		# Start of game
		parallel exitWith branch 2 ||
			showMessage('Dodge the\nCreeps')
		||
			waitSeconds(1)
			awaitPressed($StartButton)
		get_tree().call_group(&"mobs", &"queue_free")
		score := 0
		$Player.start($StartPosition.position)
		
		# Middle of game
		parallel exitWith branch 1 ||
			awaitSignal('hit')
		||
			while true:
				playSoundFile('House In a Forest Loop.ogg')
		||
			showMessage('Get Ready')
			parallel ||
				while true:
					waitSeconds(1)
					score += 1
			||
				while true:
					waitSeconds(0.5)
					callgd spawnMob()
		
		# End of game
		parallel ||
			showMessage('Game Over')
		||
			playSoundFile('gameover.wav')
||
	while true:
		await score
		$ScoreLabel.text := score

The 'player.gd' and 'mob.gd' files would be keeped as they are. The "_on_MobTimer_timeout" function would be renamed as "spawnMob" and moved to 'mob.gd'. The timers wouldn't be needed any more.

Can you tell me what you think about it?

cross-posted from: https://programming.dev/post/26509534

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here