Godot 4.2.1.
hello, I’ve currently decided to dabble on a Doors/Pressure style game, but on Godot (because I hate Roblox’s wacky bux) so I’m currently wondering what’s the best way to go about replicating their room generation style. any pointers?
Godot 4.2.1.
hello, I’ve currently decided to dabble on a Doors/Pressure style game, but on Godot (because I hate Roblox’s wacky bux) so I’m currently wondering what’s the best way to go about replicating their room generation style. any pointers?
Make a bunch of scenes for Room bases, you could attach a script for random elements like loot. Give each Room a start and end point. When the player opens the next door, load a new room with it’s start point at the previous’ end point. If the start and end point is not recessed you shouldn’t have to worry about Rooms overlapping.
Very annoying to do something like this on Roblox, no natural prefab support so making all of your Rooms in ServerStorage isn’t fun.
ok so i was able to get the spawn randomly on when room clears…
func _generateroom():
#array of rooms to make
var rooms = {
0: preload("res://testroomtwo.tscn"),
1: preload("res://testroom.tscn")
}
#selects the room and adds it to the parent scene
var new_room = rooms[randi_range(0, 1)].instantiate()
parent.add_child(new_room)
# current issue: it doesn't genersate on the correct rotation or at its start position and it only works once lol
new_room.global_position = endpoint.position
For turns you will have to denote the rotation of the endpoint
. Since your start point seems to be the object’s origin (good) you should be able to use the endpoint’s global_rotation
too
new_room.rotation = endpoint.global_rotation
Of course when designing rooms make sure to rotate the endpoint’s Z to face out and away from the room. Using a Marker3D for the endpoint would be superb for this.
turns out when i reload the project all room scenes corrupt. here’s the errors that i get on launch.
That’s a shame, you could try fixing the test_room.tscn in a text editor, I do not know what you would be looking for though.
maybe a signal needs connecting once instantiated? I don’t know what code you have so far, sounds likea fairly specific issue.
i’ll make a forum post covering “the rooms getting corrupted” bit to see if i can get better asistance.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.