New to game dev: Classes Question

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
Armyof1
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 11
Joined: Sun Sep 05, 2010 12:03 am
Programming Language of Choice: C++
Location: Nebraska
Contact:

New to game dev: Classes Question

Post by Armyof1 »

Let me begin by saying that I am quite new to SDL, and programming in general.
I took a look at the Programmer's Education Index (and similar threads) and found some very helpful posts, but the articles and diagrams about engine class structure seems to go right over my head. I've read through lazyfoo.net's SDL tuts probably 4 or 5 times and I am getting the hand of learning SDL's functions and what not, but I have no clue how to actually go about learning to make a game. Most of lazyfoo's tuts were a "one file" type of structure. I've made (really) basic games like Lusikka Mage's Pickin' Sticks ( :] ) but getting the hand on how to do that "better" with some basic OOP is what I am struggling with at the moment.

So my question is, are the any basic example on how to create some basic engine classes without getting too in depth for a beginner? or perhaps if anyone else has struggled with this in the past what you did to overcome it?

Thanks and I gotta say, this little community here is really awesome!
N64vSNES
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Thu Aug 12, 2010 11:25 am

Re: New to game dev: Classes Question

Post by N64vSNES »

I'm not entirely sure what the question is. :|
User avatar
Boogy
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 27
Joined: Sun Mar 06, 2011 3:59 pm
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: Breda, The Netherlands
Contact:

Re: New to game dev: Classes Question

Post by Boogy »

Have you read the book 'Beginning C++ Game Programming' by Michael Dawson ?
It is an excellent book which gives you an introduction to C++ programming from a games perspective.
Student @ IGAD
Image
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: New to game dev: Classes Question

Post by dandymcgee »

N64vSNES wrote:I'm not entirely sure what the question is. :|
I'm guessing it's the part where he says "So my question is..."

As far as good beginner OO examples, I don't really remember any of the resources I used as it was quite a few years ago now. I would try to find a good book on Object Oriented Design.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Milch
Chaos Rift Junior
Chaos Rift Junior
Posts: 241
Joined: Sat Jul 11, 2009 5:55 am
Programming Language of Choice: C++
Location: Austria, Vienna

Re: New to game dev: Classes Question

Post by Milch »

Armyof1 wrote: So my question is, are the any basic example on how to create some basic engine classes without getting too in depth for a beginner? or perhaps if anyone else has struggled with this in the past what you did to overcome it?
Well, for this kind of question there is no easy answer imo.
For the most part, its learning-by-doing - and improving upon your mistakes ;)
Then I would start learning and understanding different design-patterns and go on to actually analyze what "big" game-engines like the SourceEngine or Unreal are using.

I think this article might be helpful on how a game can be structured (not sure if you already read it, since its on LazyFoo)
http://lazyfoo.net/articles/article06/index.php
Follow me on twitter!
User avatar
Armyof1
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 11
Joined: Sun Sep 05, 2010 12:03 am
Programming Language of Choice: C++
Location: Nebraska
Contact:

Re: New to game dev: Classes Question

Post by Armyof1 »

Milch wrote: I think this article might be helpful on how a game can be structured (not sure if you already read it, since its on LazyFoo)
http://lazyfoo.net/articles/article06/index.php
GAH! Thank you! how did I miss this?! lol
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: New to game dev: Classes Question

Post by dandymcgee »

Armyof1 wrote:
Milch wrote: I think this article might be helpful on how a game can be structured (not sure if you already read it, since its on LazyFoo)
http://lazyfoo.net/articles/article06/index.php
GAH! Thank you! how did I miss this?! lol
Yeah, a lot of people seem to miss that whole Article section: http://lazyfoo.net/articles/index.php

There's some awesome stuff in that section.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
Khearts
ES Beta Backer
ES Beta Backer
Posts: 50
Joined: Sun Oct 10, 2010 5:07 pm
Current Project: Super Mario Bros Clone and 3D Engine
Favorite Gaming Platforms: Dreamcast
Programming Language of Choice: C/++

Re: New to game dev: Classes Question

Post by Khearts »

What the hell?

Hidden link!!!!! :shock2:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: New to game dev: Classes Question

Post by dandymcgee »

Khearts wrote:What the hell?

Hidden link!!!!! :shock2:
Believe it or not it's on the top of every page on his site. :roll:
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply