Skip to main content
GameDev.net gamedev.net
🔒 Locked

Creating a 2D game by yourself possible? How difficult?

Started by Escobar4Life May 16, 2007 at 8:38 PM 22 replies 42.9k views
Original Post
Escobar4Life
Escobar4Life
Hello. I was wondering how difficult it would be to create a 2D game for someone with "little" coding knowledge? By little I mean someone who is learning how to code by reading books and a few tutorials? And how much math is required? At the moment, I don't have any knowledge in coding. I plan on learning this summer by reading books. The game I would like to create is a beat-em up game. Someone else can code the score, points and mathimatical stuff. I would just like to focus on the core gameplay. Another question, how long would a game like Final Fight take to develop? (no sound and average visuals) just so I can get an idea. :) Thanks in advance.
Anteater
Anteater
Hey. You're clearly motivated and that's good. For a first game, I'd try using a GUI toolkit like Game Maker [ www.gamemaker.nl ] first. It introduces basic coding concepts, as well as resource handling.

Also,

2D Game: Easy. Especially with Game Maker or Multimedia Fusion.
2D Beat-em up: Difficult. I'd try an Asteroids clone first.
Final Fight: As with the previous one, try something simple first. If you try this first, it will take a _very_ long time and will probably feel "broken". On the other hand, you will learn from your mistakes, which is good.
davek20
davek20
Just by reading your post and you saying that you have none to little experience in programming, it will be pretty hard, or almost impossible, to make a game, even a 2D one.

Once you learn basics about programming, like data structures, algorithms, you should learn object oriented programming and some design patterns (although design patterns are not necessary but sometimes helpful) THEN you should start to learn game programming. A good way to learn programming is by making little applications that solve one thing or accomplish one task. You can think of these up by your self, like "how would I open a file, read the contents and sort it?" then expand on it. Another good way is to look for programming problem sets, like here http://acm.uva.es/problemset/ Many of these my be out of your range, but they are a good learning experience.

For game programming, there are A LOT of subjects that you would need to look into like graphic libraries, how to handle input, collisions (especially) and many, many more. Once you learn basics about programming, ONLY then you should learn game programming. I know this from experience, learning programming by making games is VERY difficult since you are learning two or more ideas/subjects at one time.

Once you learn all that, what I would do is sit down and design stuff out on paper (or whatever), such as what kind of things you need for you game and game objects. As for a game like Final Fight, there shouldn't be much math involved, the only ones that I see are collision detection and movement for "math" related to the game. My guess for a game like Final Fight to be developed now might take a few months with a small team (3 or 4 people). Someone needs to do art and testing like crazy and the others coding. The scoring and points system is straight forward, when you attack an enemy increase your points, and when you get hit, decrease you health.

This would be a difficult project for you to accomplish by the end of summer since there are many things to learn. I'm hope I'm not discouraging you in attempting the project, I am just giving you advice on what you SHOULD do first. Learn a solid foundation then attempt some projects, such as games.
haphazardlynamed
haphazardlynamed
Quote:
Original post by davek20
Just by reading your post and you saying that you have none to little experience in programming, it will be pretty hard, or almost impossible, to make a game, even a 2D one.

Once you learn basics about programming, like data structures, algorithms, you should learn object oriented programming and some design patterns (although design patterns are not necessary but sometimes helpful) THEN you should start to learn game programming. ...


Well that was discouraging.
While such topics are Very Important for Advancement. Pong does not require any of it at all. I think I remember doing a VisualBasic Pong game once, with little to no knowledge, a Long Long time ago, in a galaxy far away...

This is not to say that VisualBasic is by any means a good starting language for game programming; but there are tutorials for it and it'll cover the graphics and keyboard input without much fuss, if you want results...
Chad Smith
Chad Smith
Well, what language are you going to be using? C++, Java, C#, Python, or what?

It is entirely possible...just very hard. If you stay motivated and want to learn then you can do it. Just keep programming on and you can do it. I have done it when I first started learning...though it sucked.


Chad

Addictman
Addictman
It's not that hard to create a "game". Motivation is the key factor. You can learn most stuff if you just want it enough. If I were you, I would start with a game that's not really coded as a typical game (to learn some basic programming first), but a game nevertheless, to keep you motivated. How do you feel about tic-tac-toe? I would go for that if I were you.
Development blog, The Omega Sector -- http://www.omegasector.org
ApochPiQ
ApochPiQ
Quote:
Original post by Escobar4Life
At the moment, I don't have any knowledge in coding. I plan on learning this summer by reading books. The game I would like to create is a beat-em up game. Someone else can code the score, points and mathimatical stuff. I would just like to focus on the core gameplay.



The "core gameplay" is actually far more difficult and mathematical (especially in a beat-em-up) than simple scoring.

You'll need a pretty solid understanding of geometry (particularly Cartesian geometry) to do a 2D game, and a bit of problem-solving and analytical thinking skills. As the others have said, though, these things are completely possible to pick up as you go, provided you're motivated enough.

Making a beat-em-up is a great end goal, but you might find it useful to have some intermediate steps along the way. Doing simpler things like tic-tac-toe, a PacMan/Tetris/Asteroids/etc. clone, and so on will help you learn the things you need, but with a major bonus: you can focus on learning just a couple of things at a time, rather than having to try and figure everything out all at once.

Plus, doing more projects means more experience, and experience is hands-down the best way to learn programming. You'll inevitably make some mistakes on the way to creating your fighter game, which you can use to your advantage to help make the game that much better.


Going from having no programming experience, I'd say you're looking at about a year or so of learning to be able to do a good fighting game, assuming a moderate amount of time spent each week, and assuming you stick with it. Having some intermediate projects along the way will also help you keep a sense of continual progress, which can be important for staying motivated.


Best of luck [smile]
Bacon and Eggs
Bacon and Eggs
This is sort of what I'm doing right now... so these are my personal experiences...

I find that the difficulty of the technical stuffs is next to nil. My issue is the time that it takes to build what I want. That's the challenge. Nothing is too overwhelming in itself, but once all pieces are accumlated together it's one big freakin' task.

I've been tinkering away in my spare time, about 10 hours a week, plunking away at for the past 3 years... in java. I plunked for about 5 years in C++ before that and 2 years in pascal before that. I expected it would take a couple of thousands of hours to assemble something pretty... and fun... and technically correct to my standards.

Now, I've back tracked alot through this, and tried out many algorithms and data structures... see what works for me and what doesn't. I've also bit off quite a bit more then I can chew... which I understood going into it. All is not lost. I've learned mucho information that directly applies to my job... so it was partly training too.

Another thing that happened here is that I tried my own hand at pixel art... for the graphics... and I have a new found respect for my game creating companion(I'm a coder by nature)... This is at least 500 of them there 2200 or so hours I've dedicated to it so far...
Ahnfelt
Ahnfelt
My approach to programming has always been learning by doing. I started in an awful language called QuickBasic; however, it had a very flat learning curve, so I could building games with it immediatly. Without that kind of quick visual feedback, I probably wouldn't have given programming a chance at all.

Which is why I want to recommend an even simpler, but incredibly easy language and IDE called Scratch.

You will get something on the screen immediatly, and there are many helpful examples in the package.

It will teach you the very basic concepts, which are applicable to all imperative languages, and you'll even get a bit of concurrency training for free.

Once it starts to feel limiting, you'll be ready to move on to non-toy languages.
Escobar4Life
Escobar4Life
Thanks for the information guys/gals. It was really helpful. Sorry for the late reply. I forgot about it.

I only have 2 programming books at the moment. One of them is straight up C (?) and the other book is for game programming. I'm not sure which one is C# and C++. I'm pretty sure the game programming book is on C#.

Anyways, when I was reading the C++ book I made the traditional 'Hello World' application. It was easy because you pretty much copied what was written in the book. But I did learn what each code meant and I even understoon the characters in a coding format. But I stopped reading late last year.

So I'm going to read the books again to learn how to program. Like you guys said, I will start by making small applications. And maybe small, simple games. I guess I was thinking too far.

But yeah, my goal is to create a 2D beat-em up by myself or with a tiny group. I was actually thinking of doing all the coding and having another person work on the art and another person with the sounds/music. I would love to do the art though.

The reason why I would like to code the game myself is because I don't think another person will do a good job. By that I mean making the gameplay exactly the way I want it. lol. Yeah, I know, I'm thinking way ahead. But I'm extremely motivated for this project. But the math thing still has me worried. I read mixed opinions about it and I'm terrible in math.

By the way, I'm taking 'game development' classes in college that focus on art. My 3D Graphics & Animation 1 class ends next week. But I'm going to take that class again next semester. Other classes I will take next semester will be story board(ing?) too.

But I want to make 2D games first. As for 3D games, I'll only do the 3d stuff. lol. I don't wont be making 3D games because I plan on working in a studio once I'm finished with college. =)

Anyways, one last question, if I start reading one of the books I have and I dedicate a few hours of my free time to it, how long do you think it will take to create a simple game like pac-man, pong, etc.? Assuming I spend about 8 hours a week studying the language starting today? Again, I know it varies from person to person but I just want to get an idea. I would like to impress a certain someone with a simple game while I'm at it. :)

Thanks in advance. I love this forum!
SimonForsman
SimonForsman
Quote:
Original post by Escobar4Life
Anyways, one last question, if I start reading one of the books I have and I dedicate a few hours of my free time to it, how long do you think it will take to create a simple game like pac-man, pong, etc.? Assuming I spend about 8 hours a week studying the language starting today? Again, I know it varies from person to person but I just want to get an idea. I would like to impress a certain someone with a simple game while I'm at it. :)

Thanks in advance. I love this forum!

you should be able to make a simple game after a week or two (maybe less) if you're a quick learner.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
daviangel
daviangel
Quote:
Original post by SimonForsman
Quote:
Original post by Escobar4Life
Anyways, one last question, if I start reading one of the books I have and I dedicate a few hours of my free time to it, how long do you think it will take to create a simple game like pac-man, pong, etc.? Assuming I spend about 8 hours a week studying the language starting today? Again, I know it varies from person to person but I just want to get an idea. I would like to impress a certain someone with a simple game while I'm at it. :)

Thanks in advance. I love this forum!

you should be able to make a simple game after a week or two (maybe less) if you're a quick learner.

Unless you are talented it'll take you a while. It took me about a week spending several hours to make my first 2D game in arguable the easiest language there is here
python 2D game
and I'm just a hobbyist at this.
This complete RPG python game shows what a professional or someone talented could complete in the same time period.
Considering it's take you 10x or longer using C#/C++ I think you can figure out why it takes a while for anyone to complete their own complete 2D game.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
MOVSW
MOVSW
You really need to decide on what your goal is.

If you're taking up programming as means to an end, then I don't recommend it.

If you REALLY want to create game concentrate on one thing first. Trying to do everything at once will cause frustration and mediocrity.

If you like graphics then concentrate at that. Become really good at it and maybe you'll get picked by a development team for a real game.

Remember, it's much more valuable to be very good at one thing than mediocre at many.

It took me a YEAR to write a simple Mario platformer clone. I went through about nine, yes NINE engine rewrites before I got basic set of features.

This was 3 years ago and I was a senior in college and been programming for 6 years at that point.


My advice is to figure out what you want to accomplish. If you choose programming, pick one language and stick with it.

Beginners underestimate levels of API knowledge required to write a "simple" game.

Another thing about APIs. Don't go over the top. Your goal is to make the first game not a production high performance product. Don't even bother with Direct3D or performance APIs. They can be VERY overwhelming for a beginner. Forget sound or smooth controls for now :)

My suggestion for you is to download Java SDK with NetBeans or Eclipse IDE. Once you're well acquainted with the language pickup "Developing Games in Java" by David Brackeen

If you don't have money for that, you can find TONS of information online on Java game development and animation.

Don't even bother with C/C++...

Abert
Abert
When I read these kind of answers I am alwayes astonished

It seems that most people assume and , even worse, try to convice the begginers that programming and math are key issues for developing a game.
The result is the the beginners are either discouraged ,if they hate math and programming or disappointed if they love math and programming

To create a simple game you must simply get familiar with :

A game engine for example haff's game engine for 2d games
A graphic tool to create models and animations (MilkShape)

That's it , that's all
Programming and and math knowledge are really basic
I suppose you go to school, dont'you ? :)

Of course I am talking at an hobbyest level



RobN
RobN
Data structures and design patterns arnt necessary IMO "Dont even bother with c++" is nonsence .

C++ would be a good choice if you want to get into the 3d side later on and theres plenty of fairly easy 2d libraries available.

Object Orientated Programming might be a good idea to learn as it might actually be easier once your game gets to a decent size.

Learning the contents of a beginners book on C++ should be enough to start looking at graphics libraries and writing a simple 2d game.
JBourrie
JBourrie
People who already know how to program tend to like to suggest the more powerful languages, because in the future you need to know these. But you're just starting out, there's alot of stuff you need to learn before you worry about the complexities of C++.

I'd suggest checking out Python/PyGame, Torque Game Builder, or Flash. Get in there and start creating, then move on to the more complex languages if you decide that's the direction you want to go.

Final Fight isn't a realistic goal for your first game. Once you have the skills needed to make a game like Final Fight, you'll be able to answer your own question :) My first few games were text adventures, then text-based Tic Tac Toe, then a Windows GUI version of that Tic Tac Toe, and from there I started doing simple graphical games (a 2D bumpercars game and "Hobo Alley", which was a simple Sim City clone for homeless people [grin]). Aim small, and grow your skill set. You'll know when you're ready to tackle your first "real" game.

Good luck!
etsuja
etsuja
I probly shouldn't tell you to bite off more than you can chew but if you like a challenge I'd suggest you pick up a fairly comprehensive c or c++ book and either a directx or game programming with directx book and maybe learn the mathmatical stuff you don't know online as you progress through programming. This is kinda what I did. I started a semi 3D rpg. It was 3D but set up to look like a 2D game. I didn't actually use 3D models for characters and the world wasn't really 3D in the aspect of which ways you could travel, you could only move up and down and sideways and such but it did have a camera and was in 3D space. I got as far as to where you could attack some enemies and had some generic enemy AI so they would chase you. This was my first attempt at a graphical game. I ended up having some bugs that I couldn't seem to fix, like sometimes one of the characters graphic would disappear for a frame. However I did learn alot about a games program structure and how to load resources and such from packaged files and how to make animation and stuff work. There's alot more that I learned but I don't want to post everything. So I ended up scrapping that first game but if there's one big thing I've learned it's that error checking is essential. That's why I couldn't find out what was causing the bug in my game.

You said you don't want to program the mathmatical stuff but truth is programming is pretty much all math. Although some of it is more simple than the other. I'd say go ahead and try to program everything cause you'll learn more.

Anywho, if you're serious about making a game I'd say shoot for the stars and try to make the beat em up with directx, you'll most likely learn alot even if the game doesn't turn out or even if it does. However if you're not real serious about programming, other people have made some good suggestions about what you could do to get the job done.

Artist 1st - Programmer 2nd(I'll get some material linked here sometime to support these claims, haha)
SimonForsman
SimonForsman
Quote:
Original post by daviangel
Quote:
Original post by SimonForsman
Quote:
Original post by Escobar4Life
Anyways, one last question, if I start reading one of the books I have and I dedicate a few hours of my free time to it, how long do you think it will take to create a simple game like pac-man, pong, etc.? Assuming I spend about 8 hours a week studying the language starting today? Again, I know it varies from person to person but I just want to get an idea. I would like to impress a certain someone with a simple game while I'm at it. :)

Thanks in advance. I love this forum!

you should be able to make a simple game after a week or two (maybe less) if you're a quick learner.

Unless you are talented it'll take you a while. It took me about a week spending several hours to make my first 2D game in arguable the easiest language there is here
python 2D game
and I'm just a hobbyist at this.
This complete RPG python game shows what a professional or someone talented could complete in the same time period.
Considering it's take you 10x or longer using C#/C++ I think you can figure out why it takes a while for anyone to complete their own complete 2D game.


I guess it depends on what you consider a "game" :) , but for something simple you really don't need that much, (plot a few pixels , check input, and move said pixels).

my first "2D Game" was a simple 2 player button masher (Written in pascal), each player was a circle and by rapidly pressing a button that circle moved from left to right, the first one to cross a line on the right side of the screen won.

It most definitly didn't require much in terms of programming knowledge, i didn't even know how to write functions (procedures) or loops (goto all the way ;))
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Oluseyi
Oluseyi
Quote:
Original post by MOVSW
If you're taking up programming as means to an end, then I don't recommend it.

Er, what?!

Programming is a means to an end. The source code is not the end product; even the software resulting from the source code may not be the end product! All programs are written to fulfill a human objective, even if that objective is a production tool (the tool serves to make the users of the tool more efficient/effective at a task).

Picking up programming as a means to an end has a tremendously rich history. Thousands of scientists over the years have learned just enough of a language to solve their problems. The OP's "problem," as it were, is that he wants to make a game. He's potentially picking up a programming language to solve that problem - isn't that how most of us started? I started programming to make video games, and I've read many other people write the same.

Frighteningly bad advice.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.