Advertisement

Starting from the basics?

Started by January 15, 2016 08:27 AM
16 comments, last by Brain 8 years, 11 months ago

Hello!

So I'm a Freshmen in college and been practicing my basic C programming skills. Currently i'm trying to start learning how to develop games. What comes after learning the basics? (pointers, Linked List, etc....). is there a library that should be used? am i missing something?. I understand some object oriented programming from my java class. Please any books, sites or tutorials would be great.

is there a library that should be used?

You could write from scratch, if you wanted. However, SDL is very commonly used with C and is quite easy to get into. It's used by Valve too, if that means anything. They also have a fairly extensive list of tutorials, and superb documents with examples.

I understand some object oriented programming from my java class.

Remember though that C is procedural while Java is Object-Oriented.

The only thing left after the basics is to get a game out, I recommend following THIS if you have no idea where to begin.

Advertisement

As your very first game I would highly recommend Pong. It can include all of the very basics of a what a complex game would contain. You have simple graphics, physics, input, ai, sound, etc. These are the buildings blocks of any game out there. The complexity of each of those concepts just scales up when you want to create a bigger, more sophisticated game.
Once you successfully create Pong, you then have a basic skill-set under your belt that you can use on other games.

As for what API to use, that's up to you. There are a LOT of API's for a LOT of different languages. Are you learning C or C++ in class? There are subtle differences between them that may or not not impact your project. It doesn't really matter though unless you're using a C compiler. Anyways, for C/C++ there is Allegro, SDL, SFML, D3D, OGL, Window's GDI. Java you have the JFrame/JApplet w/ the graphics library you can draw 2D stuff. Python has PyGame. You can write a game in any language that has the appropriate libraries. Even if it doesn't have graphic's capabilities, you can still make text based game ( I wouldn't recommend).

My personal choice would be to use Allegro, it's more than a graphics library, it has input and audio also. It's also very simple to use.

Pong or Breakout are two extremely popular games to make when first diving into the world of game programming. They both teach user input and collision detection which are both commonly used in game programming. Take your pick!

I vote for Pong in SDL. Some more SDL tutorial links on my site at http://www.gamedevpensieve.com/graphics/graphic-api/sdl .

@spinningcubes | Blog: Spinningcubes.com | Gamedev notes: GameDev Pensieve | Spinningcubes on Youtube

So after a lot of research and your help, these are the steps that i'll be taking to learn game development:

  1. continue practicing C (C is a basic programming language that i think is essential to maximize the understanding of code )
  2. Learn C++/Allegro ( as much as i love C, C++ is widely used and has far more tutorials)
  3. Start working on a real project that interest me.

Thank you guys for the feedback!!

Advertisement

After basics? Advanced topics :)

C is a procedural language.

You could use it to develop games, However without OOP it's limitied and kind of annoying . (I've seen sources of games in C, They are always too static and you can really develop on top of these code bases, which is highly important for gamse).

So the first thing is to learn C++ and OOP. (You have several languages you can pick, look at C#/JAVA/C++/Python (While I don't completly recommend python).- These are the most common).

Afterwards, learn the advanced topics such as Multi threading,networking, secuirty, GUI (Win32 is a nice library to learn).

Of course always seek knowledge about the language you chose. It is important to know the features of the language and its libraries.

This path will provide you good tools for developing software,

Only afterwards you should look into game development.

Game development is not only about code.

There are different aspects of game development.

Which covers artistic (Sprites, textures, 3D models, etc)

Audio (Game sound and music).

Game design (Story, mechanics, etc..)

Managment and sales.

There are ton of things you need to learn.

Ofc the deveolpment of a game isn't that hard, if you develop a small game it would not take you as much.

But producing an high quality game takes practice and knowledge.

And because I wrote it in this order doesn't make it mandatory, I even advise to look into game development in parallel with the software developemnt part.

Good luck!

You could use it to develop games, However without OOP it's limitied and kind of annoying .


Damn youngins, get off my lawn! *waves walking stick*

When I started out, all games were written in assembler, which meant at best all you had was goto/gosub style jumps and subroutines.

Games were still good and it made you think carefully about how to lay out the game.

In the end it's not the language you choose but choosing the right tool for the job and being skilled in that tool. There's no reason why you can't make a game in C if you're that way inclined any more than you can make something similar to Street fighter 2 in 68000 assembler...

Good luck!

You could use it to develop games, However without OOP it's limitied and kind of annoying .


Damn youngins, get off my lawn! *waves walking stick*

When I started out, all games were written in assembler, which meant at best all you had was goto/gosub style jumps and subroutines.

Games were still good and it made you think carefully about how to lay out the game.

In the end it's not the language you choose but choosing the right tool for the job and being skilled in that tool. There's no reason why you can't make a game in C if you're that way inclined any more than you can make something similar to Street fighter 2 in 68000 assembler...

Good luck!

I'm nowhere near your age, but I couldn't agree more. You can write a game in any language paradigm: OOP, Procedural, Functional, whatever. It doesn't matter. The Language is simply the tool, and sometimes there is more than one tool for the job. Assembly would be to a hand-screwdriver while high-level OOP languages would be to a powerdrill w/ screwdriver bit. Some things are just easier than others to use.

Can't go wrong doing the games listed here:

http://www.gamedev.net/page/resources/_/technical/game-programming/your-first-step-to-game-development-starts-here-r2976

Surprised no one linked it yet.

  • Pong = Simple: input, physics, collision detection, sound; scoring
  • Worm = Placement of random powerups, handling of screen boundaries, worm data structure
  • Breakout = Lessons of pong, powerups, maps (brick arrangements)
  • Missile Command = targeting; simple enemy ai, movement, and sound
  • Space Invaders = simple movement for player and enemy, very similar to breakout with the exception that the enemy constantly moves downward, simple sound
  • Asteroids = asteroids (enemies) and player can move in all directions, asteroids appear and move randomly, simple sound
  • Tetris = block design, clearing the lines, scoring, simple animation
  • Pac Man = simple animation, input, collision detection, maps (level design), ai
  • Ikari Warriors = top down view, enemy ai, powerups, scoring, collision detection, maps (level design), input, sound, boss ai
  • Super Mario Bros = lessons of Ikari Warriors (except with side-view instead of top-down view), acceleration, jumping, platforms

This topic is closed to new replies.

Advertisement