Jump to content

  • Log In with Google      Sign In   
  • Create Account


Fundamentals of Game Programming?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Jiggle   Members   -  Reputation: 100

Like
0Likes
Like

Posted 02 October 2011 - 02:13 PM

Firstly - New to the forums: Hello all!
Before I ask my questions, a little background info:

I have a fair knowledge of C++, have been learning/using it on and off for a touch over a year - I have a firm grasp on most concepts.
With regard to game development, I have played around in S.D.L a little, but I am relatively new to game design.

-------------

I was reading around, trying to decide on the best way forward - and this led to me believing that I needed to create a simple game engine. After getting a cold hard reality check, I have realized that in order to get anywhere with something as complicated as game design, I'm going to have to start with small, completable projects, and work my way up (I was considering a Tetris clone). Does anyone have any guidance they could offer?

Note: I am particularly confused as to what level to approach this from. Should I be creating a simple, procedural program? or should I be using state/process managers and complex class structures. Any help would be greatly appreciated :)

Sponsor:

#2 Katie   Members   -  Reputation: 1302

Like
3Likes
Like

Posted 02 October 2011 - 02:29 PM

"Should I be creating a simple, procedural program?"

Yes.

"or should I be using state/process managers and complex class structures"

No.

#3 ApochPiQ   Moderators   -  Reputation: 14666

Like
1Likes
Like

Posted 02 October 2011 - 05:44 PM

Just pick a game or three that you'd like to tackle, and go make them! Feel free to experiment with different tools, engines, SDKs, even languages - the more equipment you have to work with, the better your chances of being able to implement your designs down the road. In particular, don't feel confined to C++; if it seems like you're spending more time than you'd like wrestling with mundane stuff instead of getting games finished, then by all means swap to something else.

Other than that... just hack away, and pay attention to things that seem unpleasant or sticky - those are areas where you might be able to improve your programming. If you catch yourself feeling like "there's got to be a better way to do this" then heed that instinct - it'll serve you well. Don't worry too much about getting it perfect or even all that "right" to begin with; the best way to learn how to improve is to make mistakes and analyze them.

Final thought: keep it simple. Do the simplest thing that could possibly work. It isn't worth wasting time on complex reusable architectures or engines or whatever if that gets in the way of you doing what you're interested in.

#4 Jiggle   Members   -  Reputation: 100

Like
0Likes
Like

Posted 03 October 2011 - 12:58 AM

Okay then, so I'll have a bash at Tetris, and see how that goes. Is it acceptable to post the code on the forums for people to make suggestions?
Thanks Apoch :)

#5 yckx   Prime Members   -  Reputation: 1163

Like
0Likes
Like

Posted 03 October 2011 - 01:38 AM

Okay then, so I'll have a bash at Tetris, and see how that goes. Is it acceptable to post the code on the forums for people to make suggestions?

it's fine to post code. When you get stuck on something, we encourage you to post all relevant code, and a screenshot of your game if it sheds any light on the problem. People often post too little code for others to help without asking that more be posted. Also, post exact error messages. But if you just want a code review, put it on github or google code or some other repository and provide a link. Uselessly excessively long posts are the root of some evil.

#6 Dawoodoz   Members   -  Reputation: 294

Like
0Likes
Like

Posted 03 October 2011 - 04:46 AM

You should not use the native version of C++ for high level game logic because finding memory leaks and protecting against access violation will take away your creativity and waste most of your time.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


#7 Katie   Members   -  Reputation: 1302

Like
0Likes
Like

Posted 03 October 2011 - 08:09 AM

Or just use boost::shared_ptrs for everything, and then you won't have memory leaks.

Honestly, tetris really shouldn't involve that many memory allocations. I recall writing tetris clones in 20-30 lines of BASIC on 8-bit micros with fixed length arrays and things.

#8 Oberon_Command   Crossbones+   -  Reputation: 1828

Like
0Likes
Like

Posted 04 October 2011 - 01:06 PM

Or just use boost::shared_ptrs for everything, and then you won't have memory leaks.

Honestly, tetris really shouldn't involve that many memory allocations. I recall writing tetris clones in 20-30 lines of BASIC on 8-bit micros with fixed length arrays and things.


This. In fact, I'd bet you could write a Tetris game without using new or malloc() once in your own code, if you really wanted to.

#9 MarekKnows.com   Members   -  Reputation: 448

Like
0Likes
Like

Posted 06 October 2011 - 04:42 AM

I see this question quite a lot on game development forums.  I have decided to start a new video tutorial series that will address this concern by choosing a simple 2D single screen game (like pacman for instance) and show how to make it from scratch.<br /><br />I've called out the public to suggest which game I should make and shortly I will be choosing one from all the submissions and start to code.  Keep an eye on my website!

---
Free C++, OpenGL, and Game Development Video Tutorials @
www.MarekKnows.com
Play my free games: Ghost Toast, Zing, Jewel Thief





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS