recently I made a little program that generates a country with a bit of info, like the country name, size and most importantly cities.
It generates a random number of cities and towns and villages based on the country's size, this is all text based so that is why I would give it a nice flare with some graphics.
Now, I have been researching a bit and it seems that my best option would be Perlin noise or some form of noise, so my question is, how would I go about doing this? Where do I start? Are there other ways of accomplishing this?
So, in short, how do I take the randomly generated text cities and towns and villages in my program and randomly generate them on some form of map? I hope this all makes sense. Also, my program is written in python.
There is lots of problem in what you saying. What platform are you using? Arcade? PyGame? etc. I will write the arcade code for you so you can use. To use arcade, type pip install arcade in Windows, or pip3 install arcade on Linux.
Edit:
Please can you post your code so I can implement?
Related
So, I am making a roguelike game using Python as my language. I am using NumPy and tcod currently for libraries, and I have been trying to figure out how I can take the procedurally generated map "cells," and append them to indexes within a NumPy array.
Context: I have followed the 2020 tcod tutorial found on the roguelikedev subreddit to get to the point I am at now (Here is a link to the source on GitHub. I have made only trivial changes to colors and such so far). I've coded simple stuff in Java before but never messed with Python much, nor have I ever tried something like this. In short, I feel a little lost.
Basically, I want to change the way the maps are generated. Currently, an area the size of the terminal is preocedurally generated, and when the player moves down some stairs, a new map is generated, and the old one is basically thrown away. The idea being that it's a dungeon. I don't want this. My goal is to have it be an open map, where the player can go North, South, East, or West.
This would require the engine to save the map (I assume to a list or an array or something), and keep updating it whenever the player moves to a new cell on the grid.
Now I'm not asking anyone to write the code for me, but I just can't seem to really wrap my head around how to go about actually doing this.
So far, my problem is I don't know exactly how to put the gamemaps onto a list. Should I make them entries within a dictionary? Use a list? Is what I'm trying to do even possible?
Figured I'd give this site a shot. Any help is appreciated.
I'm working on a project to breakdown 3D models but I'm quite lost. I hope you can help me.
I'm getting a 3D model from Autodesk BIM and the format could be native or generic CAD formats (.stp, .igs, .x_t, .stl). Then, I need to "measure" somehow the maximum dimensions to model a raw material body, it will always have the shape of a huge panel. Once I get both bodies, I will get the difference to extract the solids I need to analyze; and, on each of these bodies, I need to extract the faces, and then the lines or curves of each face.
This sounds something really easy to do on a CAD software, but the idea is to automate this process. I was looking into openSCAD, but seems that works only to model geometry and it doesn't handle well imported solids. I'm leaving a picture with the idea of what I need to do in the link below.
So, Any idea how can I do this? which langue and library can help in this project?
I can see this automation possible with a few in between steps:
OpenSCAD can handle differences well, so your "Extract Bodies" seems plausible
1.5 Before going further, you'll have to explain how you "filtered out" the cylinder. Will you do this manually? If you don't, you will have it considered for analysis and have a lot of faces as a result.
I don't think openSCAD provides you a vertex array. However, it can save to .STL, which is kinda easy to parse with the programming language of your choice, you'll have to study .stl file structure a bit (this sounds much more frightening than it is - if you open an stl with an editor you will probably immediately realize what's happening).
Since you've parsed the file, you can now calculate lines with high school math.
This is not an easy, GUI way to do what you ask, but if you have a few skills you'll have your automation, and depending on the amount of your projects it may be worth it.
I have been working in this project, and foundt the library "trimesh" is better to solve this concern. Give it a shot, and save some time.
So I have been interested in a project to help my dad with his business, or at least for my own whimsy. Basically, the job involves going to different fields spread throughout the county, and a lot of how we do it now is inefficient and leapfroggy. So I would try to create a system that will find an optimized path. I'm not asking someone to build any of this for me, I just need to know the right direction to look, for gathering information on how to do this. So we have a map of our county and or county, and luckily because we live in Nebraska all county's are just big grids. And we have a bunch of different fields we need to get too, for this task, there are 2 to 3 different teams who each drive there own truck( so 1 to 2 trucks). And in some cases, there is certain fields truck A has to check. So I just would like some help researching this, I would prefer to write this all in python. I know about pathfinding algorithms, but that's about it. So really here are my questions: How do I make, or use a roadmap in python? How can I institute a pathfinding algorithm to that map? How can I make 2 of those algorithms making there own path of the same length, ignoring certain fields? Any help is appreciated. Here is a low-quality picture of our field map https://drive.google.com/file/d/1L5GNoUrtzTxJvfKoS04wGO8EgkK8Ulue/view?usp=sharing
Ive started learning Python and decided to give myself a golf related project to work on. My question revolves around choosing the best data type to use. Now i know th3nanswer to this is based on requirements but tht isnt helping me.
Besides simple data like name, date, name of course, etc., ill alao be generating 9 and 18 hole scores for multiple players in my locl society.
While keeping a historical record of past scores is nice i may want to perform some analytics across my dataset to find handicaps, hardest holes, etc. And, yes, i know there are apps out there aldeady im doing this to learn. ;)
So....which data structur should i use to work with? Lists, dictionaries, numpy arrats, objects, or a combination?
Many thanks!
I want to object extraction from Images. for example i want to count of human in a picture or find similar picture in great data base(like google example) or finding field of picture (Nature of Office or Home) and etc.
did you know any python library or module for do this work.
If you can link me
tutrial or instruction to this work
similar example project
Perhaps using simplecv?
Here is a video of a presenter at pycon who runs through a quick tutorial of how to use simplecv. About half-way through, at 9:50, she demonstrates how to detect faces in an image, which you might be able to use for your project.
Try this out: https://github.com/CMU-Perceptual-Computing-Lab/openpose
I used it to detect multiple persons and extract the skeleton joints. It's also a little sensitive, so post-processing needs to be done to remove outliers caused due to reflections on the floor, glass walls, etc.