need help on starting game dev.

Started by
9 comments, last by test86 17 years ago
Hi, I'm at my last year of CS, I'm familiar with C/C++/C#. my best game was a Snake clone, which doesnt use graphics, just DOS's default blocks. I also wrote a Chess, which was a 2-player only, no A.I. . So, why i'm posting here? The main thing is i read your article about game dev and i started the Tetris-clone as you recommended, but since this OO thing is kinda complicated for me, or i'm making it to complicated for myself, i couldnt finish it in OO way, since last summer. None of the ppl i know could help me in designing it in right way since OOP is not used wisely here in my country. (i can tell u what's desing problems if you think that i better continue this projekt, plz read till the end). but my love is 2D platform games, like Mario. i wanted to ask you guys, do u still think i better do the Tetr!s->breakout->pacman way or i can just jump in for the 2D platform? let me tell u that i dont have exp with DirectX/OpenGL/SDL/etc but i passed computer graphics which i studied some basic stuff of them. i got SDL and i thought it will be easier to do graphical stuff, but i found it hard. and i would like to be able to develop games for Nintendo DS, so if anything helps that way, plz guide this misleaded guy. one other thing makes me unhappy about tutorials is that none teaches the big picture of a game, some or just focus on very advance stuff, like Shader Level 3 or focusing on basic OOP stuff, there is no middle-of-this-thing, like teaching the theory of a tile-based or pixel-based platform game, like what basicly is the main loop of game and where u have to put a move for your enemies and such. i have Visual Studio 2005, and since i think C++ is the language i'll have to work in future, i would like to stick with it, and i know C# is much easier but i cant go to nintendo and say that i can work with C#. so plz tell me whatever you think is good for me, i read last 2 pages of this Beginner part, but none could help me. i couldnt even compile the tetris clone (falling blocks), since it had problems that i couldnt sovlve, just some collision detection was intresting. whatever you recommend, plz give me a big picture of it first, like if u recommend ter!s clone, plz tell me that i need a gameloop, inside it i'll need a function to create a piece, before that u need a method for checking if player can put another piece or not. and tell me what API's do u recommend, if u do. if u recommend not to jump for 2D Platforms, i'll check again my papers on my tetr!s, so hopefuly we'll go somewhere together. at last, sorry for my bad english, and my long post, since i dont have anyone here and no one even cares about games, not to mention even about making them. Sincerly.
Advertisement
I'm currently learning SDL using the SDL tutorials from LazyFoo:
http://lazyfoo.net/SDL_tutorials/index.php

They introduce concepts in an appropriate order and the concepts are explained well rather than the syntax just been handed over to you.

I think by the end of the tutorials you should have enough SDL knowledge to write simple 2D games.

I really recommend you learn OOP, it makes things much easier (in fact, custom classes are used in the LazyFoo tutorials).
I recommend *Not* designing it--seriously. The most important
step for you is just completing the project (The tetris game).

As this is your first graphical game, try to finish the game and
not worry much about the design. I personally recommend starting with
Pong, not Tetris. ie: Pong->Tetris->Breakout->Pacman (All games 2d).
The primary reason of starting with pong is easier progression
with harder projects. This is just my opinion.

After completing the game, it will help you better understand how everything
fits together (This is why it is important just to complete your current
game)

After you complete your project, take a look at OOD (Object Orianted Design)
(Or just pick up "Code Complete"--great book), go back to your game,
and make it better in design [smile]

If you are having difficaulties with SDL, tell us the problems. Their
are many people here that I am sure can help. I use OpenGL/DirectX,
which are complex 3d APIs, which are alot more then you need for your
projects.

I hope this helps. I should note that in larger projects, you should *always*
have a good design. However, because this is your first game, it is more
important to finish your project, rather then worry about its design,
coding styles/practices, etc..)

Hope this helps!
still confused.
continuing tetris? doing pong? reading Lazy Foo's SDL tutorial? aynthing else? anyone else?
-------
i do have classes for my tetris game, but my main problem is i want to make most of them Private (since i think its better), but i cant, if u need i'll explain more.
-------
tnx for ur quick replies.
Making your classes have private members encorages encapsulation
(One of the core peices of OOD/OOP), so it is indeed a good idea[smile]

How far are you in your Tetris game? If you are kind of far, then I
personally recommend staying (and completing!) your tetris game.

What graphics library are you using?

If you plan on using SDL (But dont know it), then go ahead with
lazyfools tutorial first. This will get you more exp. with graphics,
and help you alot when developing your tetris game.

If you are already using a different API, continue using it (ie, dont
switch to SDL), and try to finish your game.

Hope this helps;
Quote:Original post by Crypter
Making your classes have private members encorages encapsulation
(One of the core peices of OOD/OOP), so it is indeed a good idea[smile]


yes, they have private members, but some methods need access to like main Array, should i make that public?! its scary to have my main array of Tetris, public.




Quote:Original post by Crypter
How far are you in your Tetris game? If you are kind of far, then I
personally recommend staying (and completing!) your tetris game.


umm, i donno how far, if u want, i can summerize my nots and put my sketches of my classes, so you'll see my works/progress/problems.
its still better than pong, since i donno how to store the moving ball in first place, then comes the fear of collision test and calculating its reflections.

Quote:Original post by Crypter
What graphics library are you using?


i donno any yet, but it seems that SDL is good enough, isnt it?
(portability is not important for me, but i hate to stick to MS, i like making games/porting them to DS in future, so if u think any other API is better, plz tell me about it)


Quote:Original post by Crypter
If you plan on using SDL (But dont know it), then go ahead with
lazyfools tutorial first. This will get you more exp. with graphics,
and help you alot when developing your tetris game.

If you are already using a different API, continue using it (ie, dont
switch to SDL), and try to finish your game.

Hope this helps;


does lazy foo's tutorials talk about game just SDL or they are about game programmings too?

what about Code Complete? whats that all about? plz recommend something that i can find on the net since i cant buy them here in my doomed 3rd world country.
i have tons of books, but either they are too easy and talking about theory of OOP or they are too advanced.

thnx in advance for ur time.
Quote:
yes, they have private members, but some methods need access to like main Array, should i make that public?! its scary to have my main array of Tetris, public.

It depends on what the classes themselves are for, and the level of abstraction
you want each class to have (ADT=Abstract Data Type).

If a class B needs access to class A's private member, take a look at
their "is a" and "has a" relationships:

-Is class B a class A? If so, derive class B from class A through public
inheritace.

class A {  int m_map[MAPY][MAPX];};class B : public class A {  // class B "is a" class A  // B can access A::m_map};


-If class A is responsible for encapsulating the array (This seems to be the
case), you can provide an accessor method.

class A {  int m_map[MAPY][MAPX]; // class A "has a" mappublic:   int GetIndex (const unsigned int x, const unsigned int y) const {     if (x>=MAPX || y>=MAPY)        return -1;     return m_map[y][x];  }};

Now you can simply use A::GetIndex in a safe way, while still hiding
how the map is stored.

It would be better design if you use the STL here.

Quote:
i donno any yet, but it seems that SDL is good enough, isnt it?
(portability is not important for me, but i hate to stick to MS, i like making games/porting them to DS in future, so if u think any other API is better, plz tell me about it)

SDL sounds like your best choice[smile]

Quote:
what about Code Complete? whats that all about? plz recommend something that i can find on the net since i cant buy them here in my doomed 3rd world country.
i have tons of books, but either they are too easy and talking about theory of OOP or they are too advanced.

Code complete is an excellent software engennering book (You can find it
on amazon.com)
thnx for ur answer.
so ur last answer is stick to my Tetris or get into pong?

if so, plz tell me to first summerize my notes on tetris or go to Lazy Foo's SDL tutorials.

so u recommend tetris->pong->breakout->pacman->mario-clone ?

i think u donno 3rd world countries, we dont have credit cards, amazon.com doest sell stuff to us, i meant recommend something that i would find on P2P sites.
we read Preesman's book at our Software Eng. but it has nothing about OOP/OOD.
Try reading "Thinking in C++" which is a legal free ebook. I can't remember it covering design specifically but it will cover implementing design in C++ which should help.

Steven Yau
[Blog] [Portfolio]

Pong->Tetris->Breakout->Pacman->Mario

This is only my personal recommendation. Alot of members here
built Tetris first, instead of pong. If you want to continue
with Tetris, I would go for Breakout afterwords, then.

Their are two reasons I recommend the above: poject management
experience, and each game requires knowledge that the previous game
uses (ie, they build ontop each other). They also get larger in size
(My first Pong was 200 LOCs with Win32 API, my Pacman reached 2,000 LOCs
with Win32 and DX)

As for OOP/OOD, This might help

Also, This looks quite good

I second Thinking in C++ -- It is a very good book.

This topic is closed to new replies.

Advertisement