Binding of Isaac/rogue like map #2 [Game Maker Studio 2 | Epic]
This epic video tutorial shows you a working example how to create a procedual level map generation on the fly in GameMaker.
This video is explaining how the code works. Since scope and complexity are quite big you won't see any typing part, only explaining the process and how to get to the end result.
How it works:
The idea is in principle quite easy. You have at start a cell of your map that has 4 branches in each direction. These branches are being created by checking first if the new neigbour cell is free. Then it needs to assing a sprite to which has two exits/openings (one openeing connecting to the current location and one 2 steps ahead). To determin if this sprite can be set for the new cell you need to check another step ahead if on the openening (so two steps ahead) if this spot is also free. If not this cell is an endpoint of this branch.
Link to the free project (CC3by 1up Indie):
https://www.patreon.com/posts/69191258
👑 Support me and get fresh game art and game maker projects every month:
https://www.patreon.com/1upindie
Follow me on:
📸 Instangram: https://www.instagram.com/1upindie
🐦 Twitter: https://twitter.com/1upIndie
💬 Discord: https://discord.gg/gvr98nb
📜 Udemy: https://www.udemy.com/course/become-a-video-game-developer-with-gms-23/ (See youtube about page for discount)
CHAPTERS
-------------------------------------------------------------------------------------------------------
0:00 Show off the procedual map
1:18 Subscribe
1:32 Quick preview of steps
3:50 Create empty cells and draw then on the sceen, limit to a total amount
5:58 Start cell draw, position in camera center position
6:56 Loop alarm for updating and make the magic in user event
7:10. Limit total cells/alarm refeshes, limit arm length
7:42. Create arm arrayd and place start cell, setup an index for each arm to be used in user event
9:00 Grab current arm x,y positon with the index
9:42 Decrease current arm length
9:54 Check if neighbour cells are free, have empty sprite + check if in bounds
12:52 Check current sprites exits/openings
14:34 Combine both plus make fake choise for end result where to go, repeat but break when a good one is set
16:02 Check what sprite we can use, 3 standard choises
18:10 Fail save 1, none of the 3 standards applied, set endpoint
18:43 Fail save 2, reached current arm max length, set endpoint
18:55 Fail save 3, reached last one of total cells, set endpoint
20:55 Apply correct sprite
21:22 Update current arm x or y position
22:12 Quick Preview of steps again
Other Videos By 1up Indie
Other Statistics
The Binding of Isaac Statistics For 1up Indie
1up Indie currently has 5,021 views spread across 2 videos for The Binding of Isaac. His channel published less than an hour of The Binding of Isaac content, making up less than 0.50% of the total overall content on 1up Indie's YouTube channel.