#Lethal Company in Minecraft

1 messages · Page 1 of 1 (latest)

wide wraith
#

https://www.youtube.com/watch?v=Ud5BGaJLPVI

I'm working on lethal company in minecraft, making use of @lucid wagon's voicecraft for proximity chat. currently it has a working facility generation, a few monsters, flashlights and shovels, and is functional enough that you can play full rounds like in the real game.

here is a video showcasing briefly the process of making some of the things here, and some gameplay at the end

I made Lethal Company in Minecraft Bedrock Edition, as close as I possibly could! In this video I cover the process of creating this map and showcase a little bit of gameplay.

This map features SineVector's (​⁠ @MineDevStudios ) VoiceCraft:
https://github.com/SineVector241/VoiceCraft-MCBE_Proximity_Chat

Big shoutout to these amazing ppl for ...

▶ Play video
inner burrow
#

Amazing

wanton needle
#

we lethaling our company with this one

wide fox
#

We looooove the company

#

the company

drifting fossil
#

Now this is a valuable asset

low glen
#

Lethal

#

Company

green slate
#

Lethal company when the company is not lethal.. Uh idk I haven't heard the music

distant tulip
wide wraith
#

its still a little buggy tho

#

which is annoying becoz some of the bugs is like i have no idea why it happens

lucid wagon
#

Instead of armor stands. Couldn't you track it in memory?

#

It'll probably be faster because less API calls

distant tulip
#

what are the bugs?

wide wraith
#

hold on i need to boot up the world to show

wide wraith
wide wraith
#

and occasionally i get this...

distant tulip
#

personally i keep track with a scoreboard because it’s easier for me and thats just how my generators work

wide wraith
distant tulip
#

that’s exactly what’s happening

wide wraith
#

but wait its not exactly just that

distant tulip
#

only place them if either another room cant generate in a location or if the number you use reaches the threshold where nothing else can generate

wide wraith
#

for march (the only moon wth more than 1 fire exit), every ~25% completion of the facility generation a fire exit will be spawned. it will choose an eligible armor stand in one of the rooms then save that location and delete the armour stand, then continue generation

wide wraith
#

so i need to check through everything again somehting must have gone wrong

distant tulip
#

its a little more random but you could have the fire exit have a low chance of spawning as well as a separate count specifically for exits

wide wraith
#

i was tryna avoid that becoz i wanted to minimise exits not spawning at all

distant tulip
#

and if the exit gets placed (as a structure) it doesn’t generate anything else behind it

#

how do the exits themselves work?

wide wraith
#

they are custom doors with block properties. each fire exit spawned has an associated fire exit number (0 - 3)

while a fire exit is spawned in, a world dynamic property is set with a map of each fire exit's data
fireExitsMap.set(key, { location, inFrontLocation, originalDir, inverseDir, fireExitNum });

so when u enter/exit it it will just teleport u accordingly. for exiting since fire exits are in premade locations its easier but for entering it will take the appropriate location and rotation from the world dynamic property based on the block's firexitnum

distant tulip
#

can you load it as a structure?

#

im asking because it might be possible to just completely stop generation if it happens

wide wraith
#

its fine i really dont want to remake this entire thing for the third time

lucid wagon
#

You're only rotating 90° right?

distant tulip
wide wraith
#

i dont think using structure load changes anything from how its placed currently

wide wraith
#

rooms can be in all 4 cardinal directions

distant tulip
lucid wagon
#

Because what you could do is generate the structure in memory which will be a massive efficiency boost, probably generation in milliseconds. Then you just place them through a runjob

wide wraith
distant tulip
#

i figured there was

#

because you mentioned it

lucid wagon
wide wraith
#

wait its like each room spawned has armour stands on its doorways

#

then in each cycle of generation it picks a random armour stand to continue generation

#

which is why when a fireexit is chosen its supposed to delete the armour stand

distant tulip
#

you could also have a deny tag on the armor stand

#

and check for the tag

wide wraith
#

just dleeting it should work

#

but i just realised my fire exit code is placed before the normal generation code without like an if blocking it

#

i just placed it in an if else im gonna test it now

lucid wagon
#

Ill probably come up with a generation system later once I get my graphics for bedrock replay working

wide wraith
#

to briefly explain in more detail than my video on how the generation works:

distant tulip
#

also i showcased a new dungeon generator if you wanna see

wide wraith
#
  • spawn main room.

  • from main room, the 3 doorways will place the structures of the initial rooms (sometimes it can close off one doorway, if not it will spawn either stairs or a hallway)

  • the volumes of these rooms includin the main room is saved into world dynamic property

  • then from this point on, we start generation cycles using system.runJob

  • each cycle does this:

first choose a random armour stand (every structure placed has armour stands on its doorways)

we get the room (armor stand) name, location and direction
we run an overlapping doorway check to see if this armour stand is inside a wall or is inside another armour stand. if it is, just close this doorway off

if its not, check if the current % is a multiple of 50% (for everything except march, 25% for march), which attempts to spawn a fire exit --> deletes the chosen armour stand and saves the locations and stuff for the fire exit to be placed later on

if its not gonna be placing a fire exit, we create a table that has the chances of every possible room spawning based on the selected room. (since some rooms can only spawn once, if they are spawned they are removed from the table so they wont spawn again)

based on this table we randomly select a room to be spawned, we check if the volume that this room would have created overlaps with any existing volume. if it doesnt, choose it and place the structure.

repeat

#

so technically it is doing stuff in memory its not placing the structures and removing them if it doesnt work

distant tulip
#

hmm

#

so it doesn’t generate in realtime

#

it might be a bit easier if it did

wide wraith
#

i THINK i fixed the rooms spawning behind fire exits

wide wraith
distant tulip
wide wraith
distant tulip
#

i don’t need to pre-place entities

#

and since functions run everything on one tick it can get pretty fast

wide wraith
#

are ur dungeon rooms all the same size

distant tulip
#

it might be possible to do it with scripts

distant tulip
wide wraith
#

then how do u prevent overlaps

distant tulip
#

my new generator uses a “track” system

#

the “tracks” generate first and tell where a structure can and cannot go, the main structures are loaded on top of these tracks

wide wraith
#

thats essentially what im doing

distant tulip
#

straights size has to be the same for all tho

wide wraith
#

but the tracking part is the part that takes a while becoz using BlockVolume.intersects() is kinda slow

distant tulip
wide wraith
#

straights?

distant tulip
wide wraith
#

only my tile sizes are consistent, like 1 tile = 9x9. but any tile >1 is 9 * tile size - 1 so the walls dont double up

distant tulip
#

i can implement a system like that as well but itll be a lot of checks

#

anyways

#

ur system bases the tunnel and room shapes off of doors, correct?

#

actually now that i think about it, its not that much different…

wide wraith
#

wdym by shapes

#

i have a whole tileSet of rooms, some is 1x1, some is 2x2, 3x2, etc.

distant tulip
#

is it a small corner corridor or a large elaborate hall etc

wide wraith
#

some rooms can only have other types of rooms spawn next to each other

#
"tileSets": [
    
            "2x1catwalk": 0,
            "2x1jump1": 0,
            "hallway": 25,
            "hallway_t": 5,
            "hallway_lt": 5,
            "hallway_rt": 5,
            "hallway_x": 5,
            "stair1": 0,
            "stair2": 0,
            "2x1storage": 0,
            "2x2bigroom": 0,
            "2x2server": 0,
            "2x2storage": 0,
            "3x2apparatus": 0,
            "3x3apparatus": 0,
            "backrooms": 0
]
#

these are all the tiles i have so far i think

distant tulip
#

whats with the 0s

wide wraith
#

i just copypasted the chance table

#

thats from the additional chances in the object

#

so from the base table it will add these numbers

#

so for exmaple in the stair room there is a higher chance of hallways spawning

distant tulip
#

interesting

#

i cant do anything like that without a bunch of craziness lol

wide wraith
#

alot of craziness happened

#

crazy?

distant tulip