Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: How to build and keep at larger projects  (Read 2462 times)

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
How to build and keep at larger projects
« on: July 12, 2014, 03:45:33 pm »

Hello, I am a programmer and have around 5 years of experience programming as a hobby. Everything I have made up to this point has a maximum of about 5 source files in my language of choice, C. I think that I have gotten the degree of practice necessary to develop something a bit bigger but I am not sure how I can reliably design and implement something complex like a full roguelike or something internet based.

What it would be nice to know is how I can go about designing and managing these larger projects and hopefully getting something more complex out of it than what I have done up to this point. The second part of the question is how should I go about keeping momentum on projects? It seems that after around a week of programming most days I run out of steam and the project comes to a halt and is never worked on again. This is depressing so It would be nice to get some pointers from people that have worked on larger scale projects on how to keep going.


Thanks for answering in advance.
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click

JoeJoe

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #1 on: July 13, 2014, 01:21:35 pm »

First of all, you should look into learning a language that offers more abstraction than C, especially if you want to make a larger project. It will just make so many things easier and you'll be that much more productive.

Then, if until now your largest projects have had 5 source files, don't expect to create something incredible on your first try. Try to think of a fun project and start programming it. If you have no idea where to start, take your project and make it a bit smaller, trimming down to some simple, essential parts until you have an idea of what you need. Your first projects will be a mess, and that's ok. You'll learn what works well and what doesn't. It would probably be helpful to look at design patterns or other people's source code at some point.

When you have a large project, identify what more or less independent parts exist, how they interact and what subparts they consist of. That way you know what structures your program needs and you can implement everything piece by piece. Object-oriented programming is extremely helpful for this.
Logged

HideousBeing

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #2 on: July 13, 2014, 03:41:09 pm »

Agreed. C is nice because it's much much smaller than a language like C++, but object orientedness (or other paradigms) are extremely helpful. Not necessary of course if you just want to get something interesting done. If you don't use version control, look into git... there are tons of advantages.

Keep everything in manageable pieces that you can keep adding to over time. Plenty of stuff may turn out to be useful later even if the project is abandoned. And if it's coded nicely it isn't too bad to come back to it a year or two later. I suppose the idea is small goals... build things bit by bit and if possible, try to make something functional as soon as possible. Depending on the project you may also get other people to use it which would likely add a lot of motivation. If you still want to use C this means use a LOT of functions and data structures and try to keep them smaller and more specialized in scope.

Apologies, I don't know your coding ability, so I don't know how relevant the next section is.

So to begin a roguelike you probably would want to start with getting a grid of tiles rendering somehow; SDL 2.0 is probably a good pick to help with that in C. Make sure to keep it seperate from the game logic. I would likely have a function that can simply draw graphics to a surface. Then have code that can load a subset of an image so you can use one big png for all the tiles and just reference the locations (then you can use a DF tileset). Then a function that takes a pointer to an array that describes what tiles should be displayed and uses the previous functions to create some sort of surface / image out of it and is your map. Then I can start adding logic that creates the tile-array from the map... updates it and so on. Then I realized that I want a minimap! Well I can take that earlier function that creates my current tile-grid and give it something related to the overworld and scale it down. Then I personally hate my roguelike and abandon it (fortunately it's saved in git, so I can certainly go back later), but I have a method of rendering tiles so I take that code and begin to make a platformer with a tile-based map...

This is somewhat how professional programmers work and for good reason; code that can be modified easily or reused is really really nice. I like procedural graphics as a hobby, but I don't expect to make a whole world in a week. Instead I can code up one tiny piece at a time. There's stuff from years ago that I can still pull into projects which is great.
Logged

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
Re: How to build and keep at larger projects
« Reply #3 on: July 13, 2014, 05:53:40 pm »

Actually about a year ago I made a very small demo of a roguelike with PDCurses and while to be honest the code is far from complex and the code is meh at best but it does handle drawing a map and other basic things in a game even if it isn't particually efficient and isn't actually a game. Evidently I do use a form of Git.

You can see the code here


I think I will begin looking at C++ as I have nearly 2 months with almost nothing to do.
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click

HideousBeing

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #4 on: July 14, 2014, 09:37:20 am »

Looks like you do pretty well in the language you know. Learning C++ will help maintain a large project, but it won't help as much to keep up with one. Why not go back to your favorite game-jam projects and build on them a little more?
Logged

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
Re: How to build and keep at larger projects
« Reply #5 on: July 15, 2014, 10:10:07 am »

I think I will try that, and tbh I wasn't planning on revisiting it in it's current form. It isn't the most code I have for a project by a country mile although I think it is the most graphically intense thing I have written of note thus far.
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click

HideousBeing

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #6 on: July 16, 2014, 01:27:53 am »

I think I will try that, and tbh I wasn't planning on revisiting it in it's current form. It isn't the most code I have for a project by a country mile although I think it is the most graphically intense thing I have written of note thus far.

Graphically intense isn't really necessary around here :p. I just dig graphics programming and gpus. I'd love to see what kind of ideas you can come up with no matter what the style.
Logged

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: How to build and keep at larger projects
« Reply #7 on: July 16, 2014, 02:04:48 am »

I can't help with coding and organization, as I'm not a programmer, but I am a writer, and it sounds like programmers and writers have exactly the same problem with momentum. In this case, I'd say any advice targeted at writers applies equally to programmers.

The best advice I've come across is about inspiration. There's a great quote from Neil Gaiman: "If you only write when you're inspired, you may make a fairly decent poet, but you will never be a novelist. Because you're gonna have to make your word count today, and those words aren't going to wait for you whether you're inspired or not." Replace "novel" with "big project" and you've got the same idea.

When you start a big project, you're full of ideas. You get that rush of excitement and motivation. It's also the same feeling most people get starting a new relationship. "This is gonna be amazing. We're gonna be together forever. I'll never get sick of this."

At a certain point, the novelty wears off, and it becomes a grind. This is 100% inevitable. It happens to absolutely everyone. The difference between a successful writer/programmer/marriage and one that fails is the drive to push through that. It will not be fun. You have to force yourself to do it. It's a job now. And if this is something you do in your spare time, it's an *unpaid* job, at that. You have to find ways to motivate yourself. Set yourself a minimum amount of time to work on it every single day. Or a minimum amount you need to get done before you can stop for the day. For my current rewrite of my novel, I'm making myself do 1500 words every day. Sometimes that takes half an hour. Sometimes it takes 4 hours. But I have to do it. Find whatever way to motivate yourself that you can, but you have to force yourself to keep going, or it will be just another unfinished project.

A person with a thousand unfinished novels is still not a novelist. These things only really count if you finish them. If you abandon your project, then that's your decision, but that means it will never be finished. No matter how many hours you put into it, it's not really an accomplishment. At most, it's another learning experience. And learning experiences are not bad, but if that's all you ever have, then you won't have accomplished much of anything. And that's such a massive shame, to put in so much work and have basically nothing to show for it. Just finish things. Even if halfway through you decide what you're doing is not worthwhile, finish it anyway. It will almost certainly turn out to be better than you think it is, and no matter how many problems it has, they can always be fixed later. The only unfixable project is the one you never finish.

As for motivation, I have two concrete suggestions. The first is accountability. Find the target audience for your thing, recruit one or two of them to be your unofficial managers. Pledge that you will have X done by Y date, and keep them updated. It helps, knowing that someone is waiting for you to finish your stuff.

The second is HabitRPG. If you haven't tried it, give it a look. There's a Bay12 guild on there already (twelfth bay). Set a daily task to finish X amount of work. If you succeed, you gain XP and gold which can be spent on better equipment. If you fail, you lose HP. Then set a Habit task for a session of work on the project. Click it every time you've spent any reasonable amount of time on the project. More XP, more gold. Go on quests. Fight boss monsters. It's a surprisingly effective way to keep yourself motivated.

Finally, here's a video of Neil Gaiman giving writing advice. Much of it certainly applies to programming as well (not all, of course; you can't code in notebooks, etc.). Have a watch, see if it gives you a push as it did me: https://www.youtube.com/watch?v=drMuQqLLEe0

Good luck!

gigaraptor487

  • Bay Watcher
  • Escaped Lunatic now civilised
    • View Profile
Re: How to build and keep at larger projects
« Reply #8 on: July 16, 2014, 08:40:33 am »

Thanks a lot really appreciate it.
Logged
Hehe, you thought there would be an interesting sig here

I now run a program which brings old multiplayer games back to life : click

HideousBeing

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #9 on: July 16, 2014, 10:18:54 pm »

That's some good advice for all of us I think :p.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: How to build and keep at larger projects
« Reply #10 on: July 17, 2014, 01:17:10 am »

Quote
you can't code in notebooks
When I spend many a night in my tent or on my bike, without electricity, I did, in fact, write down rough drafts of code for modding in my notebook.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: How to build and keep at larger projects
« Reply #11 on: July 17, 2014, 02:09:07 am »

Glad to be of help!

Quote
you can't code in notebooks
When I spend many a night in my tent or on my bike, without electricity, I did, in fact, write down rough drafts of code for modding in my notebook.

This is awesome.

Also, this video will probably be helpful as well. This series is targeted at game developers but it most definitely applies to ANY sort of project: Fail Faster: A Mantra For Creative Thinkers (This series has helped me with designing not only games, but also lesson plans, writing, and other projects.)

The Fool

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #12 on: July 17, 2014, 02:11:10 am »

Quote
you can't code in notebooks
When I spend many a night in my tent or on my bike, without electricity, I did, in fact, write down rough drafts of code for modding in my notebook.

I agree. While I haven't coded much, it was something we had to do in my university class. It's harder to erase and reorganize your code, but you can get the basic structure of what you're going to type out later and manually run through the code line by line to troubleshoot it ahead of time.
Logged

Steam ID: The Fool [B12]
A Flexible Mind (Suggestion Game)

JoeJoe

  • Bay Watcher
    • View Profile
Re: How to build and keep at larger projects
« Reply #13 on: July 17, 2014, 03:08:54 am »

Yeah, actual coding on paper is horrible, but a lot of the necessary/helpful preliminary work I find is done best on paper.
Logged

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: How to build and keep at larger projects
« Reply #14 on: July 17, 2014, 11:29:54 am »

Yeah, actual coding on paper is horrible, but a lot of the necessary/helpful preliminary work I find is done best on paper.

Agreed!  I tend to do brainstorming on how I'm going to organize things on paper.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout
Pages: [1] 2