EASY Random Map Generation - Python ASCII Tutorial

preview_player
Показать описание
Here's my simple idea of how anyone can create random maps for their ASCII games without complicated algorithms!

NOTE: I simplified the logic of tile objects by deprecating the "colored" parameter.
The "color" parameter can also be used for the same purpose. 👇👇👇

×oOo×-----------------------👽SOCIALS👽-----------------------×oOo×

(out of office at the moment)

×oOo×--------------------🙌🏼SUPPORTERS🙌🏼---------------------×oOo×

⭐ MisterDenko
⭐ Geekbean

×oOo×--------------------🕒TIMESTAMPS🕒---------------------×oOo×

00:00 - Project Overview
00:36 - Map Basics
03:35 - Tile Objects
05:28 - Patch Generation
07:05 - Randomizing Patches
08:02 - Final Result

×oOo×-------------------------💿MUSIC📀-------------------------×oOo×

From the Youtube Library.

×oOo×--------------------------✨TAGS✨--------------------------×oOo×

#pygame #python #gamedev
#indiedev #indiegame #indiegames
#indiegamedev #pixelart #gamedevelopment
#orkslayer #orkslayergamedev
#tutorial #particles #visuals
Рекомендации по теме
Комментарии
Автор

I used your tutorial to generate a world map in my RPG Maker game. Of course, it's in javascrip and not in python, but the logic remains the same. So instead of symbols, it's the map IDs I put in the arrays. So, for a big expanse of plains, I only needed one plain map. For a forest patch, I only need one forest map. And so on with other biomes. Once my project gets to that point, I will add a few more maps for variety in each biome, without needing hundreds or thousands of them.

I thank you immensely for this. I learned a lot.

After implementing the logic of this tutorial, there are two features I want to add: rivers and dungeons. For example, if there is a forest, I want to put a cave somewhere in the middle of it. And while we're at it, putting a settlement randomly on the outskirts of the forest would be nice. As for rivers, I want a certain logic to them, that they flow from mountains, outwards toward the edges of the map, which will be surrounded by the ocean.

Do you know an easy way to do it in an ASCII map generator like this?

claude-alexandretrudeau
Автор

Just falling in love with your channel. So inspiring. Thank you very much 🙏🏻

bandedecodeurs
Автор

You should declare annotations that don't have a value at class level scope (right under the class deceleration), as the structure is not spesific to that spesific instance, but rather every instance of the class

knut-olaihelgesen
Автор

Fun tutorial! Perfect for making little random maps for my pen and paper rpg!

HelicopterHoneymoon
Автор

Great video, nice explanation as usual 🙌🏻, a future video idea: implement the feature to set a minimum number of each type of tile, because during some execution it is visible that some tiles are too small and some are great in number.

GamingGuruImMortaL
Автор

Hey, I am loving these videos. Quick question! Why do you put " -> None" when defining things within a class?

noahvb
Автор

Thx man im trying to learn python and this is so good

feellikedying-xywo
Автор

This is great video i was able to put a health bar for the ascii game but making something move on the map is throwing me in loop i cant seem to figure out

superbautumn
Автор

Hey! Thanks for your informative, great videos!
I'm currently learning the Python basics on my iPhone with the app Pyto... maybe you know it. Do the color codes work there too, or is that only possible on a computer. Can I somehow add these functions to an iPhone?
Thank you very much! Keep it up, I'm looking forward to your game! Kind regards 👋🏽💪🏼

denisgokalp
Автор

Liked your video i do this on my games and i convert the ascii characters to png image to get also another graphic mod available. Would like to see a map editor.

Poulet
Автор

Hi Ork great vid and very educational and helpful, however i got a issue at the very end:
Traceback (most recent call last):
File "d:\Desktop\Python\main.py", line 4, in <module>
hero = Hero(name="Hero", health=100)
File "d:\Desktop\Python\character.py", line 24, in __init__
self.health_bar = HealthBar(self, color="blue")
TypeError: HealthBar() takes no arguments
Any ideas how or why this happened, any help would be appreciated, used Python 3.10.9, it worked until the hp bars were added and my code should be the same as the one in the vid, i compared it a couple of times and saw no significant differences.

Balance
Автор

I'm trying to make a static map, and between the last video and this one there is a step I am missing. How do I display the map I created in the last video using gamemap = [[Tile(plains), Tile(mountains)...etc]

I do not want the batches or procedural creation. I just want to see the map from the previous in this playlist.

ElGreco
Автор

I like the idea, however, my script doesn't generate a new patch when hitting Enter. It always repeats the same patch in the same position until I rerun the script. As the video, It is supposed to generate a new patch in a new position after hitting Enter!

gherban