Jump to content


structure design help


17 replies to this topic

#1 Stinky

    New Member

  • Members
  • Pip
  • 3 posts

Posted 02 February 2003 - 03:26 AM

Just started to code in OpenGL, I know C++ code, but my biggest problem is I have no clue how to effectivily organize the program before I write I have used flow charts but they just aren't cutting it with programs like a game.

My experiance with structure design is nil so if any one has some good tutorial links online or could recommend some books (Online tutorials preferred becouse I am poor at the moment )

I think it would be best if the link was placed in the tutorial section reason I posted the request here I didn't want to clutter up the tutorial section with requests. Trust me I will still need some more help physics major not a computer science major at least I won't need those math science tutorials.

Thanks for any help.
Taking advantage of every offer before it expires.

#2 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 02 February 2003 - 04:22 AM

I added two links to the tutorials section, which contain in-depth tutorials for OpenGL. Try them out and let me know if they help.

For game design, what you are looking for is an engine. If you are just starting programming games, it is recommended that you use a pre-made engine to make your game. After becoming advanced, you can then think of making your own engine.

However, I recommend that you first learn OpenGL for general graphics programming rather than immediately starting with game programming.
Just an opinion though.

#3 Stinky

    New Member

  • Members
  • Pip
  • 3 posts

Posted 02 February 2003 - 06:33 AM

Nice page. Thanks for the link nice coding tutorials.

Thanks for the advice I know I need an engine and that is what I am talking about designing an engine. I have messed around with some engines before, standard fare stupid little games you know like shot the brick get a point kind of crap. Kind of want to try my hand at coding a simple engine one not jumping into a full blown FPS MMORPG engine.

But right now I am not looking for anything concerned with the actual code of a program but I am in need of some advice for the design of object oriented programs something better then flowcharts. I know this is like the mundane part of programming but I really never bothered to study program design beyond the basics. In short I don't need coding help I need a more efficient way to design programs the pen a paper part before you start writing the code. I can't help but feel there is a better way to plan code then what I am doing (which is mostly inventing it as I go, and so many trees have died becouse of this think of the trees)


Thanks again for the link I sense it will be very useful. and I hope this clearifies my question.

All these books I have on coding, and not a one of them has anything about planning a program before you code.
Taking advantage of every offer before it expires.

#4 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 02 February 2003 - 06:45 AM

There is an excellent book on game engine design called:

3D Game Engine Design : A Practical Approach to Real-Time Computer Graphic by David H. Eberly

It shows all aspects of a game including Object-Oriented designing.

#5 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 02 February 2003 - 06:53 AM

You might want to also try this website:

http://www.extremete...3973,594,00.asp

#6 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 02 February 2003 - 11:19 AM

There are many ways to go about planning any program. Here are some I know:

* Structure diagrams. These are similar to flowcharts. I don't find them very useful
* Pseudocode. Pseudocode basically is like code, but you can generalise. Instead of glVertex3f(...) you can write draw vertex ....

What I think you might want to try is the top down approach. Here's a simple explanation:

First, think of the biggest 'chunks' you can divide your program into, like draw graphics, main loop, do sound. Then take each chunk in turn, and break it down. Then break each of those pieces down, until you have chunks which you can easily code.
It'll take a while, but it'll be worth it

Of course, getting a book or a proper tutorial is better, but this is a quick summary to guide you.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#7 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 02 February 2003 - 12:32 PM

i do add myself to the chunk from big steps down. i like that, and use it myself. thought i never got anything finished till now:D
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#8 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 02 February 2003 - 12:42 PM

The problem I normally have is that I can't be bothered waiting long enough before coding to plan.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#9 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 02 February 2003 - 12:46 PM

Sometimes, you think while you're coding. In some cases I made a whole program without even planning. Thoughts just sometimes pour while you're programming. I'm not claiming that's the way to do it though. :)

#10 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 02 February 2003 - 12:49 PM

that's the way I normally end up doing things. It's not the best way, but sometimes it works. Normally I do a little planning before I code a big project. At least in a very vague sense. I've learnt that lesson since my first engine. I just started coding and it became so bad that almost every class had to have access to the engine class, and there were so many interconnected bits that it wasn't really modular OR OO. Hopefully I'll do better on the engine I'm designing now.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#11 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 02 February 2003 - 02:37 PM

hm.. when i'm at school (soon 2 days per week), then i one day have 10 hours. that suxx. but it gives me enough time to design and structure on paper, wich is quite cute..

okay, in fact, most the time i just lie there and sleep.. but when i'm awake, i can use the time..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#12 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 02 February 2003 - 04:23 PM

hm.. anyone of you got yet some great stuff up and running? i'm interested in sharing.. i lost my hd, so i don't have anything worthwile to show anymore:(
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#13 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 02 February 2003 - 04:32 PM

the best stuff I have done is in the nehe contests, apocalypes (crap) and lotr (OK)
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#14 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 02 February 2003 - 04:34 PM

hm.. i'll check lotr..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#15 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 02 February 2003 - 04:43 PM

cute demo
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#16 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 02 February 2003 - 07:19 PM

Yeh, I'm quite proud of it.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#17 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 02 February 2003 - 09:42 PM

you can be..

btw, your fontrendering.. dunno.. here it looks awesome.. but i bet its partially because of the fsaa6x on my ati radeon9700pro, isn't it?:D
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#18 Stinky

    New Member

  • Members
  • Pip
  • 3 posts

Posted 06 February 2003 - 01:03 AM

Thanks for the book and the webpage link.
I just ran the title of the book past my father turns out he thinks he has it (Translation I need to go digging in his garage if I want it)
Might be easier to just go buy the thing
Taking advantage of every offer before it expires.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users