Let's have a good POV..

Started by
20 comments, last by GSnake 11 years, 8 months ago
Hello guys, I just wanted to know how can I start developing games. Easy question, hard answer.
I already program in C, I've also tried the Allegro library but... I want to know how a game is developed. What's its structure, how should I create it, what tools should I use and so on. I would like to use professional-like tools (C++, OpenGL [open-source!]... etc) and maybe you can help me.

How can I understand C++ (coming from C, so I don't need the "ok, this thing is called variable" chapter) and OOP? What should I do next? Which books can help me in my project?

So to sum it up: what's the game structure? How can I make it work? How can I do it?
Suggest me books to buy and so on. Thank you guys!

PS: (this is quite OT but...) I'm not a native english speaker so I'd like some correction and some "grade" with my english. Thanks! (help me improve!)
Advertisement
I believe OpenGL is an open standard, rather than being open source. But that's a mistake we all make at some point. smile.png

My understanding is that the main distinguishing characteristic between C and C++ is that C++ is object oriented, while C is not. My experience with C is limited though, however OO is the dominant kind of programming knocking around right now I believe. If you've ever worked in one of the .net languages, that's OO. smile.png

One metaphor I find is nice with OO programming is to imagine what you want your program to do is a project you're overseeing, and each of your objects is somebody on your team working on it. You organize them to work on their own parts, and at the end, you get the big picture you want.

I'm afraid I can't point you in the direction of a good book or anything, as I approached C++ with lots of prior experience in OO programming. I'm sure there's plenty of people here who can, though!

And finally, I'd have assumed your native language was English. You write very eloquently, and use punctuation well. There's people born here in England whose English isn't as clear as yours! smile.png

I believe OpenGL is an open standard, rather than being open source. But that's a mistake we all make at some point. smile.png

My understanding is that the main distinguishing characteristic between C and C++ is that C++ is object oriented, while C is not. My experience with C is limited though, however OO is the dominant kind of programming knocking around right now I believe. If you've ever worked in one of the .net languages, that's OO. smile.png

One metaphor I find is nice with OO programming is to imagine what you want your program to do is a project you're overseeing, and each of your objects is somebody on your team working on it. You organize them to work on their own parts, and at the end, you get the big picture you want.

I'm afraid I can't point you in the direction of a good book or anything, as I approached C++ with lots of prior experience in OO programming. I'm sure there's plenty of people here who can, though!

And finally, I'd have assumed your native language was English. You write very eloquently, and use punctuation well. There's people born here in England whose English isn't as clear as yours! smile.png
Thanks!
I read that I should also use SMFL or SDL but... what if I'll want to share my games on Steam / iOS Store / Android Store and so on? Steam shouldn't be a big problem, I think but what about the others? iOS uses Obj-C so no SDL / SMFL / Allegro. Android uses Java (as far as I know)... so what then?
I've got no ideas at all... where should I start? C++? A multimedia library?
But then comes again the question: how is really structured a game? What's the "formula" behind a game?

One metaphor I find is nice with OO programming is to imagine what you want your program to do is a project you're overseeing, and each of your objects is somebody on your team working on it. You organize them to work on their own parts, and at the end, you get the big picture you want.


This same can be applied to C team programming, but C++ is still much more powerful with overloading and templates, but basic class functionality you can get by doing something like this with structures and their pointers which is pretty much enough of object style game programming in my mind.


struct MyStruct {
int MyPlayerID;
char * MyCharacterName;
};
void SetPlayerID(struct MyStruct * this, int ID) {
this->MyPlayerID = ID;
}
void SetCharacterName(struct MyStruct * this, char * CharacterName) {
this->MyCharacterName = CharacterName;
}


If you want to use OpenGL, look into glfw which is small framework for creating window, handling input events and OpenGL context is created for you. Though staying with C might be little more annoying as I damn hate C/C++ arrays, but you still need to use them with OpenGL. If you want to learn C++ there exists quite extensive reference/tutorial sites for this like cplusplus.com and cppreference.com.


I read that I should also use SMFL or SDL but... what if I'll want to share my games on Steam / iOS Store / Android Store and so on? Steam shouldn't be a big problem, I think but what about the others? iOS uses Obj-C so no SDL / SMFL / Allegro. Android uses Java (as far as I know)... so what then?
I've got no ideas at all... where should I start? C++? A multimedia library?
But then comes again the question: how is really structured a game? What's the "formula" behind a game?


Steam is for desktop games so SMFL and SDL are fine. iOS and Android kinda need Obj-C and Java, but there exists many Software Development Kits for mobile which allows you to use other languages like Lua, C/C++.

[quote name='lemming77' timestamp='1342773656' post='4961226']
One metaphor I find is nice with OO programming is to imagine what you want your program to do is a project you're overseeing, and each of your objects is somebody on your team working on it. You organize them to work on their own parts, and at the end, you get the big picture you want.


This same can be applied to C team programming, but C++ is still much more powerful with overloading and templates, but basic class functionality you can get by doing something like this with structures and their pointers which is pretty much enough of object style game programming in my mind.


struct MyStruct {
int MyPlayerID;
char * MyCharacterName;
};
void SetPlayerID(struct MyStruct * this, int ID) {
this->MyPlayerID = ID;
}
void SetCharacterName(struct MyStruct * this, char * CharacterName) {
this->MyCharacterName = CharacterName;
}


If you want to use OpenGL, look into glfw which is small framework for creating window, handling input events and OpenGL context is created for you. Though staying with C might be little more annoying as I damn hate C/C++ arrays, but you still need to use them with OpenGL. If you want to learn C++ there exists quite extensive reference/tutorial sites for this like cplusplus.com and cppreference.com.


I read that I should also use SMFL or SDL but... what if I'll want to share my games on Steam / iOS Store / Android Store and so on? Steam shouldn't be a big problem, I think but what about the others? iOS uses Obj-C so no SDL / SMFL / Allegro. Android uses Java (as far as I know)... so what then?
I've got no ideas at all... where should I start? C++? A multimedia library?
But then comes again the question: how is really structured a game? What's the "formula" behind a game?


Steam is for desktop games so SMFL and SDL are fine. iOS and Android kinda need Obj-C and Java, but there exists many Software Development Kits for mobile which allows you to use other languages like Lua, C/C++.
[/quote]
Could you reccomend me some books? C++ (OOP too) / Game structure (veeeery important since I don't know WHERE to start) / Libraries...
Thanks!
I had the book "Practical C++ Programming", which is a nice starter book. It also covers general programming practices.

Personally I like this tutorial http://www.learncpp.com also explains what C++ and the Computer is doing under the hood. However, I think it doesn't give you the skillset for how you design an OO program.

On OpengI found this here which i like so far, it starts by explaining the terminology and basic math behind OpenGL.http://arcsynthesis.org/gltut/Basics/Intro%20Graphics%20and%20Rendering.html

On game structure I found this very helpful. http://content.gpwiki.org/index.php/SDL:Tutorials:Complete_2D_Engine_Overview
It gave me a great overview what a gameengine should do.

I know these aren't books but I hope it helps a bit until you know what books you want to buy.
Project: Project
Setting fire to these damn cows one entry at a time!

I had the book "Practical C++ Programming", which is a nice starter book. It also covers general programming practices.

Personally I like this tutorial http://www.learncpp.com also explains what C++ and the Computer is doing under the hood. However, I think it doesn't give you the skillset for how you design an OO program.

On OpengI found this here which i like so far, it starts by explaining the terminology and basic math behind OpenGL.http://arcsynthesis.... Rendering.html

On game structure I found this very helpful. http://content.gpwik...Engine_Overview
It gave me a great overview what a gameengine should do.

I know these aren't books but I hope it helps a bit until you know what books you want to buy.

Thank you for your links.
Does the "Game Engine Structure" also show me how a "game loop" is created / developed?

Could you reccomend me some books? C++ (OOP too) / Game structure (veeeery important since I don't know WHERE to start) / Libraries...
Thanks!


I never have read one book about programming languages fully, except almost one about Go. I like more of learning from the language/library's documentation.

Though I have read OpenGL SuperBible, Bjee's Guide to network programming and Game Engine Architecture. Another good source for OpenGL and general graphics programming is at http://arcsynthesis.org/gltut

Game Loop is just a for or while or do-while loop. xD

[quote name='Krishath' timestamp='1342775459' post='4961235']
Could you reccomend me some books? C++ (OOP too) / Game structure (veeeery important since I don't know WHERE to start) / Libraries...
Thanks!


I never have read one book about programming languages fully, except almost one about Go. I like more of learning from the language/library's documentation.

Though I have read OpenGL SuperBible, Bjee's Guide to network programming and Game Engine Architecture. Another good source for OpenGL and general graphics programming is at http://arcsynthesis.org/gltut

Game Loop is just a for or while or do-while loop. xD

[/quote]
Hmm yeah but I think that I've explained the whole thing in a kinda bad way. With game loop I mean: I start doing this and that... now... how can I set my game to "go to the next level?". What if my pg dies? And so on...

Hmm yeah but I think that I've explained the whole thing in a kinda bad way. With game loop I mean: I start doing this and that... now... how can I set my game to "go to the next level?". What if my pg dies? And so on...


This is one way to manage what is done and when. http://gamedevgeek.com/tutorials/managing-game-states-in-c/

This topic is closed to new replies.

Advertisement