r/learnprogramming • • 14d ago

How you plan and develop "complex" systems??

Well, I’m fed up with starting projects and leaving them unfinished, whenever things start to get complicated, I just give up.

Usually, when I work on a project, I don’t do any planning. I just start writing code until the pieces come together and make sense.

Just a moment ago, I was working on an inventory system for my game, but I started getting stuck on questions like "how will the inventory update when the server updates the player's inventory?" or "how will the inventory interact with the toolbar?". Things like this cause my brain to freeze up, and I end up giving up on the project, because implementing them at this stage would be a headache

Any tip is more than welcome.

23 Upvotes

27 comments sorted by

View all comments

1

u/Mango-Fuel 14d ago edited 14d ago

I design the data model as the core of the whole system. that is actually relatively "easy" most of the time. in real-world you may need interviews/meetings to assemble all the requirements and know what the model needs to look like. always keep in mind that it will change and grow later.

once that is captured, implement in code, and provide persistence. (ORM/EF Core makes this a lot easier.)

once that is implemented, start designing CRUD UI for it, and once CRUD is in place, start designing more advanced parts of the UI.

then release to users, get feedback, add new features, fix issues, etc.

I was working on an inventory system for my game, but I started getting stuck on questions like "how will the inventory update when the server updates the player's inventory?" or "how will the inventory interact with the toolbar?"

well you're bumping into the edge of your knowledge and experience, which is ok, that line is always there somewhere. if you keep your data and UI separate and your code otherwise decoupled, things like this will be easier to manage. it's not easy but you will get better at organizing things like this over time.

if this is game dev then business application design (what I mentioned above) may not apply quite the same. look up Entity/Component/System (ECS) for handing data management in game programming. (Including Data Driven Design. Also recommend following Casey Muratori.)