Stuck in the Doldrums of Game Programming

Started by
6 comments, last by Zern 12 years, 4 months ago
[font="arial, verdana, tahoma, sans-serif"]I have a long story so I'll try to be somewhat brief.

I'm 15 years old and I started programming in Java about a year ago. I found it very difficult so I decided to switch over to C# and I've had much more success with that language. Since I was naturally interested in game programming, I first decided to take a tutorial at homeandlearn.net and learn some general C# programming. It centered on the use of Windows forms. Parts of the tutorial were confusing and I switched over to a website called "learn C# and game programming." The site had a series of tutorials on game programming in a command prompt window. I learned a handful of C# keywords and operators but I found that the game I was programming followed the tutorial's design far too closely and some bugs I didn't know how to handle prevented me from going any further.[/font]

So, I want to create a new game from scratch. I know enough C# keywords and operators that I wouldn't have to go back to basic tutorials but I lack "syntactical" skills and find it difficult to successfully arrange classes to create a game of epic stature, even if it's just a massive text adventure. What should I do? It's within my ability to program successfully in C# but I'm just plain stuck at the moment. I also don't want to switch over to a language like C++ just yet. Although it's better for game programming, I want to have a solid understanding of a simpler programming language like C# and successfully make my own game.

Also, I'm sticking to the use of command line interfaces for my games and haven't added graphics yet so I don't have much experience with XNA or OpenGL. My main goal is to create a text adventure game in C# that has:

- Tens, if not hundreds of environments (depends on how easy they are to implement)
- A large assortment of monsters
- A simple plot that involves leveling up to kill monsters and finally having enough experience to kill the boss monster and win the game
- Levels, items and indoor environments (taverns, inns, stores and fortresses)
- Is completely from scratch. No code copied from someone, only reference sites and possibly pseudocode.

If someone could give me some guidelines and point me in the right direction, it would be very much appreciated.
Advertisement
You seem to be trying to jump over a significant part of the learning process.

Here is how it should go:
You have some level of programming ability.
You have an idea that is just a bit out of your reach, but most things you already can do and you only need to learn a bit more to accomplish the task.
You start the new task, handle the unexpected problems, and finally finish it.
Repeat at your new skill level.


My story:
I started at 14 also. mIRC script.
I knew nothing, so after following the tutorials too closely, I arrived at your position.
So even though I had some dream of graphics games with tons of monsters etc., I had no idea how to get there. But I did have an idea as to how to make a random-number text-based guessing game!
I made it and grew.

Repeat with a text-based mIRC fighting game that allowed players in chat to fight each other by PM'ing their moves to the bot.

Repeat with an improved and more complex version of that.

Study C#, make simple text-based game.

Study by making a single graphic appear and make it move a little.

Make a Tetris clone in C#.

[years pass]

Repeat with an improved version of the "tons of monsters graphics game" of my dreams from years before.

It just keeps going, step-by-step.
How do you plan to get to the end if you don't go through the middle?

If you have no idea how to even start, then you aren't ready to start.
Move on to the next step, which you do by considering what you want to do based on what you can do.
As long as that adds a little more to your experience, you are on the right path.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

This is definitely an example of a beginning game developer believing they have what it takes to make an extremely epic game/MMO/ whatever...

Start smaller and simpler. Most indie games are very simple and fun to play, and popular. Keep that in mind. Tens of thousands of environments isn't something that even a huge game company can accomplish. Environments and art take a LOOOOOOOOONG time to make. One level can take weeks of work to finish.

Also the biggest mistake you can make is thinking you must write everything from scratch with no code borrowed from anywhere. There are many useful libraries to help with game development that you should make use of. Those libraries are written by professionals or just average people who devote their time to that particular project. Those libraries are better than anything you can write yourself. And when you get to the point when you can write that library yourself you're not going to want to waste time writing something mundane like an image loading library when you want to focus on making the game. Also the best way to learn is to look at tutorials with actual source code, or to even attempt to skim through source code of actual game engines like Quake 3 just for ideas on design.

As a beginning programmer of games you should start with something smaller and 2D like a shootemup jet game, or a maze puzzle game of some sort. Eventually you'll learn more and more until you can make some truly amazing things.

I started making games with Game Maker back when I was 12 or so. I've started many MANY epic projects that I never finished. If you commit yourself to a simple project you will finish it. Avoid feature creep. Say what features the game will have and do nothing more than that. Save any new ideas for the next game you will make. This way you will finish a game, otherwise you'll keep working on a project for years adding random things to it as new ideas come up, and later give up on it and start some random new project. Try to avoid the thought, hmm, I think I wanna make an RTS instead of this simple pokemon style RPG I started making forever ago. Finish the simple pokemon style RPG no matter what then start the RTS.

Now I'm working on a 3D FPS engine using OpenGL written in C++. I make use of many third party libraries and I don't know where I'd be without them. Probably trying to figure out the complexities of the .png image format so I can load textures. On top of that I also am not making a level editor. I'm using 3DS max to make levels and export them in to my game. I'm using a model format from Doom 3 instead of creating my own. I'm using Nvidia PhysX for physics instead of writing my own physics engine like some games do. So avoid the idea that everything needs to be from scratch. I was even thinking of just using Ogre3D instead of writing my own 3D engine but I'm a computer science major and the graphics engine I'm writing is for my master's thesis so I have to do that part on my own...

I know enough C# keywords and operators that I wouldn't have to go back to basic tutorials but I lack "syntactical" skills and find it difficult to successfully arrange classes to create a game of epic stature, even if it's just a massive text adventure.


First, be open to these discussions of experience and time. Learning 'syntactical' skills and keywords and so on is a little like learning just enough French to understand sentence structure and/or find a word in a dictionary. Speaking it for years yields fluency and the ability to use common sayings that are outside the scope of educational material. In programming, we tend to develop 'patterns' - common approaches to problem solving which we can pick up and reuse to address similarly structured problems in future. While computer science education does tend to include a discussion of design patterns, there's no substitute for learning by doing, so just keep hacking away at it secure in the knowledge that even when you don't appear to be making progress, your skills are developing.

Second, I also started young - maybe a little younger than yourself, and that was 25 years ago. My first programs were all games, and I still write games occasionally as a hobbyist. Programming taught me problem solving and analytical skills (and a little pragmatism) which I couldn't get in the classroom and which have resulted in a more than adequate income source and satisfying career. So if you can build it slowly and just have fun while you're doing it, you could put yourself into an enviable position when it comes time to hit the workforce.




As a beginning programmer of games you should start with something smaller and 2D like a shootemup jet game, or a maze puzzle game of some sort. Eventually you'll learn more and more until you can make some truly amazing things.

Seconded, but to learn game design in addition to general programming, I suggest tackling game types that are not only easy to make (because they don't need sophisticated algorithms, high performance, time-consuming art assets, complex level design, etc.) but also hard to make well (because many subtle details are important for the player but easily neglected or even unnoticed by the programmer).
For example:
  • Tetris clones, which usually have abrupt animations and inappropriate piece rotation movement rules (just surprising, or lacking the expected group structure).
  • Pong clones, with the nontrivial choice of speeds and sizes for the paddles and the ball and the traditional puzzle (repeatedly occurring in the AI forum) of how to make a fun imperfect computer player.
  • Overhead perspective racing (good examples: Micro Machines, Death Rally, Super Off-Road), commonly afflicted by inappropriate collision shapes and responses, oversimplified (i.e. shallow and boring) car physical models, pointless and unbalanced features, and disheartening amounts of effort stolen from playtesting and wasted on nice graphics (e.g. 3D engines).
  • Bomberman clones, to learn how to coordinate graphics, frames of animation, game loop timing, character states, player inputs and user interface with an iron fist.
    Any imperfection, and the little guy keeps dying horribly: stopping against a wall while trying to turn a corner, caught on the wrong side of a bomb that was dropped inadvertently, one pixel too close to a blast, and so on.

Omae Wa Mou Shindeiru

You do not know enough C#.
you do not know enough programming.

you need to learn how to use arrays
you need to learn how to use the different elementary types and their differences and why we have them all.
you need to deal with more logic interactions.

you need to understand design patterns for code. not many, jut some of them so you can have a programming paradigm that can be followed and produces something you can maintain or extend later.

biggest.. you need to do some more design of your small aspects of the game before you code them. Jumping straight to code on those will come to bite you in the ass later.

Having the big picture is nice, but small things matter huge. Skyrim just out shows this quite alot with how many tweaks people have had to make to give them a decent experience on the PC.

before you really make any games, make some small programs to just do programming.
with C# learn how to attach a database backend (useful for RPGs).
learn how to serialize your data in and out so you can load a game world with one command in your main logic.





Also the biggest mistake you can make is thinking you must write everything from scratch with no code borrowed from anywhere. There are many useful libraries to help with game development that you should make use of. Those libraries are written by professionals or just average people who devote their time to that particular project. Those libraries are better than anything you can write yourself. And when you get to the point when you can write that library yourself you're not going to want to waste time writing something mundane like an image loading library when you want to focus on making the game. Also the best way to learn is to look at tutorials with actual source code, or to even attempt to skim through source code of actual game engines like Quake 3 just for ideas on design.


+1 on this.

These days, programming is more about gluing different libraries at a high level than getting down and dirty in low level technical stuff. Also, using open source libraries will allow you to start digging and see how it works under the hood. This will be valuable in learning good code architecture. Simply copy-pasting code you found on the net or looking at open sourced games will teach you nothing. You need to have a good idea of what happens when you feed this data to that function to truly understand what's going on. You will then be able to recognize patterns and apply an appropriate solution. Then you'll look back at the horrific code you wrote 10 years ago and wonder how it managed to not explode.
Developer for Novus Dawn : a [s]Flash[/s] Unity Isometric Tactical RPG - Forums - Facebook - DevLog
I'm with YogurtEmperor on his post. Especially :



It just keeps going, step-by-step.
How do you plan to get to the end if you don't go through the middle?

If you have no idea how to even start, then you aren't ready to start.
Move on to the next step, which you do by considering what you want to do based on what you can do.
As long as that adds a little more to your experience, you are on the right path.
[/quote]



As for others talking about the graphics aspect .... hmmmm maybe I'm a bit daft but I don't believe he spoke about 3D or 2D. I believe he even stated he wanted to keep it to text [console].... *wonders if others just jump to conclusions without reading whole posts...*


Also, I'm sticking to the use of command line interfaces for my games and haven't added graphics yet so I don't have much experience with XNA or OpenGL. My main goal is to create a text adventure game in C# that has:
[/quote]



Only piece of advice I will share is when it gets tough take a small break if you need but never give up.

This topic is closed to new replies.

Advertisement