Just wondering how you choose to code when you begin a project. Do you plan out the different systems/classes with a rough design before going into the project, make a flow chart, or detail what each system is going to do or need to do. Or do you just dive into it and start slapping away at getting things going?

After I get a somewhat clear picture of what the game is supposed to look and work like, I can start working. If you can't get a good image of what you need, you can start incrementally working on what you know, and the rest should fit in place!

Plan for 5 days per week. Code for 2 days per week. When you get to the point where the only part left is to type away, then code as often and as long as you want. If it's a full time job, then you have to work on an hour-to-hour or day-to-day basis instead of week-to-week basis. It all depends on the project and whether your schedule allows/requires you stay at a desk most of the time.

If "dive in" means something like "I want to make game, so lets start coding", hell, no.For example, trying to add multiplayer features without planning from the very beginning will greatfully fail.I constantly do class and module sketches with paper and pencil, write down requirements and features. No uml tools and the like for that, they all suck.The more experienced you are, the more will automatically happen on your mind by recalling proved patterns, techniques and methodologies.Do not try to be a fortune teller by planning to the smallest detail. Finding a good balance is the true art.

Do not try to be a fortune teller by planning to the smallest detail. Finding a good balance is the true art.

Haha, yah. My previous projects have all been modifications and had required planning really (or I just didn't choose to plan them on paper). More or less 1 system being worked on at a time, and a matter of just implementing and testing it, then rewriting it if it wasn't that good. I've learned a lot from that, but started realizing I should probably plan things out as I move into writing a whole game from scratch.

So far, I only have a few things written down on how game Entities and Worlds are going to be handled and what is the absolute necessary information they need to hold. My biggest issue is learning the rendering, I understand the concepts but it can be a bit difficult translating the math knowledge back down into code when there are so many varied examples on the net (especially with the large differences between GL11 and GL30)

[off topic] I'm just waiting for Cas to come in and say; "Jump right in, finish it as quickly as you can, and apply what you learned on your next game." or something along those lines. [/off topic]

When I am starting a new project I will get all the, as ra4king puts it, boiler plate stuff done first; like getting a window going with game loop, basic entity system, and game states. After that I dive right in, and plan as I go. Usually I can get all the puzzle together without a hitch.

Plan and prototype game desing but don't waste your time to plan code that well. It's allways end up totally different than original plan anyway. When you see full picture you can redesign and refactor code lot faster. Most of the game code is throw away stuff anyway so why bother with it longer than needed.Experience will make the code better not planning.

Plan and prototype game desing but don't waste your time to plan code that well. It's allways end up totally different than original plan anyway. When you see full picture you can redesign and refactor code lot faster. Most of the game code is throw away stuff anyway so why bother with it longer than needed.Experience will make the code better not planning.

Just dive in, planning has never worked for me personally. I can spend a week planning and a few hours into coding and the plan is already broken, huge waste of time.

As far as code re-usability goes, it only comes from experience. As you write more games, your ability to write neat and re-usable code increases, reuse a bit from first game, reuse a bit more from second game, and a bit more from third game and so on and by the time you know it, you've created a sort of "framework" or "engine" that has a ton of reusable code.

Once you get to that stage, you may even wish to spend some time optimizing your framework or engine, and make it more usable as a whole package for future projects.

I'd say think about it, plan a little and then go iteratively from there. You need a guideline that you can follow or else you'll "dive in" all over the place. But I wouldn't even try to lay down a complete design plan right from the get go because that is no good for the creative process; you need the freedom and liberty to just change your mind overnight and not have to go back to the drawing board each and every time you do that.

Does anyone else see the planning part and the typing part of programming as very different things? I tend to plan out even tiny details before starting to type, but that's mostly because I plan while I find myself waiting for people or things. A couple minutes at a time add up and it seems like I don't have to scrap and rewrite code as often. It's the opposite of the advice programmers normally get, but it seems to save time in the long run. I sometimes even disregard the advice to ignore performance considerations until later for the same reason (though I never underestimate brute force algorithms or focus on non-critical performance issues), though that's even more discouraged.

Though once I start coding (which includes typing, reading about APIs, and sometimes solving equations) I do use iterative testing/prototyping like most people.

I just got a whiteboard for my 'office' and I don't know what I ever did without it! My next game is all drawn out in diagrams and trees... helps me stay focused and on task, scope creep has always been an issue with me!

Something like this: I carry around a notepad and draw lots and lots and lots of sketches/design/screens & gaming notes. Then when I get near my PC, I open up IntelliJ stare at whatever I was doing last time... immediately lose interest.... and then look at pr0n.

I think it depends on what you want to achieve. If you are doing this because you want to sell a game, plan it, you have to, otherwise you will end up with feature creep at the very least. If you are trying to learn something, just dive in.

I'm doing java games for fun (which to me means learning stuff) so I just dive in to the bit that I want to learn.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org