structure design help

98006ad70886d4cfe47a50e4d33300d5
0
Stinky 101 Feb 02, 2003 at 03:26

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.

17 Replies

Please log in or register to post a reply.

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Feb 02, 2003 at 04:22

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.

98006ad70886d4cfe47a50e4d33300d5
0
Stinky 101 Feb 02, 2003 at 06:33

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.

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Feb 02, 2003 at 06:45

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.

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Feb 02, 2003 at 06:53

You might want to also try this website:

http://www.extremetech.com/article2/0,3973,594,00.asp

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 02, 2003 at 11:19

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.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 02, 2003 at 12:32

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

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 02, 2003 at 12:42

The problem I normally have is that I can’t be bothered waiting long enough before coding to plan.

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Feb 02, 2003 at 12:46

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. :)

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 02, 2003 at 12:49

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.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 02, 2003 at 14:37

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..

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 02, 2003 at 16:23

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:(

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 02, 2003 at 16:32

the best stuff I have done is in the nehe contests, apocalypes (crap) and lotr (OK)

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 02, 2003 at 16:34

hm.. i’ll check lotr..

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 02, 2003 at 16:43

cute demo

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Feb 02, 2003 at 19:19

Yeh, I’m quite proud of it.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Feb 02, 2003 at 21:42

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

98006ad70886d4cfe47a50e4d33300d5
0
Stinky 101 Feb 06, 2003 at 01:03

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