Author Topic: Trying to code a simple 2D RPG  (Read 12791 times)

mmla

  • Guest
Trying to code a simple 2D RPG
« on: August 25, 2011, 04:30:10 pm »
Hi everyone

I learnt writing simple computer programs last year in Visual Basic, then this summer I decided to learn C++. I picked up "C++ without fear" and downloaded Code::Blocks, and I've spent a few weeks learning the basics.

In the last few days I've written a very simple RPG in Code::Blocks, but I want to build a more involved one. I don't want to make it too complicated, but I want things like it running in a separate window and loading graphics etc.

I know I can download specific game development software that can make it very easy, but I'm interested in learning how to code it so I can write other programs, as opposed to making the game.

I've searched the internet but can't find anything particularly useful. So I've got a couple of questions:

1. Is it even possible to use Code::Blocks to write a game like this?

2. Does anyone know any good guides that will help me learn the coding required to do this kind of stuff?

Or if I'm completely off the mark can anyone point me in the right direction or give me good advice?

Cheers

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: Trying to code a simple 2D RPG
« Reply #1 on: August 25, 2011, 05:33:05 pm »
Code::Blocks is just an IDE.
A nice one, ok, but an IDE.

It mean that actually, the thing making your code executable with languages C and C++ is the compiler. C::B or any IDE is not mandatory, they just give great comfort, but you could write lines of code with notepad and compile them in command line.
For your question, yes, you can develop a game with C::B, it will help you to manage compilation, linking and debugging. That's it's job. Many games (maybe most of the games) are written in C/C++, after all.

For help on how to write a game... I think you should start with SDL, it's a library ( = a bunch of function) to allow you to draw on screen, capture keystrokes, play with networks and sound and caetera.
Now, guides... start with making something really simple.

My advices: ask to wikipedia what is KISS principle, and follow it. Another advice is to read about test driven development. You could think it's not useful, but it will save you lot of time. I would advice you to read "thinking in c++" too. It's a nice resource.
At last, start your learning with something easy, and go step by step. Guys who want to make an amazing thing at the start rarely finish it.


PS: you won't have help on your code here, we only help on using c::b itself :) good luck