Better HN
topnewbestaskshowjobs
Log inSign up

YesBox

1,165 karma · joined Apr 17, 2022 (4y ago) · 273 submissions

chase _^_ yesboxstudios _v_ com

I'm creating Metropolis 1998, a 2D city builder/simulation video game.

https://store.steampowered.com/app/2287430/Metropolis_1998/

Submissions

comment 4y ago · link · parent

Seems like a lot of people like your approach, so I'll clarify. I am focused on releasing my game because I want to continue working for myself and having the opportunity to choose/direct my creativity every single day.

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

Interesting, I assumed the roads were not going to change frequently (but rather, in bursts). So I used that premises to develop my algo. To enforce this behavior (on a code level), I will be adding a "planning" mode, where roads can be placed freely/frequently. Once the user sends the plan off to be constructed, then the graph will update. I may go one step further and have construction (i.e. graph updating) only happen at night, and give the user something else to do while its updating.

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

Quick update, I've released a video showing off my algorithm to the extreme (path finding 1,000,000 units), as well as other development progress.

https://www.youtube.com/watch?v=x0HCnQqF5K4

comment 4y ago · link · parent

Currently I can close edges (i.e. an individual road between two intersections), but right now I would have to rebuild the path finding graph each time the graph changes. I was thinking of this problem too, cause it would be really cool to temporarily close a road down for repairs/construction. I think there is a way to make it work without needing to rebuild! Just havent had time to look into it.

comment 4y ago · link · parent

Right now the units are moving in tile-sized increments. I'll be implementing floating point movement soon. I move the map around while the units are moving and you'll see its not at 4 FPS.

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

Im working on a game in the same vein: Archapolis, a city builder with real time traffic simulation and interior views of your citizens homes (which you can customize/build yourself if you want), so you can watch them live their lives. I'd like the player to have a more hands on approach to managing the city as well.

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

Neat! Thanks, I will look into this

comment 4y ago · link · parent

I recently wrote some multi-threaded code (for the first time) for a game I'm working on. Luckily the data I need to process is in a (C++) vector, so I was able to break the data up by dividing the vector size by available cores. I certainly felt 10 ft. tall when it worked!

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

You might be interested in my game. I'm working on Archapolis, a city builder with real time traffic simulation and interior views of your citizens homes (which you can customize/build yourself if you want), so you can watch them live their lives. I'd like the player to have a more hands on approach to managing the city as well.

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

I pinged your gmail. I misread your OP and thought your were tinkering with existing games, not building your own model. Very very cool!

comment 4y ago · link · parent

It's a solved problem. Off road travel off screen will use timed-teleporting, on screen I will use A*. I dont need to worry about real time path finding inside homes (no traffic, no combat, etc) if the unit isnt visible.

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

Thanks! I appreciate it. The player connecting to the world they build is vital IMO.

I'll be using old.reddit.com/r/Archapolis if you want to know when the first release is out.

comment 4y ago · link · parent

Awesome, thanks! I may release a prealpha version for free or very very cheap in the coming months.

Feedback is really important to me. I'm aiming for a Venn diagram that captures what I want and what the users want.

comment 4y ago · link · parent

Thanks! For now I'm using old.reddit.com/r/archapolis

www.yesboxstudios.com for blogging about development if you prefer long form

comment 4y ago · link · parent

You might be interested in what I'm setting to out build. I'm working on Archapolis, a city builder with real time traffic simulation and interior views of peoples homes (which you can customize/build yourself if you want). While the game wont scale up to the country scale, I do want the player to have a more hands on approach to managing the city. Im thinking it would be cool if the player could hire their own board if they wanted to, otherwise they would have to manually manage that aspect of the game (e.g. no fire marshal could mean manually sending out fire trucks to fires, scheduling building inspections, etc).

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

I've figured out how to make the path finding scale well-enough. Before I was using a hash table but that ate up 12.5 GB of space for 10,000 nodes. I looked around for better hash libraries and managed to lowered the RAM needed to 10 GB.

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

That would be quite an impressive game. Each simulation would need to be automateable in case the player does not want to manage that particular aspect of the game. Otherwise the game will fall into the trap of "trying to please everyone pleases no one".

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

https://www.youtube.com/watch?v=7q0l87hwmkI

comment 4y ago · link · parent

This is such a fascinating challenge I want to tackle!

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

I'm working on Archapolis, a city builder game. I have been considering the feature you are desiring. The problem to solve is giving the player something to do while the buildings are being constructed.

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:

https://www.youtube.com/watch?v=7q0l87hwmkI

comment 4y ago · link · parent

2x Thanks!

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

You might be interested in what I'm setting to out build. I'm working on Archapolis, a city builder with real time traffic simulation and interior views of peoples homes (which you can customize/build yourself if you want). Very early stages of development still.

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

I'm working on Archapolis, a cross between sim city and the sims (and inspired by Dwarf Fortress, Cities Skylines). I'm working on real time traffic / pathfinding currently. My game can handle 100K to 300K agents path finding simultaneously to random destinations.

Game is still very early development, but here's a tech demo video

https://www.youtube.com/watch?v=7q0l87hwmkI

comment 4y ago · link · parent

I still play this game today. I managed to carry along an older version of RCT Deluxe (before it was patched up to defeat all the cheats) for all these years, with the cheat program "beast trainer" (or "cg_beast").

comment 4y ago · link · parent

Err, have you played the game? I cant get past 100,000 without the game beginning to slow down. I have a decent computer too.

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

comment 4y ago · link · parent

A 30+ FPS Perfect Dark would be amazing. The RAM extension pack wasn't enough for that game. The AI was pretty good IIRC (although definitely went in loops). Had lots of fun playing 1 vs 11 medium difficulty. I miss throwing N-bomb grenades.

comment 4y ago · link · parent

How would one learn about this depth of C and its optimizations? I'm interested in it as an art form, something to do in my spare time.
1
678910