this post was submitted on 07 Mar 2025
11 points (100.0% liked)

Game Development

3855 readers
54 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

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?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 2 points 2 days ago (1 children)

I think it's a good learning experience, but a language isn't built over night...

[โ€“] cli345 2 points 2 days ago (1 children)

Yes, that's why I hope others will be able to join me. In the meantime, you can try FuncSug in the Playground. ๐Ÿ™‚

[โ€“] [email protected] 2 points 1 day ago (1 children)

I have written GUI from scratch at least 2 times (rendering open gl and up) so I'll skip this time, I do wish you all luck though!

[โ€“] cli345 2 points 1 day ago

Thank you for your kind wish! ๐Ÿ™‚