Archived

This topic is now archived and is closed to further replies.

SmokingKipper

Complete game tut's

Recommended Posts

SmokingKipper    122
Hey guys... I have been playing around with OpenGL and Direct3d for a couple of days, and I think I am going to go for OpenGL. I have some experience with C although nothing solid. My current level is at the stage where I can understand a basic Win32 handler and message loop program. The reason why I am telling you this? I have stumbled across the Nehe site and decided to work (play?)my way through the tutorials and see how far I can take it (before my brain explodes)....Ok, so you do the first couple of lessons and learn how to get a few primitives setup on screen, you do a few more, and learn about texturing and some lighting...My question...How do you go about putting all this stuff together into even a basic game (even something as simple as Pong etc)....I may know how to texture a .bmp and import a model, but how do you implement any of this into anything useful. Is it a case of as I learn to do each of these tutorials, I will pick up bits of knowledge which I can bring together to build a game? I dont know, hehe, its not the tutorials, they seem great and the site a god-send...but its the same deal with the OpenGL game programming book...the chapters take you through all these seperate projects but with nothing to solidify your knowledge..unless its just me. Obvioulsy I dont expect a direct answer, however if you guys could possibly give me some advice to put me on the right track, maybee there is some site that I have missed that takes you through a basic game? ...now im off to bed. Have fun guys. Edited by - Smokingkipper on November 4, 2001 6:47:53 PM

Share this post


Link to post
Share on other sites
TheGilb    372
This is exactly my point: Newbies to game programming can find tutorials on anything except how to actually make a game!!!

Sorry to label you a newbie smokingkipper but I don''t mean anything bad by it...

I think one of the first things I would like to do is congratulate you on your choice of 3d rendering API''s (BTW don''t forget to look up OpenAL and SDL to ditch Micro$hit altogether and develop portable code *g*)

The second thing I would like to say is - you have a long, long road ahead of you and there are several routes you can take to attain that goal of game programming god (I think we can all safely say it''s a long road!!!), but whichever route you take the journey will be fun and interesting with lots and lots and -lots- of information to take in *g*

Your basic goal in game programming is this: A game is a loop, a verrrrry long loop, the game starts, data is loaded into memory for high-speed access, the main game loop begins, stuff happens using a series of logic gates (if this then this or this blah...), the user presses keys and AI is used to think of stuff and all kindsa great stuff happens, then the loop is executed again Now in every game there is -bound- to be some code which is used and re-used over and over again throughout the game, so you put those bits and bobs into functions (Such as playSound, or printText or whatever). Now the trick is learning what is a game engine, what does it do, and why bother? The game is the if and when and where, the game engine is the how. You want to play a sound? The engine should handle it. You want to render a level made in your custom map editor? The engine should handle it. In fact the game itself might well be quite sparsely dispersed with short lines of code which instruct your game engine to do something. How is this all achieved? How do you think it is achieved? The beauty of it all is that there is no set way to achieve it, you write in all the stuff yourself! I mean yeah, if you want to get started there''s certainly enough literature on the net! Source code to full 3d game engine''s out there! In fact I''m releasing one (Hopefully!) if/when my entry it posted for the nehe compo!

Whatever happens I hope this info helps you somewhat

Share this post


Link to post
Share on other sites
Drizzt DoUrden    100
Well assuming your programming for Windows since you mentioned the Win32 API, you should probably pick up the book "OpenGL Game Programming" by Kevin Hawkins and Dave Astle. It teaches you how to make an engine and a small game. It teaches you OpenGL for graphics, Direct Input for Input, and Direct Sound for Sound. It teaches mostly everything NeHe teaches AND how to make a game..

Good Luck.

Share this post


Link to post
Share on other sites
HellRiZZer    308
Heh, what do you expect?

That game designers will come to NeHe and ask him to post tutorials of how to create game engine?

Each game engine is unique as well as techniques for writing sound, graphics etc. Why was Half-Life so successeful? Because nobody has done same thing before!
So, it does applies to every game programmer, designer etc... Find your own way to do games, only by going that way you''ll make something different from others.
If you read someone''s notes, after some time you forget that they''re someone''s else''s and you think they are yours.
So, try something new!



Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I looked extensively at the crappy space invaders code from the duke. Basically I used Shining Knight''s stuff for rendering and input and i looked at the classes and framework of crappy si to see how to do simple ai and use linked lists in the game.

right now i have enemies falling down from the sky and I can shoot them

The game I''m trying to make is SWOOP a classic C64 game. Anybody knows it?

Airo

Share this post


Link to post
Share on other sites
TheGilb    372
"Why was Half-Life so successeful? Because nobody has done same thing before!"

I wouldn''t say that... I mean the Q2 engine wasn''t really that heavily modified for HL... So they wrote a skeletal animation system for the models and used a radiosity engine to render the lightmaps for the levels - big whoop! Well ok I didn''t write the HL engine, I can''t be sure how heavily they modified it...

What I think really made Half-Life was the story because that my friend had never been done before HL!

Sorry - just wanted to make a point *g* A good game engine does not make a decent game! A good game makes a good game! Ok the Quake series of games has been very popular, but I bet most money was made from the games that use the Quake engine and don''t just have a (crap) storyline tacked on top!

Share this post


Link to post
Share on other sites
SmokingKipper    122
Thanks for the help guys, its a great source of encouragment to know there are other people in the same boat so to speak.

(how the hell did ppl manage before the internet ---this brings me to another question....do you not think that there is sometimes TOO much info out there and you keep jumping from one thing to the next....maybee before the net was amoung us, you managed to find a couple of books and LEARNT them inside out, because thats all ya had?...just a thought....and this by no means that im complaining about too much info..lol)

Ok, two things...I have ordered a c++ ref manual and have just recieved the OpenGl game programming book...also I have enrolled on both the C++ and OpenGL courses at GameInstitute, added to that around 5 hours a day playing around with code (and lots of coffee), the idea is that I spend so much cash on books and commit so much time to this thing that I tell myself that there is NO WAY I can give up...I also rang around a few univercitys today, for next year.


Anyway...im gonna go on a code hunt around the net and see what I can dig up...lol, I may even get a small ''diary of the newbie'' site, posting my progress.

Hehe, well of to work...cya guys...have fun!


"Smoke me a kipper, I''''ll be back for breakfast"
A.J.Rimmer, Red Dwarf

Share this post


Link to post
Share on other sites
Wavarian    850
IMHO, if you finish reading all the first 28 tutorials you''ll know what is basically possible in Opengl. All you have to do then is put all of it together in a way that you want, write your algorithms and link them with the graphics side. A simple game is really easy to make once reading the tutorials.

I dont think a game engine tutorial is going to help anyone, i mean, there are so many different ways of making an engine, and if you really want to just rip off someone elses code to make a game because you dont understand the stuff the author put into the code (and trust me, it will most definitely happen with alot of you), then you may has well just download some of the many opensource engines and make a game from those.

Once someone shows you a way to make an engine, you''ll loose sight of what is really possible, and only gain sight of someone elses perspectives.

Share this post


Link to post
Share on other sites
mittens    1323
If you guys will give me some time, I''m trying to build up my series (and the engine) to have all of the features a full game needs (already have a lot of it... need collision detection routines though)! But, I have noticed that trend in tutorials and books (that they never go over how to make a full game), and I can promise two things to you guys:

1) My tutorials will end up making several full games
2) An OpenGL book may be on the horizons which will have more games in it than you can shake a 10 foot stick at.

------------------------------
Trent (ShiningKnight)
E-mail me
ShiningKnight Games

Share this post


Link to post
Share on other sites
Airo    197
Wavarian : I agree with you a little bit. Using someone elses engine/code can blind your sight. But when your a newby looking at easy understandable code can help you get started much faster then when you have to figure it out all by yourself.

I bet there are a lot of people who looked at the quake2 source and learned from that Not me LOL

Airo

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Congrats on choosing OpenGL .

Go portability and experience!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Tisk tisk tisk - should go for Direct3D ... not sure why everyone else is talking about using OpenGL. Sure can''t port over to another OS but if you plan on making money ( which I think almost everyone here is trying to do ) you should use D3D due to it being mainly being only for Windows. Which is of course where teh biggest chuck of money is going to come from.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
You can make money using OpenGL, and not D3D.

Look at Quake3. It doesn''t use D3D.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
It would be nice though for someone to explain the basic format of a 3D engine and how you can use it to actually make something. Thats not something that is straight forward enough for someone to just jump in.

Share this post


Link to post
Share on other sites
SmokingKipper    122
that is easy to answer.

How did the experienced guys learn to develop there own 3d engine?

was it a case of reading through others and picking things up?

Or adopting somebody elses as your own and to gradually introducing new things, untill you have a thorough understanding of the subject?

Also, to the guys who do have the experience...what route did you take to ''get it''?

My feeling is now that, if you fully understand the subject and know its underlining basic principles, contructing a 3d engine should not be such a big step...but maybee (and I probably speak for others) there are too many ppl (me!) who are trying to jump into creating an engine to some game, when they dont have the basics down and who can create simple games showing some level of competence.


Hmm not sure if I am going anywhere with this post, but alas....off to bed.

"Smoke me a kipper, I''''ll be back for breakfast"
A.J.Rimmer, Red Dwarf

Share this post


Link to post
Share on other sites
Wavarian    850
Honestly i only read the first 8 of Nehe''s tuts and started working on making things my own way (i dont like the way code is being handled in any of the other tutorials). I firstly thought up of what an engine was exactly, put my plan down on paper, and off i went. The purpose of an engine, in my view, is to lessen the need for repetitive code and to handle objects and actions dynamically. What my engine handles is:

Key checking routine
Camera Positioning, Rotating & moving
Terrain Loading
Collision Detection
Loading/Drawing/Deleting Menus
Loading Textures
Map Loading

using the functions of the engine, i can easily implement a simple game in under 10 minutes using a minimal amount of code. I dont look at many other people''s projects, because if its not set out the way i expect it to be, and cant see what the author is trying to get the code to do, i''ll try doing it my way and optimizing it for my needs. I doubt an engine tutorial will help many, an engine is but a broad term for the many possible engine types that one can make.

Share this post


Link to post
Share on other sites
SmokingKipper    122
If this is really obvious and sounds stupid go ahead and flame my ignorance...

So an engine can be just a large wrapper template so to speak, that allows you just slot your game specific code into the functions and voila a new game?

Share this post


Link to post
Share on other sites
Lord FlatHead    122
In my opinion, a program is an "engine" when you can alter almost anything in it without touching (and recompiling) the .EXE code. Quake 3 is a good example : you can change all the basic game rules (the interpreted .qvm files), you can add levels, textures, sounds, models, animation etc... All without having to recompile the code.

So an engine would contain basic things like reading data, rendering the world on every frame, accepting input and changing the world model. Everything else should be in external files (.MAP for maps, .TGA for textures, etc) so that things can easily be altered without having to dig into the code.


**DISCLAIMER: THE AUTHOR OF THE ABOVE POST CANNOT BE HELD RESPONSIBLE FOR ANY CONSEQUENCES WHATSOEVER, AS THERE''S A LARGE CHANCE HE WAS VERY, VERY DRUNK AT THE TIME OF WRITING**

_________
"Maybe this world is another planet''''s hell." -- Aldous Huxley

Share this post


Link to post
Share on other sites
mccuem1    122
quote:

**DISCLAIMER: THE AUTHOR OF THE ABOVE POST CANNOT BE HELD RESPONSIBLE FOR ANY CONSEQUENCES WHATSOEVER, AS THERE''S A LARGE CHANCE HE WAS VERY, VERY DRUNK AT THE TIME OF WRITING**



Sweet. :-)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Hmm, Rather than an engine tutorial, info on where to start on a game would be helpfull.


For example, on a example project. should I work on a map format loader so I can get terrain on screen? Or should I get terrain on screen so I know it works then modify it(rewrite it) to handle maps. Then get a little guy walking around. Once again rewrite the entire thing so its nice and object oriented and engine like.

Obviously this is wrong as the entire thing should be setup with objects from the start. For a newbie this is generally hard because they dont know how to do these things in the first place. I Think a small series of tutorials showing people how to setup engines from the idea that they should be dynamic and modual would be a good idea. Get the new game programmers into making simple systems that work together. Other tutorials show them how to get terrain and other things up.

This is a rant as i wanted this when i was a newbie, i didnt know how to start. The only thing i could do was make a bunch of seperate working things. I wast able to throw it all together till I had made a few SMALL games and then rewritten them with objects.

Newbies have it hard, most of them dont know how to programvery well yet.

Note a perfectly fine game can be made from scartch and be unorganized but a large project will most always be harder this way. Beautifull engines are made very versatile... look at quake3, use that engine for anything. Make it a racing game if you want....

Share this post


Link to post
Share on other sites