1,165 karma · joined Apr 17, 2022 (4y ago) · 273 submissions
I'm creating Metropolis 1998, a 2D city builder/simulation video game.
https://store.steampowered.com/app/2287430/Metropolis_1998/
comment 4y ago · link · parent
The journey is important, you'll probably have a hard time making it in this industry and/or burn out if you aren't deriving joy from the day to day work.
For me, not releasing my game ASAP is not an option. I'm living off of my savings. That's why I prefer other full time devs because survival mode is very different than safe mode. (I feel 10 times more alive. Not sure how others feel).
Anyways, Im mostly responding to encourage you to create your own group because there seems to be a lot of people who are in the same boat as you. I have to say, meeting up with people every week who share the same drive/passion as I do is a great experience.
242.
Ask HN: Any solo game developers here?
173 points · by YesBox · 4y ago · 96 comments
243.
Show HN: Pathfind 1M agents to unique destinations in my video game
3 points · by YesBox · 4y ago · discuss
comment 4y ago · link · parent
That being said, if they have a modern machine, then there will be no need for this at all (just need to figure out the avg user CPU GHz & core count). It takes 10 seconds for my algo to find the all pairs/all possible shortest paths between two nodes on my machine for 10,000 nodes, which by that point is a HUGE city.
The reason I did not go with A* is because it doesn't scale to 100K+ units and it always chooses the same path.
comment 4y ago · link · parent
comment 4y ago · link · parent
I think with any quasi-infinite growth game, you are going to run into a problem of it slowing down, eventually. That's what inspired me to create this algorithm. I wanted a game that could scale, and traditionally path finding is a CPU intensive task.
The video I linked is out of date, I'll be making a new one soon.
Now: building the path finding graph is now stored in a vector (i.e. array) instead of an unordered_map (and still has constant time access/find). This cut CPU cycles by 66% since a vector doesnt use linked list/pointers/store a hash, and reduced RAM requirements by 75%. Then I parallelized that part of the code base.
So for my 6 core machine, I can find all the all-pairs, all-possible shortest paths in a 50 x 50 grid of roads in 10 seconds. This is about 13 square miles of city if each block is the size of a Manhattan block. I'll be working around this time by implementing a planning mode so it only updates as needed.
comment 4y ago · link · parent
Here's a tech demo of what I've been working on: https://www.youtube.com/watch?v=7q0l87hwmkI
I created a path finding algorithm that can simultaneously path hundreds of thousands of units to random destinations at a comfortable frame rate (or around 100-200K like in the video using one CPU core). Units can choose from any of the shortest paths between two points (there are many in a grid), and from those paths, can also choose the path that matches any preferences they have.
Very early stages of development still!
comment 4y ago · link · parent
Another area of my code where concurrency will greatly benefit it requires updating an unordered_map. Since it's positioned based and not unit_id based, I'll need to figure out a way to prevent data races. The best option I've thought of so far is assigning thread numbers to each edge in my graph, and storing the units in each edge in a queue, which should prevent data races and car collisions. (edit: ha)
That being said, I'm the sole developer on this project and I cannot imagine working on a multi-threaded application with dozens of other developers. It is nice dipping my toes in the water though.
comment 4y ago · link · parent
Here's a tech demo of what I've been working on: https://www.youtube.com/watch?v=7q0l87hwmkI
I created a path finding algorithm that can simultaneously path 300,000 units to random destinations at a comfortable frame rate. Units can choose from any of the shortest paths between two points (there are many in a grid), and from those paths, can also choose the path that matches any preferences they have.
Very early stages of development still!
comment 4y ago · link · parent
If this is something you are serious about then I'd recommend unlocking your enthusiasm and ideas. I'm not able to connect with you if you're secretive and indirect. If that makes sense then you're welcome to send me an email (see profile). My door is open to working with up to a small group of people, provided they can support themselves now and its a good fit.
comment 4y ago · link · parent
Here's a tech demo of what I've been working on: https://www.youtube.com/watch?v=7q0l87hwmkI
I created a path finding algorithm that can simultaneously path 300,000 units to random destinations at a comfortable frame rate. Units can choose from any of the shortest paths between two points (there are many in a grid), and from those paths, can also choose the path that matches any preferences they have.
Very early stages of development still!
comment 4y ago · link · parent
Then I figured out a way to store the results in a vector while still maintaining constant time access, which lowered the space needed to 2.5 GB. (This discovery came after the linked video, hence not being mentioned)
For reference, 10,000 nodes would be about 50 x 50 blocks (~4 nodes per intersection). Using Manhattan sized blocks, that's about 13 square miles of city, which is the same area as 3 x 3 Cities: Skylines tiles. Should be way more than enough!
Regarding the name, my first choice Metropoly was taken by existing companies (plural), and there's a domain squatter holding metropoly.com. Im not attached on the name yet so there's room to change it.
comment 4y ago · link · parent
Anyways, I'm working on Archapolis, a city builder game. The game will feature more hands on management than existing games in the genre, such as being able to design/build your own buildings. The player will see the interior of the buildings so making the exterior pretty wont need to be worried about. I'm also aiming to have a city board that will automate parts of the game for you if you choose (like having a fire marshall to handle fires)
I've got a tech demo of the path finding code up on youtube here, in case you're interested in path finding hundreds of thousands of units efficiently
comment 4y ago · link · parent
I'm creating Archapolis, a city builder game. Handling the micro economy is a far off goal. But one aspect of the game I want to implement on the macro scale is charging ~30% more for utilities and goods imported into the city.
So one of the goals of the player is help grow the businesses they want. This helps the budget in three ways:
- Collecting corporate tax
- Collecting sales tax
- Higher margins on goods
For anything that is imported, they city loses potential income by not being able to tax corporate and lower profit margins
I'm currently working on path finding right now, and I've got a tech demo here: https://www.youtube.com/watch?v=7q0l87hwmkI
comment 4y ago · link · parent
One way I have potentially solved this issue is by giving players the ability to design their own buildings in game. The player will see only the interior of the building, so I dont have to worry about making buildings look good (that's up to the player).
I dont have a video featuring this yet, but if you want to see what I've got so far, I've got a path finding tech demo here:
comment 4y ago · link · parent
I'm using C++, SFML (graphics framework), and SQLite (for data storage/saves). Game & engine is developed from the ground up.
A lot of people choose existing engines for their games. I definitely would if I were to go 3D.
With 2D grid based games, it's not too difficult to get an engine up and running. It took me around 6 weeks IIRC (no physics or networking code though) to have basic tile placement functionality and outputting the game world to the screen.
comment 4y ago · link · parent
As for steroids, here's a tech demo of what I've been working on: https://www.youtube.com/watch?v=7q0l87hwmkI
I created a path finding algorithm that can simultaneously path 300,000 units to random destinations at a comfortable frame rate. Units can choose from any of the shortest paths between two points (there are many in a grid), and from those paths, can also choose the path that matches any preferences they have.
comment 4y ago · link · parent
Game is still very early development, but here's a tech demo video
comment 4y ago · link · parent
I was bothered by this problem so I solved it for my own city builder game, Archapolis (still very early development):
https://www.youtube.com/watch?v=7q0l87hwmkI
I can path 200,000 to 300,000+ units simultaneously to random destinations, with a bonus of utilizing all shortest paths between two points.
The paths are all cached for constant time path finding, but I figured out how to do so efficiently (both building and storing tree/graph)
I wrote a non-technical article here:
https://www.yesboxstudios.com/2022/04/27/all-nck-shortest-pa...
267.
Show HN: New Pathfinding Algorithm
2 points · by YesBox · 4y ago · discuss