Programmer's "writer's block" and getting bogged down

Started by
7 comments, last by Dwarf King 10 years, 8 months ago

So I've started working on a game, essentially a tile-based RTS-type thing using Java and LWJGL, and I'm having a pretty big issue: I can't get anything done.

For starter's, I can't figure out where I wanna start. "Do I want to start with the display/graphics system?" "Maybe the logic?" "Or how about the input and event systems?" "Maybe I should go back to the drawing board and diagram everything out." "Diagramming takes too long, just a sketch." "Forget it, I'll just jump straight in."

Then there's the matter of how I want to do things. "I want to use MVC architecture." "I can't do that, that's not perfectly in line with MCV standards." "I've heard good things about component-entity system architecture, maybe I should try that." "Wait, how do I lay this all out?" "How do I wanna script this? I like Javascript, is Rhino any good?"

And then there's the infamous, "Okay, new idea, better scrap the whole thing and start again."

Basically, I'm finding my head being a clusterfunk of ideas and can't seem to find a good place to start without getting bogged down. Does anyone have any advice for dealing with this?

Advertisement

My proposal: start with the map drawing routine and main character(s) movement - think almost anybody starts with that. This is quite easy - the harder is going with that later stright with decent quality (It is my opinion)

I think many people do the first (displaying map and entities) then get stuck - but I have no general advice how to avoid that - It is a metter of defeating the obstacles (some of them are the kind of type - you would like to code something but it is just a lot of work - hard to avoid, how would you like to avoid that? )

it is somewhat like dragons fighting, i think : C

for me the order of doing things (sequacity - this i should do first, this i should do l8er ) alway seemd not to much important - but maybe Im wrong

So I've started working on a game, essentially a tile-based RTS-type thing using Java and LWJGL, and I'm having a pretty big issue: I can't get anything done.

For starter's, I can't figure out where I wanna start. "Do I want to start with the display/graphics system?" "Maybe the logic?" "Or how about the input and event systems?" "Maybe I should go back to the drawing board and diagram everything out." "Diagramming takes too long, just a sketch." "Forget it, I'll just jump straight in."

Then there's the matter of how I want to do things. "I want to use MVC architecture." "I can't do that, that's not perfectly in line with MCV standards." "I've heard good things about component-entity system architecture, maybe I should try that." "Wait, how do I lay this all out?" "How do I wanna script this? I like Javascript, is Rhino any good?"

And then there's the infamous, "Okay, new idea, better scrap the whole thing and start again."

Basically, I'm finding my head being a clusterfunk of ideas and can't seem to find a good place to start without getting bogged down. Does anyone have any advice for dealing with this?

It sounds like a typical case of analysis paralysis. The solution? Implement something simple and extend it later. So you're wondering whether to work on the graphics, logic (I'm assuming you mean game update logic), or input/event handling? I say, work on all of it. Build small pieces of each and keep iterating.

I think fir is right: start with your game loop and draw some basic things (the world plus a character in the world). Then implement a basic input handler to move the character. Start with basic keyboard input (arrow keys) and then extend it to use mouse input. Try to add something new every day you work on it, even if it's a small feature.

It is good to study design patterns, but don't start with the pattern--this is the wrong approach to building things. Instead, just start building the thing and make abstractions when it seems appropriate. Patterns will emerge over time with refactoring.

It's just like Lego; just keep building and don't worry about change. Be prepared to scrap large chunks of what you have built and replace it with something better/stronger/nicer looking.

Basically, I'm finding my head being a clusterfunk of ideas and can't seem to find a good place to start without getting bogged down. Does anyone have any advice for dealing with this?



Remind yourself to code fearlessly:
Create a new branch of your code to play with and simply start typing.
Don't try to come up with a perfect design first for all anticipated features.
You get the most valuable insights by actually trying to implement stuff!

I believe this is something most of us fall into at some point, especially maybe beginners who are just getting to the point where they can start going off on their own and creating their own projects.

This is something I did have trouble with for the longest time and it kept from from coding and being productive. My suggestion: Just code. Basically it is what thok said. Just code. Yes there will be times where you want to draw everything out maybe but honestly those times happen when you start seeing a need for it. Just start coding. When you start coding and implementing the simple things is where you will see the need for design patterns and when they will all of a sudden come naturally.

But yes, just code. There is no such thing as perfect code. What you build won't be perfect. What you start out with won't be perfect. What you finish with won't even be perfect. If you do this your code most of the time will actually end up becoming a lot better designed than you initially thought it would.

Experience has taught me two things:

One: Start simple. Although I never really had this as an issue because I try to be extremely realistic with the difficulty of a project, a lot of people do crazy things like try to make an MMO with no experience. An RTS is of course, more plausible, but if you find yourself feeling overwhelmed at the design of such a project maybe you should start on something simpler for inspiration.

Two: Design comes from practice. I've always had a major issue with overthinking design, I think these forums are partially to blame with that as well because everyone has their view of what "optimal design" is and they'll sit here and argue about it ad-nauseum when their design may not even be worth doing in your project.

Elaborating a bit more:

Contrary to what some people here like to push you don't have to make many games "perfect" and "optimal" and use seperated systems and event messaging systems and components and all that. It's a lot of work for no pay off. My advice is to pick a project and start coding, over time you'll start to see patterns of design that work in multiple projects.

If you're set on doing your RTS, do the basics. Set up a game loop, get a sprite drawing onscreen, then make it a unit or whatever comes next. Refine, don't overplan.

Biggest mistake a programmer can make and one that I seem to see a lot here: overplanning. Don't add a fancy resource management system just because you can when you're going to only add 5 things to it. Add things when you find that you NEED them.

This is a good read in this case as it is true: http://paulgraham.com/head.html it talks about what a program represents to programmers and in this case it means just start somewhere and see where you end up. Especially on the first game project, I started out by testing if a 8600 GT could handle a vertex buffer with about 0.5 Million verts in it which was just a simple quad.

Setup a source control somewhere even if it is just local but this will help you when you decide to change the entire codebase and it doesn't work out, revert is your friend :).

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

Expect Unpredictable Change

You will get the most done if you focus on making something work. You will get bogged down if you try to plan out all future code.

Don't try to write code as you imagine it existing in the final product. Instead make it work, with the understanding (and plan) that you will completely transform it several times, as the need arises, to make it work well in future contexts.

Sometimes people worry that this will lead to bad (unplanned) architecture. And, in fact it will, if your codebase is resistant to change. But if you get good at transforming and growing designs, you can, in fact, continuously improve your design as you go.

For professionals in this industry, this skill is hugely important, because we rarely (if ever) find ourselves developing a codebase from scratch.

Basically, I'm finding my head being a clusterfunk of ideas and can't seem to find a good place to start without getting bogged down. Does anyone have any advice for dealing with this?



Remind yourself to code fearlessly:
Create a new branch of your code to play with and simply start typing.
Don't try to come up with a perfect design first for all anticipated features.
You get the most valuable insights by actually trying to implement stuff!

This is how I have come into working. I make branches of my work and start work on a new branch so I always have something to fall back on(not github but damn close). Hence no fear of breaking anything :)

"The only thing that interferes with my learning is my education"

Albert Einstein

"It is a miracle that curiosity survives formal education"

Albert Einstein

This topic is closed to new replies.

Advertisement