How much planning do game programmer before writing a single line of code and how do they plan it out

Started by
27 comments, last by Ravyne 10 years, 2 months ago


Doing something for the first time is always the hardest.
Hence no amount of planning can trully prepare the developer for a solution to the problem.

Planing/Design is a very subjective thing.
Sometimes just writing prototype code to see if a design works, can lead to understanding the problem better.
Rather than having talks with people of what could be and what not.

Correct. This is why almost all internships do diagrams and charts rather then pure coding. Conceptual understanding is critical, or you're just coding blindly. It's also an easy way to spot a very obvious bug that could be over looked in development. What saddens me is when people bash charts and diagrams, claiming it to be useless. For some, such things may be a hindrance. But here's my outlook on it: 1 great programmer can not program nearly as good as a 100 moderately good programmers working as a team. While it's critical to be confident, its crucial to identify when confidence is tainted by belligerence and ignorance. I would much rather work with the person that needs the flow chart and communicates well with me than someone who is too good for anyone else. So yes, communicating to the point of what is needed (typically in a chart or diagram) can be of a invaluable asset for leadership and direction, which means more man power to complete the larger task at hand.

Advertisement


Doing something for the first time is always the hardest.
Hence no amount of planning can trully prepare the developer for a solution to the problem.

Planing/Design is a very subjective thing.
Sometimes just writing prototype code to see if a design works, can lead to understanding the problem better.
Rather than having talks with people of what could be and what not.

Correct. This is why almost all internships do diagrams and charts rather then pure coding.

This is contrary to my experience. Certainly I was working on the codebase from the start in all of my own internships. Most other people I've talked to also worked on the code during their internships and only used diagrams as prototyping or documentation aids. Maybe this depends on the company, but every place I've worked has preferred that I use my skills to actually write code and accomplish things rather than play with diagrams all day.

1 great programmer can not program nearly as good as a 100 moderately good programmers working as a team.

I don't think those are really comparable and I'm not sure I see what you're getting at beyond the obvious (more people = more man-hours). Sometimes you neither have nor need 100 moderately good programmers to do something and happen to have a great programmer on hand; would you advocate dropping the great programmer and hiring 100 moderately good programmers? Plus, those 100 moderately good programmers could have trouble communicating with each other, leading to much lost productivity. There is such a thing as too many cooks in the kitchen and adding more people beyond a certain point does not automatically mean more actual work being done.

I would much rather work with the person that needs the flow chart and communicates well with me than someone who is too good for anyone else.

The bold text is what I think is the real issue. You want to work with someone who thinks like you. But do you really need the flow chart or diagram if the person can explain an architecture or algorithm to you without it? Is a programmer who can explain how the code works without a diagram really "too good for anyone else?" After all, ultimately a flow chart or diagram is just a tool we use to communicate with each other. There are other ways of communicating ideas.


There is something called the Technical Design Specification. It is a book, created by the designers and in part, the developers of the SDLC. It encompasses just about every diagram you can think of:

I cannot seem to find the book with that title.

I didn't read the entire thread, so its maybe been said or alluded to in so many words, but here's the way I think about and approach planning:

In general, planning stages shouldn't think about code at all -- Never have I sat down to bang out a new project with even a single preconceived line of code at the ready.

Planning isn't about capturing the code -- code is just an expression of the responsibilities, relationships, rules, and requirements of the project at hand, and therefore your planning should attempt to capture those four Rs and to explore them until you are satisfied that you have a reasonable idea of how to put them together in a way that achieves your intent. Sorting those out identifies the data structures and algorithms that are necessary for expressing that intent, and the code itself follows from there.

Aside from that, one of the difficulties neophyte developers seem to have is an unwillingness to throw away design or code when its outlived its usefulness. Throwing away such things isn't a sign of failure, just of an evolving solution to a potentially-evolving problem. The code must evolve to keep up, and sometimes in the course of evolution nature and programmers alike reach a dead-end. When that happens, the old solutions fall by the wayside and newer, better, stronger ones take their place. Its as natural as it is effective.

Don't be afraid to simply explore programming challenges in isolation -- no one ever said all the code you ever write had to find its way into a product. Ruthlessly prototype, iterate, and throw code away until you understand those challenges before trying to fit them all together.

No detailed plan survives contact with the real world. You can only plan for the level of detail you can reasonably anticipate.

throw table_exception("(? ???)? ? ???");

Against most of wat was said above (probably, for what I can gather since I didn't read it all), none at all.

In my experience, in order to do things right, you must first do them wrong, at least one time.

The first thing a GAME programmer should do (this most likely does not apply to other more structured programming tasks) is to make a working prototype.

On one hand the designers need to have a working prototype to test their ideas as soon as possible, they may not want it, they may not ask for it, they may even refuse to use it after you made it, but you should do it just the same.

Why? because before you can design anything thoroughly, you must understand its deepest inner workings, and you can't just sit and think for hours until you got it all in your head, make drawings and write and re-write designs until its just perfect. You are gonna forget something. And even if you do get a clear design that looks good on paper, you still don't have any empirical evidence to support your theories and most likely at some point someone is going to want you to change it, maybe even yourself.

So make prototypes, the best way to understand everything involved in the inner workings of a system is to implement said system.

Once you got it working, make note of its flaws, its dependancies, profile it, and then go to the design process with all that knowledge that no amount of thinking can magically conjure up.

If you are asked to implement an input reading system and you have done so before, design might come easy to you, but then they tell you "it has to work on touch screens", and you never done that before, go do it, understand its needs before trying to apply your known designs to it, once its working you'll know if it fits your designs or you need to adapt them and how. If you've implemented Character control many times before, but you are asked to do so in Unity, which you never used, go make it work first.

Go for quick and dirty and just get it working, you'll have something to show for and you'll be able to make better estimations when asked to.

I've banged my head against the wall trying to come up with designs that foresee any need of a system many times before, I've always understood it much better after making it work.

Game making is godlike

LinkedIn profile: http://ar.linkedin.com/pub/andres-ricardo-chamarra/2a/28a/272


I'll tell you what my experience over the years has been. When I was very green, I didn't do much planning at all. I just sat down and started writing code. If the problem was geometrical in nature (as is often the case in 3D games), then I maybe had some diagrams that I drew, but those were really only for the geometry of the problem, and nothing to do with the final code design. My code designs were awful, by the way. I remember one class that took 12,000 lines of code because it did everything. Obviously, this concept of coding by the seat of my pants wasn't working.

So, I switched philosophies. I decided that I was going to plan everything beforehand, with class diagrams and whatnot. My new motto was, "A receptionist who doesn't know C++ ought to be able to implement this from my documentation alone." I felt that I shouldn't write a line of code unless I can prove that it works on paper. Yeah, that didn't work out too well for me, either. It's like trying to see 100 moves ahead in chess.

Here's the thing. A new programmer doesn't have the ability to take a complex problem, break it down in their head, and then immediately sit down and start coding -- nor do they have the ability to sit down and plan the whole thing out with UML-like diagrams. I can't speak for everybody, but I had to go through this rigmarole of trying solutions, realizing they were crappy, and doing it differently next time. For me, there was no way to short-cut that process.

These days, I can do a much better job reasoning about complex problems in my head, and having a good intuition about what form the solution should take. I'm also better at planning complex problems on paper. So, I used to suck at both. As I gained experience, I got better at both. Go figure.

I always write a little something beforehand. Doesn't have to be much. At the very least, it helps to write down a set of goals and requirements so that I don't go off-track. And, of course, I'm working on a team, so it's often the case that I need to communicate my ideas to others, and that usually entails writing some documentation. Other than that, I tend use notes and diagrams as a sort of secondary storage -- it's difficult for me to keep zillions of details in my head, so if I think of something that I don't want to lose, I write it down. That about sums up the balance I've found for myself.

My typical planning process is:

- Get assigned a task.
- Think about it a bit. Doesn't seem that bad...
- Suddenly realize how terrifying the task actually is.
- Panic for a while.
- Discuss concerns with teammates (this is the actual planning phase where we systematically address the scary bits).
- Overcome my terror and begin writing my plan *as* code.
- Iterate on the "plan" until it becomes the final implementation.


Before a single code is worked on, the Technical Design Specification should be completed.

Honestly: Does it really work that way in your company?

In my 17 years as software developer this never happened.

Problem 1: You cannot write a meaningful spec without prototyping and testing, and this includes: Coding.

Problem 2: If you write a full spec, the relevant people will not read or understand it. And in the end, when you show your final product, these people will state that they wanted something completely different.


Before a single code is worked on, the Technical Design Specification should be completed.

Honestly: Does it really work that way in your company?

In my 17 years as software developer this never happened.

Problem 1: You cannot write a meaningful spec without prototyping and testing, and this includes: Coding.

Problem 2: If you write a full spec, the relevant people will not read or understand it. And in the end, when you show your final product, these people will state that they wanted something completely different.

Depends on the form that the technical specification takes -- A good technical specification lays out responsibilities, relationships, rules, requirements -- maybe some general 'recipes' -- but shouldn't attempt to layout code, or even interfaces. If you keep things at that level, then it shouldn't be that difficult to have it drafted and generally agreed upon before writing code. That said, it usually also becomes clear that certain aspects of the design are fairly well understood and 'stable', and so there's no reason you can't get a start on those areas while the more novel design aspects are firming up.

As those things firm up, I would hope that someone is doing some exploratory prototyping of those systems to get a better handle on them, but that's throw-away code in isolation from the application proper.

throw table_exception("(? ???)? ? ???");

This topic is closed to new replies.

Advertisement