Jump to content

  • Log In with Google      Sign In   
  • Create Account


Game management


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
10 replies to this topic

#1 Khizar   Members   -  Reputation: 89

Like
0Likes
Like

Posted 09 February 2013 - 11:43 AM

I just want to ask how to do game management..I mean in terms of classes and their relation..what should be done should i use design patterns or something..i just want to get the ability to think in terms of management..Today i was writing a basic TIC TAC TOE game and tried to think in terms of OOP but i dont know whether i was doing right or wrong.I just did some paper work..i want help.An example game would be helpful and also if there is some good book out there then do tell me also...

Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 13168

Like
7Likes
Like

Posted 09 February 2013 - 12:11 PM

You are going about it entirely wrong.

Nobody starts a game thinking, “Okay, this game will have design patterns in it.”  They happen along the way once you have amassed enough experience to spot where they belong.

 

You are rushing things.  You can’t learn object-oriented design in a month or likely even a year.

 

Besides, it’s not as if there is an answer to this anyway.  Would it be helpful to tell you that there is usually a “CGame” (or similarly named) class somewhere in most games?  That’s about all most games have in common.

 

 

Learn to program, then worry about the little details.

 

 

L. Spiro


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 Khizar   Members   -  Reputation: 89

Like
-3Likes
Like

Posted 09 February 2013 - 12:47 PM

I asked for an example game ...Even if it is small.if you can give me rather than saying that i need to learn OOP...and by the way these are not "little details"..they are big



#4 EWClay   Members   -  Reputation: 659

Like
2Likes
Like

Posted 09 February 2013 - 12:59 PM

I just want to ask how to do game management..I mean in terms of classes and their relation..what should be done should i use design patterns or something..i just want to get the ability to think in terms of management..Today i was writing a basic TIC TAC TOE game and tried to think in terms of OOP but i dont know whether i was doing right or wrong.I just did some paper work..i want help.An example game would be helpful and also if there is some good book out there then do tell me also...

 

You won't go far wrong with these...

http://en.wikipedia.org/wiki/You_aren't_gonna_need_it
http://en.wikipedia.org/wiki/KISS_principle
http://en.wikipedia.org/wiki/Don't_repeat_yourself

 

As you work on more advanced games you will find that you need to do more design up-front. But that comes with experience.

 

Start with structured programming (that means functions, loops and no gotos). Tic Tac Toe doesn't need OOP so save it for the next project.

 

I wouldn't look for books about game programming at this stage. Look for general programming. Anything by Herb Sutter or Scott Meyers is good, assuming you are using C++.

 

 

 



#5 runnerjm87   Members   -  Reputation: 177

Like
1Likes
Like

Posted 09 February 2013 - 05:08 PM

I agree with L Spiro and EWClay on this one. Game programming isn't where you start, but it's a nice place to end up.

 

When I started programming, all I wanted to do was make games, so as soon as I could render a jpg I was off and running (and crashing and burning). There's a lot of behind the scenes stuff that goes into making a game, at a very abstract level, and understanding all of the fundamentals about procedural and object-oriented programming is an absolute must.

 

As far as learning how to sketch out your ideas on paper, I would look into buying a book on UML, it's a fairly standard design language for object-oriented programming and you might get a sense for how larger projects are structured from the examples in the book. This is the book that I have, if you want to go that route.



#6 Khatharr   Crossbones+   -  Reputation: 2957

Like
3Likes
Like

Posted 09 February 2013 - 08:34 PM

runnerjm87, on 09 Feb 2013 - 15:16, said:
I agree with L Spiro and EWClay on this one. Game programming isn't where you start, but it's a nice place to end up.

While it's true that OP is putting the cart before the horse in terms of design practices I'd say that it's fully possible to start making games very early in the learning process. You just make games poorly and then move towards making games well. It's really discouraging for an aspiring game dev to hear that they can't make games. The fact of the matter is that a concussed chipmunk can make games give the proper IDE and some help pushing the buttons.

@OP - You're in the right place (making a small and simple game) and it's good to consider things that will help you in the future. The pertinent advice here is that jumping into those things right now may hinder you rather than helping you. Get comfortable with the language and its dynamics. Once you feel like you have a firm grasp on the language itself just keep coding and start reading stuff habitually. It doesn't have to be a formal thing. Just feed your interest in programming. You can find articles all over the internet about design patterns and different practices. A lot of it will be overwhelming at first, so if you don't get it then just skim it. When you come to a place in your coding where the idea is relevant you'll remember reading about it and then you can go back and re-read it and it will make a lot more sense.

For now, just code and code until you don't get surprised by the language any more. Ideally you want to get to the place where the only reference you need while writing a program is the documentation for any libraries you're using. When you're not interested in picking up your C++ book any more - that's the time to move forward.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#7 King Mir   Members   -  Reputation: 1945

Like
1Likes
Like

Posted 09 February 2013 - 09:02 PM

Unfortunately there's very little broad guidelines that we can give you about how to think in OOP. You need practice, and if you can manage it, find someone to review your code.

 

One piece of advice that I can give, is find a book. A book will have examples and hopefully exercises, like you want.



#8 warnexus   Prime Members   -  Reputation: 1408

Like
0Likes
Like

Posted 10 February 2013 - 12:06 AM

I just want to ask how to do game management..I mean in terms of classes and their relation..what should be done should i use design patterns or something..i just want to get the ability to think in terms of management..Today i was writing a basic TIC TAC TOE game and tried to think in terms of OOP but i dont know whether i was doing right or wrong.I just did some paper work..i want help.An example game would be helpful and also if there is some good book out there then do tell me also...

Instead of thinking game management, think of how you can manage your code. Is your code flexible and maintainable? Can I use this code in other project with very few tweaks?

 

Well you are in luck because I coded my TicTacBoard last year and still have it as a good reference so I can tell you how you can make your code reusable and how I lay out my game design. 

 

a folder named buttonimages(that contains the images of the cross and X)

a class that setup the TicTacBoard

a class that setup the board logic

a class that is a TicTacToeButton

a class called TicTacToeMain(the entry point of your program)

 

On a side note, you can also added a class for Player1 and another class for Player2. 

 

Hopefully you can see from my class description that each class sounds like it is an object hence why it is object-oriented.

 

This comes from experience. I must have written so many programs before I learned and adapted into the good OOP style and practice. No book can do a better job than applied experience! You will make mistakes but learn from them! Draw diagrams before coding! Question your design and bugs(this is bound to happen). I ran into so many bugs when I coded Tic-Tac-Toe despite having experience with Java. But I finished it in less than a day's time. You will struggle, but have fun with it. It is programming-the best thing you can do in front of a computer!

 

Best of luck with Tic-Tac-Toe!


Edited by warnexus, 10 February 2013 - 12:21 AM.


#9 LorenzoGatti   Crossbones+   -  Reputation: 2660

Like
2Likes
Like

Posted 11 February 2013 - 03:05 AM

If you want to turn Tic-Tac-Toe or other simple games into a useful exercise I suggest a few steps:

  1. Go ahead and start developing without caring about style and "writer's block".
  2. Finish your game, leaving nothing incomplete or defective. If you have trouble at this point, you need to learn about programming basics or game design, not about OO style.
  3. With the benefit of hindsight, improve and refactor your code to explore the right way to write it.
    Getting someone experienced to review your code and teach you what you did wrong would be vastly better than relying on your insufficient knowledge.
  4. Repeat for a major feature update (e.g. Tic-Tac-Toe with fancy graphical effects) or a new game.

Produci, consuma, crepa

#10 JiiPee   Members   -  Reputation: 135

Like
0Likes
Like

Posted 12 February 2013 - 08:55 AM

Game management? If you're asking about architecture of game engine, then I would suggest you to get some book what covers the topic. However  some "litlle game" developers usually just starts to code and they refactor and manage the game code during the creation process. I think it's quite heavy way to manage the game engine, but some people does it. Usually they have some minor ideas, which they start to implement to code and little by little they manage to create a whole game.

 

If you are new to coding and game development, the last mentioned way isn't perhaps so bad. It's good way to get to know about the development and coding. Usually you face most general issues when you start from the scratch and by using search pages and books you will get to know about the development quite fast.

 

Design patterns and class diagrams are quite useless, if you don't have even the most general ideas about your game. Usually it's good way to write even some really high level requirements and from there start to develope your software. Requirements -> some analysis method -> static model -> code.


See my game dev blog: http://gamedev4hobby.blogspot.fi/

#11 GWDev   Members   -  Reputation: 280

Like
1Likes
Like

Posted 12 February 2013 - 09:27 AM

A (classroom) way to get startet with organising your code in a OOP way would be to to write down the details of your game.

 

e.g. TIC TAC TOE:
There is a gameboard.

It is divided into 9 squares.

3 times 3 squares.

The game is played by two players.

One player uses X as marker.

One player uses O as marker.

The player take turns alternating.

The player with three markers in a line wins.

The line can be horizontal, vertical, diagonal.

 

Might have forgotten some things.

 

Now you start looking at the summary you have.

 

There is a gameboard => gameboard class

It is divided into 9 squares. =>  square class

3 times 3 squares. =>  gameboard needs to keep track of 9 squares in 3 times 3 alignment

The game is played by two players. =>  player class

One player uses X as marker. One player uses O as marker. => player class needs to keep track of used marker by player => gameboard needs to store the placed marker and position

The player take turns alternating. => main class / game loop needs information about active player

The player with three markers in a line wins. The line can be horizontal, vertical, diagonal. => main class / game loop needs to check condition every loop.

 

So gameboard class could double as main or game class.

Gets a 3 x 3 datastructure that takes square / tile object

square / tile object gets property playermarker symbol and getter and setter

player object gets properties for playername, playermarker symbol

and so on ....

 

And so you continue until you have everything (entities, functionality, etc.) that is in you game written down and placed in some class / function / functions file.

 

If you are unsure after doing that, you can upload the document / diagramm (UML) here and get feedback.

 

--GWDev






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