azathot69
azathot69
A Land Of Goodbyes
102K posts
20-something idk // he/him/hole
Don't wanna be here? Send us removal request.
azathot69 · 8 hours ago
Text
Tumblr media
Hearken unto
245 notes · View notes
azathot69 · 8 hours ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media
6K notes · View notes
azathot69 · 8 hours ago
Text
Tumblr media
2 notes · View notes
azathot69 · 8 hours ago
Text
rip to all the “fuckyeah___” blogs that carried our society at one point </3
297K notes · View notes
azathot69 · 8 hours ago
Text
Tumblr media
Count sheep
123 notes · View notes
azathot69 · 12 hours ago
Text
Dungeon Generator Tutorial
Tumblr media
Introduction
This is a tutorial on how to make your own random dungeon generator. Since I’ve been working with procedural dungeon generation for my game Veldor a lot, I decided to make a tutorial. I will go over the basics of how to make it and also some more specific code sections for the Game Maker language in which you will also learn how to spawn objects inside your rooms.
How It Works
This section is about how it works in general. No code, nothing specific, just the basic idea. Let’s go! So what we need is some empty space and an object. The object is our generator that moves around in the space and places paths and rooms on its way.
Like this:
Tumblr media
What’s happening? 1. It decides randomly how long the next path (red) should be 2. Now a random direction gets chosen (left, right, up or down) 3. It moves the amount of pixels and places a path for every step 4. Pick a random room size (in this case I have either small or large) 5. Eventually place a room (white) 6. Go back to step 1 and repeat as often as you want
That way we still have some control over the dunegon, like its size, the room sizes, the path lengths etc.
Here some examples of how your dungeons could look like:
Tumblr media
The Code
The first thing we need is a 2D array (ds_grid for Game Maker language) and we fill it completely with a number like 0. Think of the 2D array like slots of an inventory, an empty chart or well, a room editor. First everything is empty, we only have our number 0 written into every single tile.
Now we need a for loop for how many rooms we want. And also chose a path length, just pick a random number between two values, like:
Tumblr media
Now that we have decided on a length, we only need a direction:
Tumblr media
Alright! Now lets move the object one pixel each step until the path length is reached. For every step we need to write a number into our 2D array, like ‘1′, so that we know later where there should be a path tile.
After that we can finally place the first room. This should be at the end of the for loop. So just fill a small region of the array with your number ‘1′.
Now that the first room is made, the for loop ends and therefore it starts again from the beginning. So again, a path length is chosen, a direction too, then the path is made, write numbers into your array etc. over and over until your loop reached its end.
That’s it? Kinda. You should now have an array filled with 0s and some 1s!
But I’m sure you also want walls. So, what we need for that is another for loop. Another loop that goes through the entire array and checks whether there is any floors around its current position. If so place a wall (aka a new number like ‘2′):
Tumblr media
(Note: This image is only for understanding)
So what we have now: 0s = nothingness 1s = floors 2s = walls
Yay! So now you only need to draw the whole thing because it’s still just a huge 2D array with numbers in it. What you could do is make another for loop, go through the whole array again and now check for the 1s and 2s, if true, place either a floor tile for the 1s or a wall tile + collision box for the 2s.
Game Maker
Now some things specifically for Game Maker.
First thing. Instead of a 2D array use a ds_grid and make it the same size as your room (divided by your tile size):
Tumblr media
And also filling your grid or a certain region (for rooms) is pretty easy by using ds_grid_set_region.
For the whole generator just make an object and move its x and y position.
Spawning Objects Inside Your Rooms
It works like this:
Tumblr media
Right in the last part of the for loop where your rooms are placed, you just need one line (instance_create) and maybe a condition before so not every room spawns an object. You can also move the object around a little by changing its x and y coordinates.
Tumblr media
You can also get my fully commented Dungeon Generator asset on the marketplace here, it includes everything you need for a dungeon game, like sprite alignment and lighting.
Any questions? Feel free to contact me: eMail: [email protected] Skype: wuptodev Twitter: @flobster
Thank you for reading!
680 notes · View notes
azathot69 · 20 hours ago
Text
Sad as fuck scenario
Tumblr media
19K notes · View notes
azathot69 · 1 day ago
Text
Tumblr media Tumblr media
19K notes · View notes
azathot69 · 1 day ago
Text
Help Bill choose what to do
Tumblr media
Original image:
Tumblr media
6K notes · View notes
azathot69 · 2 days ago
Video
tumblr
A: have I told you about these two bitches in this place that talk shit      about everybody? B: who? A: you and me.
75K notes · View notes
azathot69 · 2 days ago
Note
YER LEIGE DOST THOU MEAN TO TELL-ETH ME WE RESIDE UPON THINE TIDDIES RIGHT NOW?!
Tumblr media
5K notes · View notes
azathot69 · 2 days ago
Note
Not to me, I take away your lesbism
Tumblr media
23K notes · View notes
azathot69 · 2 days ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media
40K notes · View notes
azathot69 · 2 days ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media
46K notes · View notes
azathot69 · 2 days ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
25K notes · View notes
azathot69 · 2 days ago
Text
Tumblr media
56K notes · View notes
azathot69 · 2 days ago
Text
Tumblr media
The full thing for anyone who wants it!
Tumblr media
Tumblr media
Tumblr media
Tumblr media
Tumblr media
Tumblr media
51K notes · View notes